
15.2. Connection to a Computer
English
GB 59
• The RS-232C is of the DCE type (Data Communications Equipment) and can use standard DCE
cables.
• When connecting to other equipment, check the specific manual for proper settings and connections.
• Keep the RTS line set "HI", when RTS is used.
Program Example
This example sets the display to zero, waits for placing a weight, requires stable weighing data and dis-
plays it. Set the balance functions as follows:
dout Prt 0 Data output mode: Key mode
dout PUSE 0 Data pause: Not used
dout data 0 Data memory function: Not used
SiF bPS 2 Baud rate: 2400pbs
SiF btPr 2 Data length and parity: 7 bit EVEN
SiF CrLF 0 Terminator: CR LF
SiF tYPE 0 Data format: A&D standard
SiF ErCd 1 Error code and <AK>: Output, <AK> (ASCII code 06h)
Note: Some computers cannot run this program as it is – the program may require
modification. Refer to the manual for the computer.
10 OPEN "COM1:2400,E,1,CS8000" AS #1
20 PRINT #1, "R"+CHR$(13)+CHR$(10)
30 LINE INPUT #1, AK$
40 IF AK$<>CHR$(6) THEN *MEMO
50 LINE INPUT #1, AK$
60 IF AK$<>CHR$(6) THEN *MEMO
100 FOR II=1 TO 1000: NEXT II
200 PRINT #1, "S"+CHR$(13)+CHR$(10)
210 INPUT #1, HD$, DT$
220 PRINT HD$, DT$
230 CLOSE #1
240 END
300 *MEMO
310 PRINT "AN ERROR HAS OCCURRED"
320 CLOSE #1
330 END
Declaration of protocol.
Request to zero the display.
To receive the verification code <AK> from the
balance for the re-zero command.
If not <AK>, display the error message.
Reception of verification code <AK> for ending the
command.
If not <AK>, display the error message.
Wait time for placing weight.
Request for the stable weighing data.
Reception of the header and data.
Display the header and data.
Close communications
End
Label
Error message
Close communications
End
Komentáře k této Příručce