Programming Of The Computer - Mitsubishi Electric FR-A5NR Instruction Manual

Transistorized inverter
Table of Contents

Advertisement

4.8 Programming of the Computer

(1) For full information on the communication protocols, whether communication operation is performed or
not, data format types, data formats, and data explanations, refer to the "Pr. 117 to Pr. 124" sections
of the inverter manual.
(2) Program example
When the operation mode is switched to computer link operation.
Program
Line number
10
OPEN"COM1:9600,E,8,2,HD"AS #1
20
COMST1,1,1:COMST1,2,1
30
ON COM(1)GOSUB*REC
40
COM(1)ON
50
D$="01FB10000"
60
S=0
70
FOR I=1 TO LEN(D$)
80
A$=MID$(D$,I,1)
90
A=ASC(A$)
100
S=S+A
110
NEXT I
120
D$=CHR$(&H5)+D$+RIGHT$(HEX$(S),2) : Addition of control and sum codes
130
PRINT#1,D$
140
GOTO 50
1000
*REC
1010
IF LOC(1)=0 THEN RETURN
1020
PRINT"RECEIVE DATA"
1030
PRINT INPUT$(LOC(1),#1)
1040
RETURN
Initial setting of I/O file
: Communication file opening
: Circuit control signal (RS, ER) ON/OFF setting
: Interrupt definition at data receive
: Interrupt enable
Transmission data setting
Sum code calculation
Data transmission
Interrupt data receive
: Interrupt occurrence at data receive
22
COMPUTER LINK FUNCTION

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents