> For the complete documentation index, see [llms.txt](https://support.powerio.com/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.powerio.com/hub/codesys-hvac/en/hvac-modbus-library/functionblocks/generic/simplewritecoil_fc05.md).

# SimpleWriteCoil\_FC05

## `SimpleWriteCoil_FC05` (FB)

`FUNCTION_BLOCK` SimpleWriteCoil\_FC05

### Representation

<figure><img src="/files/fab153628c32107b3c2f8f32489257ce123d3c66" alt=""><figcaption></figcaption></figure>

### **Transmission of the state of a coil (FC05) to an address (wCoilAddr)**

### CODESYS

InOut:

| Scope       | Name                         | Type                                   | Initial                                              | Comment                                                                                                                                                   |
| ----------- | ---------------------------- | -------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Input       | `xEn`                        | `BOOL`                                 | TRUE                                                 | Enable / disable communication (TRUE = enable)                                                                                                            |
| Input       | `byUnitId`                   | `BYTE`                                 | 0                                                    | Device address                                                                                                                                            |
| Input       | `InputValue`                 | `__SYSTEM.AnyType`                     |                                                      | Input variable for determining the state of the coil (FC05) (`BOOL`, `BYTE`)                                                                              |
| Input       | `xUpdateSetp`                | `BOOL`                                 | FALSE                                                | Update of setpoints (on every rising edge)                                                                                                                |
| Input       | `xResError`                  | `BOOL`                                 | FALSE                                                | <p>Reinitialization of the outputs <code>eErrorCodeCom</code> or<br><code>eErrorCodeDev</code> to the error-free state (on every<br>rising edge)</p>      |
| Inout       | `ModbusClient`               | `ModbusClientBase`                     |                                                      | Client of the device                                                                                                                                      |
| Output      | `wCoilAddrFb`                | `WORD`                                 |                                                      | Feedback - address of the coil for the Modbus telegram (FC05) (0 - 65535)                                                                                 |
| Output      | `eInputValueDataType`        | SIMPLE\_WRITE\_COILS\_FC05\_DATA\_TYPE | SIMPLE\_WRITE\_COILS\_FC05\_DATA\_TYPE.INVALID\_TYPE | <p>Internal classification of the data type of the variable with the<br>state of the coil (0 = invalid, 1 = <code>BOOL</code>, 2 = <code>BYTE</code>)</p> |
| Output      | `xInputValueValid`           | `BOOL`                                 | FALSE                                                | <p>Validity of the variable at the input <code>InputValue</code> (FALSE =<br>invalid, TRUE = valid)</p>                                                   |
| Output      | `xErrorFreeDataTransmission` | `BOOL`                                 | FALSE                                                | <p>Status of the data transmission (FALSE = faulty, LH-<br>transition = error-free)</p>                                                                   |
| Output      | `xAlarm`                     | `BOOL`                                 |                                                      | Collective fault (TRUE = fault)                                                                                                                           |
| Output      | `xAlarmCom`                  | `BOOL`                                 |                                                      | Collective fault - communication (TRUE = fault)                                                                                                           |
| Output      | `eErrorCodeCom`              | ModbusErrorCode                        |                                                      | Error code - communication (0 = no error)                                                                                                                 |
| Output      | `eErrorCodeDev`              | SIMPLE\_WRITE\_COIL\_ERROR\_CODE       |                                                      | Error code - device (0 = no error)                                                                                                                        |
| Output      | `xBusy`                      | `BOOL`                                 |                                                      | Communication indicator (TRUE = communication)                                                                                                            |
| Input Const | `wCoilAddr`                  | `WORD`                                 |                                                      | <p>Address of the coil for the Modbus telegram (FC05) (0 -<br>65535)</p>                                                                                  |
| Input Const | `tTimeUpdateSetp`            | `TIME`                                 | TIME#0ms                                             | <p>Update interval for the processes influenced by the input<br><code>xUpdateSetp</code> influenced</p>                                                   |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-modbus-library/functionblocks/generic/simplewritecoil_fc05.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
