> 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/simplewritevalueint.md).

# SimpleWriteValueInt

## `SimpleWriteValueInt` (FB)

`FUNCTION_BLOCK` SimpleWriteValueInt

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2FTW5bFY4SuR1nQp1wVVIQ%2FSimpleWriteValueInt.png?alt=media&amp;token=47fabe37-05c1-4f62-ae62-e2abaa8fbe12" alt=""><figcaption></figcaption></figure>

### Use of type conversion operators (e.g. REAL\_TO\_INT) directly at the input `InputValue`

In this configuration, compiler error messages of type C0032 are generated, a download is not possible.

{% hint style="info" %}
Remedy:

Use of an intermediate variable of an explicit type `INT` directly at the output of the type conversion operator. Connection of the intermediate variable at the input `InputValue`.
{% endhint %}

### CODESYS

InOut:

| Scope       | Name              | Type                              | Initial                                         | Comment                                                                                                                                                                                          |
| ----------- | ----------------- | --------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Input       | `xEn`             | `BOOL`                            | TRUE                                            | Enable / disable communication (TRUE = enable)                                                                                                                                                   |
| Input       | `byUnitId`        | `BYTE`                            | 0                                               | Address of the device                                                                                                                                                                            |
| Input       | `InputValue`      | `__SYSTEM.AnyType`                |                                                 | <p>Input variable (FC06, FC16) (<code>USINT</code>, <code>UINT</code>, <code>UDINT</code>, <code>ULINT</code>,<br><code>SINT</code>, <code>INT</code>, <code>DINT</code>, <code>LINT</code>)</p> |
| 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      | `eFunctionCodeFb` | WriteFunctionCodesInt             |                                                 | Response - Modbus function code for the Modbus telegram                                                                                                                                          |
| Output      | `wRegisterAddrFb` | `WORD`                            |                                                 | <p>Feedback - Start address of the register for the Modbus-<br>message</p>                                                                                                                       |
| Output      | `eTypeInputValue` | SIMPLE\_WRITE\_VALUE\_TYPE\_CODE  | SIMPLE\_WRITE\_VALUE\_TYPE\_CODE.STATE\_INVALID | State of the sign of the value at the input `InputValue`                                                                                                                                         |
| 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\_VALUE\_ERROR\_CODE |                                                 | Error code - device (0 = no error)                                                                                                                                                               |
| Output      | `xBusy`           | `BOOL`                            |                                                 | Communication indicator (TRUE = communication)                                                                                                                                                   |
| Input Const | `xSwapValue`      | `BOOL`                            | TRUE                                            | Enable / disable swapping the byte order of a register (16 bit) (only relevant for 32 / 64 bit)                                                                                                  |
| Input Const | `xBigEndian`      | `BOOL`                            | TRUE                                            | Position of the most significant 8 bits in a datum (only relevant for 32 / 64 bit)                                                                                                               |
| Input Const | `eFunctionCode`   | WriteFunctionCodesInt             | WriteFunctionCodesInt.FC06\_WriteSingleRegister | <p>FALSE = least significant 8 bits are sent last // TRUE = most significant 8 bits are sent first<br>Modbus function code for the Modbus telegram</p>                                           |
| Input Const | `wRegisterAddr`   | `WORD`                            |                                                 | Start address of the register for the Modbus message                                                                                                                                             |
| Input Const | `tTimeUpdateSetp` | `TIME`                            | TIME#0ms                                        | <p>Update interval for the operations that are 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
