# SimpleWriteValueFloat

## `SimpleWriteValueFloat` (FB)

`FUNCTION_BLOCK` SimpleWriteValueFloat

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2FnxADOHRlVhyNP2ydLKj0%2FSimpleWriteValueFloat.png?alt=media&#x26;token=b54f1d5a-24e6-4b33-9695-de7fea99cf87" alt=""><figcaption></figcaption></figure>

### Use of type conversion operators (e.g. INT\_TO\_REAL) 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:&#x20;

Use of an intermediate variable of the explicit type `REAL` 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                                               | Device address                                                                                                                                       |
| Input       | `InputValue`       | `__SYSTEM.AnyType`                |                                                 | Input variable (FC16) (`REAL`, `LREAL`)                                                                                                              |
| Input       | `rMultiplier`      | `REAL`                            | 1.0                                             | Multiplier for the input variable                                                                                                                    |
| 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      | `wRegisterAddrFb`  | `WORD`                            |                                                 | <p>Feedback - start address of the register for the Modbus<br>telegram</p>                                                                           |
| Output      | `eFormatFb`        | SIMPLE\_WRITE\_FORMAT\_CODE       |                                                 | Feedback - format of the floating-point number                                                                                                       |
| 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 | `lrDevMinus_64Bit` | `LREAL`                           | 0.0                                             | <p>Maximum negative value change before triggering a<br>transmission (64 bit)</p>                                                                    |
| Input Const | `lrDevPlus_64Bit`  | `LREAL`                           | 0.0                                             | <p>Maximum positive value change before triggering a<br>transmission (64 bit)</p>                                                                    |
| Input Const | `rDevMinus_32Bit`  | `REAL`                            | 0.0                                             | <p>Maximum negative value change before triggering a<br>transmission (32 bit)</p>                                                                    |
| Input Const | `rDevPlus_32Bit`   | `REAL`                            | 0.0                                             | <p>Maximum positive value change before triggering a<br>transmission (32 bit)</p>                                                                    |
| Input Const | `xSwapValue`       | `BOOL`                            | TRUE                                            | <p>Enable / disable swapping the byte positions of a register<br>(16 bit) (only relevant for 32 / 64 bit)</p>                                        |
| Input Const | `xBigEndian`       | `BOOL`                            | TRUE                                            | <p>Position of the most significant 8 bits in a datum (only<br>relevant for 32 / 64 bit)</p>                                                         |
| Input Const | `eFormat`          | SIMPLE\_WRITE\_FORMAT\_CODE       | SIMPLE\_WRITE\_FORMAT\_CODE.IEEE754\_32BIT      | <p>FALSE = most significant 8 bits are sent last // TRUE = most significant 8 bits are sent first<br>Format of the floating-point number</p>         |
| Input Const | `wRegisterAddr`    | `WORD`                            |                                                 | Start address of the register for the Modbus telegram                                                                                                |
| Input Const | `tTimeUpdateSetp`  | `TIME`                            | TIME#0ms                                        | <p>Update interval for the processes that are influenced by the input<br><code>xUpdateSetp</code> affected</p>                                       |
