Communication
2.3 Modbus communication
SIMOCODE pro - Communication
104
Function Manual, 11/2018, A5E40508495002A/RS-AC/003
Function code 15 - Write Multiple Coils
Function
This function enables the Modbus master system to write several bits from the
SIMOCODE pro bit memory area.
A valid address from the bit memory area is expected as the start address. The selected
address must be designated as writable (see the tables in Section Modbus RTU data tables
(Page 277), "Access" column).
When writing several bits, they must be marked as a "writable" coherent block. A bit area
that is interrupted by read-only bits cannot be written to as a block.
Request message frame
Slave address Function code Start address Number of bits Number of bytes Data
CRC
1 byte
1 byte
2 bytes
2 bytes
n bytes
n bytes 2 bytes
Response message frame
Slave address
Function code
Start address
Number of bits
CRC
1 byte
1 byte
2 bytes
2 bytes
2 bytes
Example
Several output bits in the area of the PIQ (process image output) of the SIMOCODE pro with
slave address 16 are to be written via Modbus. Using these bits, the motor is usually
switched on and off, "Remote/Manual" mode selected, or a reset command output.
In the case shown, the motor is to be started and "Remote" mode activated for a
SIMOCODE device operated as a direct-on-line starter (see Chapter "Example circuits" in
the manual SIMOCODE pro - application examples
https://support.industry.siemens.com/cs/ww/en/view/109743959
Offset
Meaning
State
0x0001
Motor off
0
0x0002
Motor on
1
0x0003
Test function
0
0x0004
Emergency start
0
0x0005
Remote
1
Value to be transferred: 00010010b = 0x12
Request message frame
Slave address Function code Start address Number of bits Bytes Data
CRC
1 byte
1 byte
2 bytes
2 bytes
1 byte n bytes
2 bytes
0x10
0x0F
0x0001
0x0005
0x01
0x12
0x....
Response message frame
Slave address
Function code
Start address
Number of bits
CRC
1 byte
1 byte
2 bytes
2 bytes
2 bytes
0x10
0x0F
0x0001
0x0005
0x....