Force Single Coil (Function 5)

The Force Single Coil function can be used to write a digital output. The third digital output is written in this example. The digital outputs start at address 0x0000. The digital value is located in Data high. To switch the output on, Data high must contain the value 0xFF, while 0x00 is used to switch the output off again. Data low must contain the value 0x00.

Query

Byte Name

Example

Function code

5

Start address high

0

Start address low

2

Data high

255

Data low

0

The coupler answers with the same telegram.

Response

Byte Name

Example

Function code

5

Start address high

0

Start address low

2

Data high

255

Data low

0