> 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-modbusio2-lib/funktionsbausteine/h1_4di2dor_3p.md).

# H1\_4DI2DOR\_3P

## `H1_4DI2DOR_3P` (FB)

FUNCTION\_BLOCK H1\_4DI2DOR\_3P EXTENDS SlaveModuleDipSwitchOverwrite IMPLEMENTS ISlaveModule

InOut:

| Scope       | Name                                     | Type             | Initial      | Comment                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Inherited from                |
| ----------- | ---------------------------------------- | ---------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| Input       | `itfModbusConnector`                     | IModbusConnector |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BaseSlave                     |
| Output      | `xInitRunning`                           | `BOOL`           |              | <p><code>xInitRunning</code> is <code>TRUE</code>, as long as initialization<br>is performed during the first start.</p>                                                                                                                                                                                                                                                                                                                                                                                 | BaseSlave                     |
| Output      | `xInitFinished`                          | `BOOL`           |              | `xInitFinished` is `TRUE`, as soon as all parameters have been sent to the module during the first start.                                                                                                                                                                                                                                                                                                                                                                                                | BaseSlave                     |
| Output      | `xAlarmCom`                              | `BOOL`           |              | <p><code>xAlarmCom</code> is <code>TRUE</code>, if there is a<br>communication error.</p>                                                                                                                                                                                                                                                                                                                                                                                                                | BaseSlave                     |
| Output      | `xBusy`                                  | `BOOL`           |              | `xBusy` is `TRUE`, when a Modbus request is executed.                                                                                                                                                                                                                                                                                                                                                                                                                                                    | BaseSlave                     |
| Output      | `usiConfiguredSlaveID`                   | `USINT`          |              | Displays the currently set slave ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | BaseSlave                     |
| Output      | `eError`                                 | ERROR            |              | No error = `ERROR.No_Error`                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BaseSlave                     |
| Output      | `stDebugOutput`                          | DebugOutput      |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BaseSlave                     |
| Input       | `xEnable`                                | `BOOL`           | TRUE         | <p>Deactivates the module and resets all outputs to the<br>standard initialization value</p>                                                                                                                                                                                                                                                                                                                                                                                                             | BaseSlaveModule               |
| Input       | `xReinitModule`                          | `BOOL`           |              | <p>Reinitializes the module and sends all parameters to the<br>module</p>                                                                                                                                                                                                                                                                                                                                                                                                                                | BaseSlaveModule               |
| Input       | `xResetModule`                           | `BOOL`           |              | <p>Resets the module, clears the EEPROM memory, performs<br>a lamp test and restarts the module (Caution:<br>Autobauding is then enabled again)</p>                                                                                                                                                                                                                                                                                                                                                      | BaseSlaveModule               |
| Output      | `wFirmware`                              | `WORD`           |              | Displays the module's current firmware                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BaseSlaveModule               |
| Output      | `xAuto`                                  | `BOOL`           |              | <p><code>FALSE</code> = At least one input and/or one output is<br>in the state <code>eManBin <> eManBin.Auto</code>. <code>TRUE</code> = All<br>inputs and outputs have the state eManBin =<br>eManBin.Auto (Note: If overriding via DIP-<br>switch (hardware) is disabled and the output is in the<br>state <code>eManBin <> eManBin.Auto</code>, xAuto remains<br><code>TRUE</code>. Evaluation is done for each output. )</p>                                                                        | BaseSlaveModule               |
| Output      | `xAutoSoftware`                          | `BOOL`           |              | <p><code>FALSE</code> = At least one input and/or output is<br>in the state via parameter (software) <code>eManBin <>\<br/>eManBin.Auto</code>. <code>TRUE</code> = All inputs and outputs are<br>in the state via parameter (software) <code>eManBin =\<br/>eManBin.Auto</code>.</p>                                                                                                                                                                                                                    | SlaveModuleSoftOverwrite      |
| Output      | `xAutoHardware`                          | `BOOL`           |              | <p><code>FALSE</code> = At least one input and/or output is<br>in the state via DIP switch (hardware) <code>eManBin <>\<br/>eManBin.Auto</code>. <code>TRUE</code> = All inputs and outputs are<br>in the state via DIP switch (hardware) <code>eManBin =\<br/>eManBin.Auto</code>. (Note: If overriding via DIP-<br>switch (hardware) is disabled and the output is in the<br>state <code>eManBin <> eManBin.Auto</code>, xAuto remains<br><code>TRUE</code>. Evaluation is done for each output. )</p> | SlaveModuleDipSwitchOverwrite |
| Input Const | `eDI4_ManBin`                            | eManBin          | eManBin.Auto | Manual override of the digital input                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                               |
| Input Const | `xDI4Negation`                           | `BOOL`           | FALSE        | Negation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                               |
| Input Const | `xDI4_ACVoltageMode`                     | `BOOL`           |              | <p><code>TRUE</code> = Activates a delay of the input with the<br>defined value of <code>tACModeInputVoltageDelay</code>. <code>FALSE</code><br>= No delay</p>                                                                                                                                                                                                                                                                                                                                           |                               |
| Input Const | `eDI3_ManBin`                            | eManBin          | eManBin.Auto | Manual override of the digital input                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                               |
| Input Const | `xDI3Negation`                           | `BOOL`           | FALSE        | Negation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                               |
| Input Const | `xDI3_ACVoltageMode`                     | `BOOL`           |              | <p><code>TRUE</code> = Activates a delay of the input with the<br>defined value of <code>tACModeInputVoltageDelay</code>. <code>FALSE</code><br>= No delay</p>                                                                                                                                                                                                                                                                                                                                           |                               |
| Input Const | `eDI2_ManBin`                            | eManBin          | eManBin.Auto | Manual override of the digital input                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                               |
| Input Const | `xDI2Negation`                           | `BOOL`           | FALSE        | Negation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                               |
| Input Const | `xDI2_ACVoltageMode`                     | `BOOL`           |              | <p><code>TRUE</code> = Activates a delay of the input with the<br>defined value of <code>tACModeInputVoltageDelay</code>. <code>FALSE</code><br>= No delay</p>                                                                                                                                                                                                                                                                                                                                           |                               |
| Input Const | `eDI1_ManBin`                            | eManBin          | eManBin.Auto | Manual override of the digital input                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                               |
| Input Const | `xDI1Negation`                           | `BOOL`           | FALSE        | Negation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                               |
| Input Const | `xDI1_ACVoltageMode`                     | `BOOL`           |              | <p><code>TRUE</code> = Activates a delay of the input with the<br>defined value of <code>tACModeInputVoltageDelay</code>. <code>FALSE</code><br>= No delay</p>                                                                                                                                                                                                                                                                                                                                           |                               |
| Input Const | `eCh2_ManNum`                            | eManNum          | eManNum.Auto |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                               |
| Input Const | `rCh2_ManualTargetPosition`              | `REAL`           |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                               |
| Input Const | `tCh2_DelayTimeFromForwardToBack`        | `TIME`           | TIME#2s0ms   | Delay time FORWARD -> BACK for Channel 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                               |
| Input Const | `tCh2_DelayTimeFromCloseToOpen`          | `TIME`           | TIME#2s0ms   | Delay time CLOSE -> OPEN for Channel 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                               |
| Input Const | `tCh2_OpenRuntimeDurationOversteering`   | `TIME`           | TIME#0ms     | <p>Override of the runtime DO4 (in OPEN direction) for Channel<br>2</p>                                                                                                                                                                                                                                                                                                                                                                                                                                  |                               |
| Input Const | `tCh2_CloseRuntimeDurationUndersteering` | `TIME`           | TIME#0ms     | <p>Underride of the runtime DO3 (in CLOSE direction) for Channel<br>2</p>                                                                                                                                                                                                                                                                                                                                                                                                                                |                               |
| Input Const | `tCh2_OpenRuntimeDuration`               | `TIME`           | TIME#1m0s0ms | Default runtime DO4 (OPEN) for Channel 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                               |
| Input Const | `tCh2_CloseRuntimeDuration`              | `TIME`           | TIME#1m0s0ms | Default runtime DO3 (CLOSE) for Channel 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                |                               |
| Input Const | `xCh2_EnableControl`                     | `BOOL`           | TRUE         | <p>Channel 2 (DO3 and DO4) can be enabled via manual override and<br>bus control</p>                                                                                                                                                                                                                                                                                                                                                                                                                     |                               |
| Input Const | `xCh2_DO4_DeactivateDipSwitch`           | `BOOL`           |              | <p><code>TRUE</code> = Hardware manual override of the digital output<br>DO4 (OPEN) of Channel 2 disabled</p>                                                                                                                                                                                                                                                                                                                                                                                            |                               |
| Input Const | `xCh2_DO3_DeactivateDipSwitch`           | `BOOL`           |              | <p><code>TRUE</code> = Hardware manual override of the digital output<br>DO3 (CLOSE) of Channel 2 disabled</p>                                                                                                                                                                                                                                                                                                                                                                                           |                               |
| Input Const | `eCh1_ManNum`                            | eManNum          | eManNum.Auto |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                               |
| Input Const | `rCh1_ManualTargetPosition`              | `REAL`           |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                               |
| Input Const | `tCh1_DelayTimeFromForwardToBack`        | `TIME`           | TIME#2s0ms   | Delay time FORWARD -> BACK for Channel 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                               |
| Input Const | `tCh1_DelayTimeFromCloseToOpen`          | `TIME`           | TIME#2s0ms   | Delay time CLOSE -> OPEN for Channel 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |                               |
| Input Const | `tCh1_OpenRuntimeDurationOversteering`   | `TIME`           | TIME#0ms     | <p>Override of the runtime DO4 (in OPEN direction) for Channel<br>1</p>                                                                                                                                                                                                                                                                                                                                                                                                                                  |                               |
| Input Const | `tCh1_CloseRuntimeDurationUndersteering` | `TIME`           | TIME#0ms     | <p>Underride of the runtime DO3 (in CLOSE direction) for Channel<br>1</p>                                                                                                                                                                                                                                                                                                                                                                                                                                |                               |
| Input Const | `tCh1_OpenRuntimeDuration`               | `TIME`           | TIME#1m0s0ms | Default runtime DO2 (OPEN) for Channel 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |                               |
| Input Const | `tCh1_CloseRuntimeDuration`              | `TIME`           | TIME#1m0s0ms | Default runtime DO1 (CLOSE) for Channel 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                |                               |
| Input Const | `xCh1_EnableControl`                     | `BOOL`           | TRUE         | <p>Channel 1 (DO1 and DO2) can be enabled via manual override and<br>bus control</p>                                                                                                                                                                                                                                                                                                                                                                                                                     |                               |
| Input Const | `xCh1_DO2_DeactivateDipSwitch`           | `BOOL`           |              | <p><code>TRUE</code> = Hardware manual override of the digital output<br>DO2 (OPEN) of Channel 1 disabled</p>                                                                                                                                                                                                                                                                                                                                                                                            |                               |
| Input Const | `xCh1_DO1_DeactivateDipSwitch`           | `BOOL`           |              | <p><code>TRUE</code> = Hardware manual override of the digital output<br>DO1 (CLOSE) of Channel 1 disabled</p>                                                                                                                                                                                                                                                                                                                                                                                           |                               |
| Input Const | `tACModeInputVoltageDelay`               | `TIME`           | TIME#100ms   | <p>A change in the signal applied to a DI is only<br>recognized after this time has elapsed. (Only used<br>when <code>xDI1\_ACVoltageMode</code> <code>TRUE</code> is,<br><code>xDI2\_ACVoltageMode</code> <code>TRUE</code> is, <code>xDI3\_ACVoltageMode</code><br><code>TRUE</code> is or <code>xDI4\_ACVoltageMode</code> <code>TRUE</code> )</p>                                                                                                                                                    |                               |
| Input Const | `tReadFeedback`                          | `TIME`           | TIME#3s0ms   | <p>Polling time for feedback from the digital inputs and the<br>manual override. (Note: The polling time must not<br>be greater than the time of <code>tBusTimeout</code> be.)</p>                                                                                                                                                                                                                                                                                                                       |                               |
| Input Const | `tSendDelayAfterInit`                    | `TIME`           | TIME#10s0ms  | Delay for sending the outputs                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |                               |
| Input Const | `tReadInputs`                            | `TIME`           | TIME#1s0ms   | <p>Polling time for digital inputs (Note: The polling time<br>must not be greater than the time of <code>tBusTimeout</code> be.)</p>                                                                                                                                                                                                                                                                                                                                                                     |                               |
| Input Const | `tBusTimeout`                            | `TIME`           | TIME#20s0ms  | `T#0s` = No bus timeout = No safe state mode                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                               |
| Input Const | `usiSlaveID`                             | `USINT`          | 10           | The slave address for the module                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                               |
| Input       | `xCh1_TriggerInitializeClose`            | `BOOL`           |              | Request initial travel to 0% for Channel 1                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                               |
| Input       | `xCh1_TriggerInitializeOpen`             | `BOOL`           |              | Request initial travel to 100% for Channel 1                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                               |
| Input       | `xCh2_TriggerInitializeClose`            | `BOOL`           |              | Request initial travel to 0% for Channel 2                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                               |
| Input       | `xCh2_TriggerInitializeOpen`             | `BOOL`           |              | Request initial travel to 100% for Channel 2                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                               |
| Input       | `rCh1_TargetPosition`                    | `REAL`           |              | Target position for Channel 1 in %                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                               |
| Input       | `rCh2_TargetPosition`                    | `REAL`           |              | Target position for Channel 2 in %                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |                               |
| Output      | `xCh1_DO1_Fb`                            | `BOOL`           |              | <p>Feedback of digital output DO1 (CLOSE) for Channel 1.<br>Observe the evaluation of the manual override. Actual<br>value - LED active = <code>TRUE</code>, LED inactive = <code>FALSE</code><br>(Query is performed at the interval of the specified time of<br><code>tReadFeedback</code>)</p>                                                                                                                                                                                                        |                               |
| Output      | `xCh1_DO2_Fb`                            | `BOOL`           |              | <p>Feedback of digital output DO2 (OPEN) for Channel 1.<br>Observe the evaluation of the manual override. Actual<br>value - LED active = <code>TRUE</code>, LED inactive = <code>FALSE</code><br>(Query is performed at the interval of the specified time of<br><code>tReadFeedback</code>)</p>                                                                                                                                                                                                         |                               |
| Output      | `xCh2_DO3_Fb`                            | `BOOL`           |              | <p>Feedback of digital output DO3 (CLOSE) for Channel 2.<br>Observe the evaluation of the manual override. Actual<br>value - LED active = <code>TRUE</code>, LED inactive = <code>FALSE</code><br>(Query is performed at the interval of the specified time of<br><code>tReadFeedback</code>)</p>                                                                                                                                                                                                        |                               |
| Output      | `xCh2_DO4_Fb`                            | `BOOL`           |              | <p>Feedback of digital output DO4 (OPEN) for Channel 2.<br>Observe the evaluation of the manual override. Actual<br>value - LED active = <code>TRUE</code>, LED inactive = <code>FALSE</code><br>(Query is performed at the interval of the specified time of<br><code>tReadFeedback</code>)</p>                                                                                                                                                                                                         |                               |
| Output      | `rCh1_CurrentPosition`                   | `REAL`           |              | <p>Current position in % for Channel 1 (Query is performed at the<br>interval of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                   |                               |
| Output      | `rCh2_CurrentPosition`                   | `REAL`           |              | <p>Current position in % for Channel 2 (Query is performed at the<br>interval of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                   |                               |
| Output      | `eCh1_State`                             | ChannelState     |              | <p>Status for Channel 1 (Query is performed at the interval of the<br>specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                  |                               |
| Output      | `eCh2_State`                             | ChannelState     |              | <p>Status for Channel 2 (Query is performed at the interval of the<br>specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                  |                               |
| Output      | `tCh1_TimeRunSinceLastControl`           | `TIME`           |              | <p>Runtime since last control of Channel 1 (Info: During<br>manual override, the time continues to run. Query is performed at the<br>interval of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                   |                               |
| Output      | `tCh2_TimeRunSinceLastControl`           | `TIME`           |              | <p>Runtime since last control of Channel 2 (Info: During<br>manual override, the time continues to run. Query is performed at the<br>interval of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                   |                               |
| Output      | `eCh1ManualPosition`                     | eManPosition     |              | <p>Dip switch position Channel 1 (Query is performed at the interval<br>of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                         |                               |
| Output      | `eCh2ManualPosition`                     | eManPosition     |              | <p>Dip switch position Channel 2 (Query is performed at the interval<br>of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                         |                               |
| Output      | `xDI1`                                   | `BOOL`           |              | <p>Digital input (polling takes place at the interval of the specified<br>time of <code>tReadInputs</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                          |                               |
| Output      | `xDI2`                                   | `BOOL`           |              | <p>Digital input (polling takes place at the interval of the specified<br>time of <code>tReadInputs</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                          |                               |
| Output      | `xDI3`                                   | `BOOL`           |              | <p>Digital input (polling takes place at the interval of the specified<br>time of <code>tReadInputs</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                          |                               |
| Output      | `xDI4`                                   | `BOOL`           |              | <p>Digital input (polling takes place at the interval of the specified<br>time of <code>tReadInputs</code>)</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-modbusio2-lib/funktionsbausteine/h1_4di2dor_3p.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.
