Onnection to a comput – A&D GR Series GR-300 User Manual

Page 57

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

Advertising
background image

m

onnection to a Comput

U The RS-232C is of the DCE type (Data Communications Equipment) and

can use standard DCE cables.

When connecting to other equipment, check the manual for that equipment
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 displays it. Set the balance functions as follows:

1 L O

_ L n

LI LI U L II L LI

Data output mode : Key mode

1 1 n 1 1 r r n

Q O LI L i~ U J L U

Data pause : Not used

1 1 1 n 1 n n

LI LI LI L U I 1 L ' 1 LI

Data memory function : Not used

r r 1 n r ~l

-.III LI I ^1 L

Baud rate : 2400pbs

r r t t_ n n

J 1 1" U L 1 I U

Data length and parity : 7 bit EVEN

r r r 1 r n

J 1 I~ L I L 1 U

Terminator: CR LF

r r III n r ri

-.III" 1

___________

1 r L U

Data format: A&D standard

r r r r 1 1

J 1 I‘ L 1 L LI 1

Error code and <AK> : Output, <AK> (ASCII code 06h)

Caution Some computers can not 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 PRIhiT #1, "R''+CHR$(13)+CHR$(10)

30 LINE INPUT #1, AK$

40 IF AK$^CHR$(6) IREN *MEM0

50 LINE INPUT #1, AK$

60 IF AK$^CHR$(6) IREN *MEM0

100 FOR 11=1 TO 1000: NEXT II

200 PRINT #1, "S''+CHR$(13)+CHR$C10)
210 INPUT #1, HD$, DT$
220 PRIRT HD$, DT$

230 CLOSE #1
240 END

300 *MEM0

310 PRINT "AN ERROR HAS OCCURRED"
320 CLOSE #1

330 END

Declaration of protocol.
Request to zero the display.

To receive frie verification code <AK> from
the balance for the re-zero command.

If not <AK>, display the error message.
Reception of verification code <AK> for end­

ing 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

15, Connection to equipment

Page 56

Serial Interface

Advertising
This manual is related to the following products: