231
V530-R160
Operation Manual
SE
C
T
IO
N
8
Serial Interf
ac
e (Norma
l)
SECTION 8
Communication with the Host
Program Examples
This is a program in which a read command is sent from the programmable controller (model
CQM1H) and the data read by the controller is received by the CQM1H.
1.
Set the reading conditions of the V530-R160 and set the reading mode to
RUN
mode.
2.
Send the read command from the programmable controller.
The controller performs reading.
The data received at the CQM1H is saved starting from DM0200.
DIFU
(13)
50.00
000001
000000
000002
000003
000004
0.01
TXD
(48)
DM100
0
3
50.00
BSET
(71)
0000
DM200
DM220
RXD
(47)
DM200
0000
AR9
END
(01)
AR8.06*
000005
Programming to receive read data
Programming to send read command
Sample ladder program
END: The end of the program.
*AR8.06: RS-232C port reception completed flag
Switch
(Executed only
once.)
Upward Differentiation
DIFU: Turns ON the work bit for 1 scan when the
logic result goes from OFF to ON.
Sends @GL command.
TXD:
TRANSMIT
Sends the specified number of bytes from
the specified port.
DM100: First source word
#0:
Control data
#3:
Number of bytes sent
Clears DM200 to DM220.
BEST: BLOCK SET
Sets consecutive words to the same value.
Sets DM200 to DM220 to #0000.
Stores the read data in order from DM200.
RXD: RECEIVE
Reads the specified number of bytes from
the data received at the specified port.
DM200: First destination word
#0000: Control data
AR9:
Number of bytes received