Toshiba Tosvert RS485 Instruction Manual page 26

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

Advertisement

Ex. 2: BASIC program for executing an input command with checksum (RS232C, ASCII mode)
◊ Checking if the maximum frequency setting has been changed correctly
1) Examples of programs
10 OPEN "COM1:9600,E,8,1" AS #1
20 INPUT"Send Data=";A$
30 S$="("+A$+"&"
40 S=0
50 L=LEN(S$)
60 FOR I=1 TO L
70 S=S+ASC(MID$(S$,I,1))
80 NEXT I
90 CHS$=RIGHT$(HEX$(S),2)
100 PRINT #1,"("+A$+"&"+CHS$+")"
110 INPUT #1,B$
120 PRINT "Receive data= ";B$
130 GOTO 20
2) Examples of program execution results
Send Data=? R0011
Receive Data= (R00111F40&3D)
Send Data=? W00111770
Receive Data= (W00111770&36)
Send Data=? R0011
Receive Data= (R00111770&31)
(Toshiba version of Advanced BASIC-86 Ver. 3.01.05J)
--- 9600 baud, even parity, 8-bit length, 1 stop bit
--- Reads in data to be sent to the inverter.
--- Adds "(" and "&" to the read data in.
Calculates the number of bits (checksum).
--- Sends the data including the checksum result
to the inverter.
--- Receives data returned from the inverter.
--- Displays the data received.
--- Repeats.
--- Reads the maximum frequency (0011).
--- 1F40 (Maximum frequency: 80 Hz)
--- Changes the maximum frequency to 60 Hz
(1770).
--- Reads the maximum frequency (0011).
--- 1770 (Maximum frequency: 60 Hz)
25
E6581315

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tosvert vf-as1 series

Table of Contents