Communication operation and setting
Instructions for the program
When data from the computer has any error, the inverter does not accept that error. Hence, in
the user program, always insert a retry program for data error.
All data communication, e.g. run command or monitoring, are started when the computer gives
a communication request. The inverter does not return any data without the computer's request.
Hence, design the program so that the computer gives a data read request for monitoring, etc.
as required.
Program example
To change the operation mode to computer link operation:
Line number
10
20
30
40
50
60
70
80
90
100
110
120
130
140
1000
1010
1020
1030
1040
Fig. 6-164: Program example
Fig. 6-165: General flow
6 - 278
OPEN"COM1: 9600,E,8,2,HD"AS#1
COMST1, 1, 1: COMST1, 2, 1
ON COM(1)GOSUB*REC
COM(1)ON
D$="01FB10002"
S=0
FOR I=1 TO LEN(D$)
A$=MID$(D$, I, 1)
A=ASC(A$)
S=S+A
NEXT I
D$=CHR$(&H5)+D$+RIGHT$(HEX$(S), 2)
PRINT#1, D$
GOTO 50
*REC
IF LOC (1)=0 THEN RETURN
PRINT"RECEIVE DATA"
PRINT INPUT$(LOC(1), #1)
RETURN
Line number
10
Initial setting
of I/O file
40
50
Send data processing
Data setting
Sum code calculation
Data send
140
Initial setting of I/O file
Communication file open
Circuit control signal (RS, ER) ON/OFF
setting
Interrupt definition at data receive
Interrupt enable
Send data setting
Sum code calculation
Addition of control code and sum code
Data transmission
Interrupt data receive
1000
Receive data
processing
Interrupt
Data import
Screen display
1040
Parameter
fr-epb28