Mitsubishi MELSEC-Q EQ-V680D1 User Manual page 142

Rfid interface module
Table of Contents

Advertisement

6. HOW TO COMMUNICATE WITH ID TAGS
ID tag read processing
M1010
Read ID Tag
command
ID tag write processing
M1020
Write to
ID Tag
command
ID instruction complete processing
X4
CH1 ID
instruction
complete
ID instruction error processing
X5
CH1 error
detection
End processing
X4
CH1 ID
instruction
complete
X5
CH1 error
Read ID Tag
detection
command
Write to ID
Tag command
6 - 74
(5) Program example
X0
X2
X3
Module
CH1
CH1 ID
ready
communication
ID-BUSY
complete
X0
X2
X3
Module
CH1 ID
CH1
communication
ready
ID-BUSY
complete
X0
M1010
Module
Read ID Tag
ready
command
M1020
Write to ID
Tag command
X0
Module
ready
Add the processing when the status is abnormal upon ID instruction execution.
M1010
M1020
X4
X5
CH1 error
CH1 ID
instruction
detection
complete
X4
X5
CH1 ID
CH1 error
instruction
detection
complete
BMOVP
BMOV
Add the processing when reading ends normally.
Add the processing when writing ends normally.
U0\
MOVP
H0
G0
CH1 command
code specification
U0\
MOVP
H0
G1
CH1
communication
specification
U0\
MOVP
H0
G2
CH1 processing
specification
U0\
MOVP
K10
G3
CH1 head address
specification
U0\
MOVP
K8
G4
CH1 number of
processed points
specification
SET
Y14
CH1 ID instruction
execution request
U0\
MOVP
H1
G0
CH1 command
code specification
U0\
MOVP
H0
G1
CH1
communication
specification
U0\
MOVP
H0
G2
CH1 processing
specification
U0\
MOVP
K20
G3
CH1 head address
specification
U0\
MOVP
K8
G4
CH1 number of
processed points
specification
U0\
D2300
G100
K4
CH1 data
Write data
storage
SET
Y14
CH1 ID instruction
execution request
U0\
D1200
K4
G100
CH1 data
Read data
storage
U0\
MOV
G41
D1020
CH1 error
ID instruction
details storage
error code
RST
Y14
CH1 ID instruction
execution request
RST
M1010
Read ID Tag
command
RST
M1020
Write to ID
Tag command
Set CH1 command code
specification in "read"
(setting value = 0).
Set CH1 communication
specification in "trigger"
(setting value = 0).
Set CH1 processing
specification (data storage
order) in "upper -> lower"
(setting value = 0).
Set "10" in the head address
specification for the ID tag to
read CH1 data.
Set the CH1 data reading size
to "8 bytes" in the number of
processing points specification.
Execute CH1 ID instruction
(Read command).
Set CH1 command code
specification in "write"
(setting value = 1).
Set CH1 communication
specification in "trigger"
(setting value = 0).
Set CH1 processing
specification (data storage
order) in "upper -> lower"
(setting value = 0).
Set "20" in the head address
specification for the ID tag to
write CH1 data.
Set the CH1 data writing size
to "8 bytes" in the number of
processing points
specification.
Transfer the data written in the
data register D2300 to D2303
to CH1 data storage area.
Execute CH1 ID instruction
(Read command).
Specify the number of
points to transfer in words
(8 bytes -> 4 words).
Transfer the data read from
CH1 data storage area to the
data register D1200 to D1203.
Specify the number of
points to transfer in words
(8 bytes -> 4 words).
When an error occurs with CH1,
transfer the number of error
details from the storage area to
the data register D1020.
Turn off CH1 ID instruction
request when the ID instruction
execution is completed.
Turn off the Read ID Tag
command signal.
Turn off the Write to ID
Tag command signal.
6 - 74

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-q eq-v680d2

Table of Contents