Siemens SIMOCODE pro Function Manual page 100

Industrial controls, motor management and control devices, communication
Hide thumbs Also See for SIMOCODE pro:
Table of Contents

Advertisement

Communication
2.3 Modbus communication
Function codes 01 - Read Coils and 02 - Read Discrete Inputs
Function
These functions enable the Modbus master system to read individual bits from the
SIMOCODE pro bit memory area.
Functions codes 01 and 02 behave in the same way here and supply an identical feedback
signal. A valid offset from the bit memory area is expected as the start address. Up to
2000 bits can be read per frame.
If a number that is not equal to a multiple of eight bits is called up, the remaining bits are
filled with zeros. The number of bytes n always refers to the number of fully returned bytes.
Note
Start address and number of coils
The start address and the number of coils must be within the valid range.
Request message frame
Slave address
1 byte
Response message frame
Slave address
1 byte
Example
Reading in of the SIMOCODE pro device statuses from slave number 16. The device
statuses start from offset 0x1C08 and are 16 bits in length.
Request message frame
Slave address
1 byte
0x10
Response message frame
Slave address
1 byte
0x10
100
Function code
Start address
1 byte
2 bytes
Function code
Number of bytes n Bit status
1 byte
1 byte
Function code
Start address
1 byte
2 bytes
0x01
0x1C08
Function code
Number of bytes n Bit status
1 byte
1 byte
0x01
0x02
Number of bits
2 bytes
n bytes
Number of bits
2 bytes
0x000F
2 bytes
0x3C08
SIMOCODE pro - Communication
Function Manual, 11/2018, A5E40508495002A/RS-AC/003
CRC
2 bytes
CRC
2 bytes
CRC
2 bytes
0x....
CRC
2 bytes
0x....

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents