Code 05 - Write A Single Coil; Write A Single Coil Example - Request - Siemens SIMATIC TI500 User Manual

Tiway 1
Hide thumbs Also See for SIMATIC TI500:
Table of Contents

Advertisement

Modbus Function Descriptions (continued)
Code 05 — Write a
Single Coil
WARNING
!
C-12
Modbus Commands
Code 05 allows a designated coil [discrete output Y or C, depending on the
position of Switch 10 on the network dipswitches] to be written. Depending
on the code passed in the data field, it can be changed to On (1) or Off (0),
forced On or Off, or unforced. The two-byte codes are the following.
FF00 (hex)
. . . . . . . . . .
0000 (hex)
. . . . . . . . . . .
NOTE: All other values are illegal and will result in error response 03.
Where the Broadcast address (00) is used, the Gateway will send the change
coil command to all attached secondaries.
[This command is comparable to Primitive 30, using TT-type 4 (Y coils) or
type 5 (Cs).]
Because of differences in memory mapping between Modbus PLCs
and SIMATIC TI PLCs, you should be quite certain of the effects of
the broadcast command before issuing it.
Example:
Request:
07 05 0064 FF00 XXXX
Figure C-13 Write a Single Coil Example — Request
This request to secondary 7 is asking for coil 0064 (100 decimal) to be
changed to the on state.
ON
OFF
Checksum (XXXX)
OFF/ON code (FF00 = On)
Coil address (0064)
Function code (05)
Slave address (07)
TIWAY I Gateway User Manual
I000000

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents