Chapter 6 FBD Block Diagram Programming 200
MU mode4: Read Coils
S
etting communication address is constant:
←
slave ID
←
Register address
←
Saving data address
S
etting communication address is data register DR:
←
slave ID
←
Register address
←
Saving data address
Address is constant 32 (hex: 0020),
Data length is fixed at 16 (hex: 10H, 1word),
Send data:
01 01 00 20 00 10 CRC16;
R
eceived response from slave1:
01 01 02 data1 data2 CRC16;
Saving data to DRE0: DRE0 = data1~2
Setting address DR03=0001,
Setting data length R04=0015 (hex: 000F);
Send data:
01 01 00 01 00 0F CRC16;
R
eceived response from slave1:
01 01 02 data1 data2 CRC16;
Saving data to DRE0: DRE0 = data1~2
※ the max length of data is 400.