# 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>, while initialization<br>is being performed during first start.</p>                                                                                                                                                                                                                                                                                                                                                                                    | BaseSlave                     |
| Output      | `xInitFinished`                          | `BOOL`           |              | <p><code>xInitFinished</code> is <code>TRUE</code>, once all parameters have been sent to the module<br>during first start.</p>                                                                                                                                                                                                                                                                                                                                                                          | BaseSlave                     |
| Output      | `xAlarmCom`                              | `BOOL`           |              | <p><code>xAlarmCom</code> is <code>TRUE</code>, when there is a<br>communication error.</p>                                                                                                                                                                                                                                                                                                                                                                                                              | BaseSlave                     |
| Output      | `xBusy`                                  | `BOOL`           |              | `xBusy` is `TRUE`, when a Modbus request is being executed.                                                                                                                                                                                                                                                                                                                                                                                                                                              | BaseSlave                     |
| Output      | `usiConfiguredSlaveID`                   | `USINT`          |              | Shows the currently configured 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>default 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 (Attention:<br>After that, autobauding is enabled again)</p>                                                                                                                                                                                                                                                                                                                                             | BaseSlaveModule               |
| Output      | `wFirmware`                              | `WORD`           |              | Shows the current firmware of the module                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BaseSlaveModule               |
| Output      | `xAuto`                                  | `BOOL`           |              | <p><code>FALSE</code> = At least one input and/or one output is 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 performed per output. )</p>                                                                           | BaseSlaveModule               |
| Output      | `xAutoSoftware`                          | `BOOL`           |              | <p><code>FALSE</code> = At least one input and/or output is in the state<br>via parameter (software) <code>eManBin <>\<br/>eManBin.Auto</code>. <code>TRUE</code> = All inputs and outputs are in the state<br>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 in the state<br>via dip-switch (hardware) <code>eManBin <>\<br/>eManBin.Auto</code>. <code>TRUE</code> = All inputs and outputs are in the state<br>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 performed per 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>Overriding the runtime DO4 (in direction OPEN) for Channel<br>2</p>                                                                                                                                                                                                                                                                                                                                                                                                                                   |                               |
| Input Const | `tCh2_CloseRuntimeDurationUndersteering` | `TIME`           | TIME#0ms     | <p>Understeering the runtime DO3 (in direction CLOSE) for Channel<br>2</p>                                                                                                                                                                                                                                                                                                                                                                                                                               |                               |
| Input Const | `tCh2_OpenRuntimeDuration`               | `TIME`           | TIME#1m0s0ms | Preset runtime DO4 (OPEN) for Channel 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |                               |
| Input Const | `tCh2_CloseRuntimeDuration`              | `TIME`           | TIME#1m0s0ms | Preset 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 deactivated</p>                                                                                                                                                                                                                                                                                                                                                                                         |                               |
| Input Const | `xCh2_DO3_DeactivateDipSwitch`           | `BOOL`           |              | <p><code>TRUE</code> = Hardware manual override of the digital output<br>DO3 (CLOSE) of Channel 2 deactivated</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>Overriding the runtime DO4 (in direction OPEN) for Channel<br>1</p>                                                                                                                                                                                                                                                                                                                                                                                                                                   |                               |
| Input Const | `tCh1_CloseRuntimeDurationUndersteering` | `TIME`           | TIME#0ms     | <p>Understeering the runtime DO3 (in direction CLOSE) for Channel<br>1</p>                                                                                                                                                                                                                                                                                                                                                                                                                               |                               |
| Input Const | `tCh1_OpenRuntimeDuration`               | `TIME`           | TIME#1m0s0ms | Preset runtime DO2 (OPEN) for Channel 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |                               |
| Input Const | `tCh1_CloseRuntimeDuration`              | `TIME`           | TIME#1m0s0ms | Preset 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 deactivated</p>                                                                                                                                                                                                                                                                                                                                                                                         |                               |
| Input Const | `xCh1_DO1_DeactivateDipSwitch`           | `BOOL`           |              | <p><code>TRUE</code> = Hardware manual override of the digital output<br>DO1 (CLOSE) of Channel 1 deactivated</p>                                                                                                                                                                                                                                                                                                                                                                                        |                               |
| Input Const | `tACModeInputVoltageDelay`               | `TIME`           | TIME#100ms   | <p>A change in the signal present at a DI is only detected<br>after this time has elapsed. (Used only 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> is.)</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> is.)</p>                                                                                                                                                                                                                                                                                                                                                                     |                               |
| Input Const | `tBusTimeout`                            | `TIME`           | TIME#20s0ms  | `T#0s` = No bus timeout = No SafeState 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>Note the evaluation of the manual override. Actual<br>value - LED active = <code>TRUE</code>, LED inactive = <code>FALSE</code><br>(Polling occurs 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>Note the evaluation of the manual override. Actual<br>value - LED active = <code>TRUE</code>, LED inactive = <code>FALSE</code><br>(Polling occurs 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>Note the evaluation of the manual override. Actual<br>value - LED active = <code>TRUE</code>, LED inactive = <code>FALSE</code><br>(Polling occurs 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>Note the evaluation of the manual override. Actual<br>value - LED active = <code>TRUE</code>, LED inactive = <code>FALSE</code><br>(Polling occurs at the interval of the specified time of<br><code>tReadFeedback</code>)</p>                                                                                                                                                                                                                |                               |
| Output      | `rCh1_CurrentPosition`                   | `REAL`           |              | <p>Current position in % for Channel 1 (Polling occurs at the<br>interval of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                       |                               |
| Output      | `rCh2_CurrentPosition`                   | `REAL`           |              | <p>Current position in % for Channel 2 (Polling occurs at the<br>interval of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                       |                               |
| Output      | `eCh1_State`                             | ChannelState     |              | <p>Status for Channel 1 (Polling occurs at the interval of the<br>specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                      |                               |
| Output      | `eCh2_State`                             | ChannelState     |              | <p>Status for Channel 2 (Polling occurs 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. Polling occurs 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. Polling occurs at the<br>interval of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                       |                               |
| Output      | `eCh1ManualPosition`                     | eManPosition     |              | <p>Dip switch position Channel 1 (Polling occurs at the interval<br>of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                             |                               |
| Output      | `eCh2ManualPosition`                     | eManPosition     |              | <p>Dip switch position Channel 2 (Polling occurs at the interval<br>of the specified time of <code>tReadFeedback</code>)</p>                                                                                                                                                                                                                                                                                                                                                                             |                               |
| Output      | `xDI1`                                   | `BOOL`           |              | <p>Digital input (Polling occurs at the interval of the specified<br>time of <code>tReadInputs</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                               |                               |
| Output      | `xDI2`                                   | `BOOL`           |              | <p>Digital input (Polling occurs at the interval of the specified<br>time of <code>tReadInputs</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                               |                               |
| Output      | `xDI3`                                   | `BOOL`           |              | <p>Digital input (Polling occurs at the interval of the specified<br>time of <code>tReadInputs</code>)</p>                                                                                                                                                                                                                                                                                                                                                                                               |                               |
| Output      | `xDI4`                                   | `BOOL`           |              | <p>Digital input (Polling occurs at the interval of the specified<br>time of <code>tReadInputs</code>)</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/en/hvac-modbusio2-lib/funktionsbausteine/h1_4di2dor_3p.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.
