Chapter 16 PLC Function ApplicationsC2000-HS
16-126
API
CANRX
S1 S2 S3
D
Read CANopen slave station data
261
P
Bit device Word device
16-bit command (9 STEP)
CANRX Continuous
execution type
CANRX
P
Pulse
execution type
32-bit command
- - - -
Flag signal
X Y M K H KnX KnY KnM T C D
S1 * *
S2 * *
S3 * *
D * * *
Notes on operand usage: none
S1
: Slave station number.
S2
: Main index..
S3
: Subindex+bit length.
D
: Preset address.
The CANRX command can read the index of the corresponding slave station.
When it is executed, it will send the SDO message format to the slave station.
M1066 and M1067 will both be 0 at that time, and M1066 will be set as 1 after
reading. If the slave station gives the correct response, it will write the value to the
preset register, and set M1067 as 1. If the slave station has a response error,
M1067 will be set as 0, and an error message will be recorded to D1076 to
D1079.
M1002: When the PLC runs, the command will be triggered once and will set
K4M400 = K1
Afterwards, each time M1066 is 1, it will switch to a different message.