# SimpleWriteCoils\_FC15

## `SimpleWriteCoils_FC15` (FB)

`FUNCTION_BLOCK` SimpleWriteCoils\_FC15

### Darstellung

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

### **Übertragung der Zustände eines oder mehrerer Coils (FC15) (1 - 64 Coils) an einen Adressbereich (Bereich: wCoilAddr … (wCoilAddr + wNumberOfCoils - 1))**

### CODESYS

InOut:

| Scope       | Name                         | Type                                    | Initial                                              | Comment                                                                                                                                                                                                                                                 |
| ----------- | ---------------------------- | --------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Input       | `xEn`                        | `BOOL`                                  | TRUE                                                 | Freigabe / Sperrung der Kommunikation (TRUE = Freigabe)                                                                                                                                                                                                 |
| Input       | `byUnitId`                   | `BYTE`                                  | 0                                                    | Adresse des Geräts                                                                                                                                                                                                                                      |
| Input       | `InputValue`                 | `__SYSTEM.AnyType`                      |                                                      | Eingangsvariable zur Bestimmung der Zustände der Coils (FC15) (`BOOL`, `BYTE`, `ARRAY` `OF` `BOOL`, `ARRAY` `OF` `BYTE`)                                                                                                                                |
| Input       | `xUpdateSetp`                | `BOOL`                                  | FALSE                                                | Aktualisierung der Sollwerte (bei jeder ansteigenden Flanke)                                                                                                                                                                                            |
| Input       | `xResError`                  | `BOOL`                                  | FALSE                                                | <p>Reinitialisierung der Ausgänge <code>eErrorCodeCom</code> bzw.<br><code>eErrorCodeDev</code> auf den fehlerfreien Zustand (bei jeder<br>ansteigenden Flanke)</p>                                                                                     |
| Inout       | `ModbusClient`               | `ModbusClientBase`                      |                                                      | Client des Geräts                                                                                                                                                                                                                                       |
| Output      | `wCoilAddrFb`                | `WORD`                                  | 0                                                    | <p>Rückmeldung - Start-Adresse des/der Coils für das Modbus-<br>Telegramm (0 - 65535)</p>                                                                                                                                                               |
| Output      | `wNumberOfCoilsFb`           | `WORD`                                  | 0                                                    | <p>Rückmeldung - Anzahl der zu schreibenden Coils (Bereich: 1<br>- 64, wNumberOfCoils <= InputValue.diSize)</p>                                                                                                                                         |
| Output      | `wArrayStartIndexFb`         | `WORD`                                  | 0                                                    | <p>Rückmeldung - Relatives Array-Element mit dem ersten zu<br>schreibenden Coil (0 - (InputValue.diSize-1)) (nur für den<br>Datentyp <code>ARRAY</code> <code>OF</code> <code>BOOL</code> und <code>ARRAY</code> <code>OF</code> <code>BYTE</code>)</p> |
| Output      | `eInputValueDataType`        | SIMPLE\_WRITE\_COILS\_FC15\_DATA\_TYPE  | SIMPLE\_WRITE\_COILS\_FC15\_DATA\_TYPE.INVALID\_TYPE | <p>Interne Klassifizierung des Datentyps der Variable mit den<br>Zuständen der Coils (0 = ungültig, 1 = <code>BOOL</code>, 2 = <code>BYTE</code>, 3 =<br><code>ARRAY</code>)</p>                                                                        |
| Output      | `xInputValueValid`           | `BOOL`                                  | FALSE                                                | <p>Gültigkeit der Variable am Eingang <code>InputValue</code> (FALSE =<br>nicht gültig, TRUE = gültig)</p>                                                                                                                                              |
| Output      | `xErrorFreeDataTransmission` | `BOOL`                                  | FALSE                                                | <p>Status der Übertragung der Daten (FALSE = fehlerhaft, LH-<br>Übergang = fehlerfrei)</p>                                                                                                                                                              |
| Output      | `xAlarm`                     | `BOOL`                                  | FALSE                                                | Sammelstörung (TRUE = Störung)                                                                                                                                                                                                                          |
| Output      | `xAlarmCom`                  | `BOOL`                                  | FALSE                                                | Sammelstörung - Kommunikation (TRUE = Störung)                                                                                                                                                                                                          |
| Output      | `eErrorCodeCom`              | ModbusErrorCode                         | ModbusErrorCode.NO\_ERROR                            | Fehlercode - Kommunikation (0 = kein Fehler)                                                                                                                                                                                                            |
| Output      | `eErrorCodeDev`              | SIMPLE\_WRITE\_COILS\_FC15\_ERROR\_CODE | SIMPLE\_WRITE\_COILS\_FC15\_ERROR\_CODE.NO\_ERROR    | Fehlercode - Gerät (0 = kein Fehler)                                                                                                                                                                                                                    |
| Output      | `xBusy`                      | `BOOL`                                  | FALSE                                                | Kommunikationsanzeige (TRUE = Kommunikation)                                                                                                                                                                                                            |
| Input Const | `wArrayStartIndex`           | `WORD`                                  | 0                                                    | <p>Relatives Array-Element mit dem ersten zu schreibenden Coil<br>(0 - (InputValue.diSize-1)) (nur für den Datentyp <code>ARRAY</code> <code>OF</code><br><code>BOOL</code> und <code>ARRAY</code> <code>OF</code> <code>BYTE</code>)</p>               |
| Input Const | `wNumberOfCoils`             | `WORD`                                  | 1                                                    | <p>Anzahl der zu schreibenden Coils (Bereich: 1 - 64,<br>wNumberOfCoils <= InputValue.diSize)</p>                                                                                                                                                       |
| Input Const | `wCoilAddr`                  | `WORD`                                  | 1                                                    | <p>Start-Adresse des/der Coils für das Modbus-Telegramm (0 -<br>65535)</p>                                                                                                                                                                              |
| Input Const | `tTimeUpdateSetp`            | `TIME`                                  | TIME#0ms                                             | <p>Updateintervall für die Vorgänge, die durch den Eingang<br><code>xUpdateSetp</code> beeinflusst werden</p>                                                                                                                                           |


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
