*READMB2
ch, ID, addr, var, count {* Applicable only to M+PLC with firmware r44 or higher}Purpose | Think of this as the
multi-word version of READMODBUS command. Unlike the READMODBUS command which is a
function that returns a single 16-bit word, this command is implemented as a statement so
that multiple words of data can be stored into the PLC internal memory .
|
||||||||||
Examples | READMB2 3,5,101,DM[10],8 | ||||||||||
Comments | The PLC will use MODBUS
ASCII protocol, via its Comm port #3, to query the slave MODBUS device with ID = 05 and
ask for 8 words of data starting from register offset address 101 (in MODBUS term this
refer to the #40102 holding register) . Once it receives the returned data these 8 words
will be stored in the memory locations: DM[10], DM[11],
..DM[17]. This command automatically checks the response string received from
the slave device for the correct slave address and LRC (or CRC16 RTU protocol is used).
Like READMODBUS command, the status of this operation can be checked by the user program
by testing the STATUS(2) function. |
||||||||||
See Also | WRITEMB2, STATUS(2) |