MPCIB 396 P6
mect s.r.l.
ME3025_13 03/21
39
5.8 BASIC PROGRAM
The following basic program shows the reading of the set-point of an instrument by
an host computer. Set up baud rate = 9600 and address = 01 for the functioning of
the program.
on error goto 20
cls
open “com1: 9600, n, 8, 1” for random as #1
print #1, chr$(4) + “0” + “0” + “1” + “1” + “R” + “O” + chr$(5)
print “waiting for answer …”
cls
a$ = input$(13, #1)
b$ = mid $(a$, 5, 7)
print
print “read : “;b$
end
20 print “no answer”
resume