Toshiba Tosvert RS485 Instruction Manual page 27

Rs485 communication function
Hide thumbs Also See for Tosvert RS485:
Table of Contents

Advertisement

Ex. 3 BASIC program for communication tests (RS232C, ASCII mode)
◊ Accessing a parameter (with error code.)
1) Examples of programs
100 INPUT "Baud rate=9600/4800/2400/1200";SPEED$
110 INPUT "Parity=even(E)/odd(O)";PARITY$
120 OPEN "COM1:"+SPEED$+","+PARITY$+",8,1"AS #1
130 INPUT "Send data";B$
140 PRINT #1,B$
150 C$=""
160 T=TIMER
170 COUNT=(TIMER-T)
180 IF COUNT >3 THEN 270
190 IF COUNT <0 THEN T=TIMER
200 IF LOC(1)= 0 THEN A$="":GOTO 220
210 A$=INPUT$(1,#1)
220 IF A$ <>CHR$(13) THEN 240
230 GOTO 290
240 IF A$="" THEN 160
250 C$=C$+A$
260 GOTO 160
270 COLOR @0,7:PRINT "!!! There is no data to return. !!! ";:COLOR @7,0:PRINT
280 GOTO 130
290 PRINT A$;
300 C$=C$+A$
310 PRINT "Return data=";c$;
320 GOTO 130
2) Examples of program execution results (In this example, the inverter number is 00.)
Baud rate=9600/4800/2400? 9600
Parity=even(E)/odd(O)? E
Send data? (00R0011)
Return data= (00R00111770)
Send data? ()
!!! There is no data to return. !!!
Send data? (R0011)
Return data= (R00111770)
Send data?
:
:
(Toshiba version of Advanced BASIC-86 Ver. 3.01.05J)
---- Selects a baud rate.
---- Selects parity.
---- Enters a command.
---- Prevents an increase in the number of digits.
---- Carriage return
(CR) to finish reading in.
---- Repeats.
---- Repeats.
---- Selects 9600 baud.
---- Select E (even parity).
---- Carries out test communication.
---- Error
---- No data is returned.
26
E6581315

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tosvert vf-as1 series

Table of Contents