> For the complete documentation index, see [llms.txt](https://support.powerio.com/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.powerio.com/hub/codesys-hvac/en/hvac-modbus-library/functionblocks/ksb/ksb_pump_drive_2_mod.md).

# KSB\_PUMP\_DRIVE\_2\_MOD

## `KSB_PUMP_DRIVE_2_MOD` (FB)

`FUNCTION_BLOCK` KSB\_PUMP\_DRIVE\_2\_MOD

### Representation

<figure><img src="https://2592874069-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQR4vCFzt6ixgsqlR3pdR%2Fuploads%2FZMP3hpyOtfOMgbJPmL9D%2FKSB_PUMP_DRIVE_2_MOD.png?alt=media&amp;token=34690278-3d2f-4870-8d8f-0e770a1d82c2" alt=""><figcaption></figcaption></figure>

InOut:

| Scope       | Name                  | Type                                             | Initial                                                   | Comment                                                                                                                    |
| ----------- | --------------------- | ------------------------------------------------ | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Input       | `xEn`                 | `BOOL`                                           | TRUE                                                      | Enable / disable communication (TRUE = enable)                                                                             |
| Input       | `byUnitId`            | `BYTE`                                           | 0                                                         | Device address (1 .. 247)                                                                                                  |
| Input       | `xUpdateActual`       | `BOOL`                                           | FALSE                                                     | <p>Update of actual values (on every rising edge<br>)</p>                                                                  |
| Input       | `xUpdateSetp`         | `BOOL`                                           | FALSE                                                     | <p>Update of setpoints (on every rising edge<br>)</p>                                                                      |
| Input       | `xEnDevice`           | `BOOL`                                           | FALSE                                                     | Enable / inhibit of the plant (FALSE = Off)                                                                                |
| Input       | `eMode_P1`            | KSB\_PUMP\_DRIVE\_2\_MOD\_PUMP\_MODE             | KSB\_PUMP\_DRIVE\_2\_MOD\_PUMP\_MODE.AUTO                 | Operating mode of pump 1                                                                                                   |
| Input       | `rSetp_PERC_Auto`     | `REAL`                                           | 0.0                                                       | <p>Setpoint for the pump (n) in percent (0.0% = parameter<br>3-2-2-1 to 100.0% = parameter 3-2-2-2) in automatic mode</p>  |
| Input       | `rSetp_PERC_Man`      | `REAL`                                           | 0.0                                                       | <p>Setpoint for the pump (n) in percent (0.0% = parameter<br>3-2-2-1 to 100.0% = parameter 3-2-2-2) in manual mode</p>     |
| Input       | `xResMessages`        | `BOOL`                                           | FALSE                                                     | <p>Reset of all messages (on every rising edge<br>)</p>                                                                    |
| Inout       | `ModbusClient`        | `ModbusClientBase`                               |                                                           | Client of the device                                                                                                       |
| Output      | `xEnDeviceFb`         | `BOOL`                                           | FALSE                                                     | <p>Enable / inhibit of the plant (FALSE = Off) —<br>feedback</p>                                                           |
| Output      | `rSetp_RPM_Fb`        | `REAL`                                           | 0.0                                                       | Setpoint for the pump as speed in 1/min — feedback                                                                         |
| Output      | `rSetp_PERC_Fb`       | `REAL`                                           | 0.0                                                       | Setpoint for the pump in percent — feedback                                                                                |
| Output      | `eControlStationFb`   | KSB\_PUMP\_DRIVE\_2\_MOD\_CONTROL\_STATION\_MODE | KSB\_PUMP\_DRIVE\_2\_MOD\_CONTROL\_STATION\_MODE.LOCAL    | Type of control station — feedback                                                                                         |
| Output      | `eActValueSourceFb`   | KSB\_PUMP\_DRIVE\_2\_MOD\_ACTUAL\_VALUE\_SOURCE  | KSB\_PUMP\_DRIVE\_2\_MOD\_ACTUAL\_VALUE\_SOURCE.LOCAL     | Source of the actual value — feedback                                                                                      |
| Output      | `eState_P1`           | KSB\_PUMP\_DRIVE\_2\_MOD\_PUMP\_STATE            | KSB\_PUMP\_DRIVE\_2\_MOD\_PUMP\_STATE.STOPPED             | Operating state of pump 1                                                                                                  |
| Output      | `xFb_P1`              | `BOOL`                                           | FALSE                                                     | Operating message of pump 1 (FALSE = Off, TRUE = On)                                                                       |
| Output      | `eMode_P1_Fb`         | KSB\_PUMP\_DRIVE\_2\_MOD\_PUMP\_MODE             | KSB\_PUMP\_DRIVE\_2\_MOD\_PUMP\_MODE.AUTO                 | Operating mode of pump 1 — feedback                                                                                        |
| Output      | `rRPM_P1`             | `REAL`                                           | 0.0                                                       | Current speed of pump 1 in 1/min                                                                                           |
| Output      | `rPowerMot_P1`        | `REAL`                                           | 0.0                                                       | Current power consumption of the motor of pump 1                                                                           |
| Output      | `rPowerPump_P1`       | `REAL`                                           | 0.0                                                       | Current power consumption of pump 1                                                                                        |
| Output      | `rElecCurrent_P1`     | `REAL`                                           | 0.0                                                       | Motor current of pump 1 in amperes                                                                                         |
| Output      | `rElecVoltage_P1`     | `REAL`                                           | 0.0                                                       | Motor voltage of pump 1 in volts                                                                                           |
| Output      | `rOutputFreq_P1`      | `REAL`                                           | 0.0                                                       | Output frequency for pump 1 in Hz                                                                                          |
| Output      | `rInterCirVolt_P1`    | `REAL`                                           | 0.0                                                       | Intermediate circuit voltage of pump 1 in volts                                                                            |
| Output      | `rHeatsinkTemp_P1`    | `REAL`                                           | 0.0                                                       | <p>Heat sink temperature of pump 1 in base unit -<br>temperature</p>                                                       |
| Output      | `rTorque_P1`          | `REAL`                                           | 0.0                                                       | Motor torque of pump 1 in Nm                                                                                               |
| Output      | `rEfficiency_P1`      | `REAL`                                           | 0.0                                                       | Efficiency of pump 1 in percent                                                                                            |
| Output      | `rElecEnergyTota_P1`  | `REAL`                                           |                                                           | Total electrical energy of pump 1 in kWh                                                                                   |
| Output      | `rOperatingHours_P1`  | `REAL`                                           |                                                           | Operating hours of pump 1 in h                                                                                             |
| Output      | `rCountSwitchOn_P1`   | `REAL`                                           |                                                           | Number of switch-ons of pump 1 in h                                                                                        |
| Output      | `xAlarm`              | `BOOL`                                           | FALSE                                                     | Collective fault (TRUE = fault)                                                                                            |
| Output      | `xAlarmCom`           | `BOOL`                                           | FALSE                                                     | Collective fault - communication (TRUE = fault)                                                                            |
| Output      | `eErrorCodeCom`       | ModbusErrorCode                                  |                                                           | Error code - communication (0 = no error)                                                                                  |
| Output      | `xAlarmDevice`        | `BOOL`                                           | FALSE                                                     | General fault - plant (TRUE = fault)                                                                                       |
| Output      | `xAlarm_Pump1`        | `BOOL`                                           | FALSE                                                     | General fault - pump 1 (TRUE = fault)                                                                                      |
| Output      | `sErrorCode1_Pump1`   | `STRING`                                         |                                                           | <p>String with the numbers of active device faults 0 - 15 of<br>pump 1 (Bit 0 = number 1, Bit 1 = number 2, etc.)</p>      |
| Output      | `sErrorCode2_Pump1`   | `STRING`                                         |                                                           | <p>String with the numbers of active device faults 16 - 31 of<br>pump 1 (Bit 0 = number 16, Bit 1 = number 17, etc.)</p>   |
| Output      | `xWarning_Pump1`      | `BOOL`                                           | FALSE                                                     | General warning - pump 1 (TRUE = warning)                                                                                  |
| Output      | `sWarningCode1_Pump1` | `STRING`                                         |                                                           | <p>String with the numbers of active device warnings 0 - 15<br>of pump 1 (Bit 0 = number 1, Bit 1 = number 2, etc.)</p>    |
| Output      | `sWarningCode2_Pump1` | `STRING`                                         |                                                           | <p>String with the numbers of active device warnings 16 - 31<br>of pump 1 (Bit 0 = number 16, Bit 1 = number 17, etc.)</p> |
| Output      | `xBusy`               | `BOOL`                                           |                                                           | Communication indicator (TRUE = communication)                                                                             |
| Input Const | `rSetp_Max_P1`        | `REAL`                                           | 3000.0                                                    | <p>Absolute maximum speed of pump 1 in 1/min (Parameter<br>3-2-2-2)</p>                                                    |
| Input Const | `rSetp_Min_P1`        | `REAL`                                           | 500.0                                                     | <p>Absolute minimum speed of pump 1 in 1/min (Parameter<br>3-2-2-1)</p>                                                    |
| Input Const | `eControlMode`        | KSB\_PUMP\_DRIVE\_2\_MOD\_CONTROL\_MODE          | KSB\_PUMP\_DRIVE\_2\_MOD\_CONTROL\_MODE.OFF               | Type of control                                                                                                            |
| Input Const | `eActValueSource`     | KSB\_PUMP\_DRIVE\_2\_MOD\_ACTUAL\_VALUE\_SOURCE  | KSB\_PUMP\_DRIVE\_2\_MOD\_ACTUAL\_VALUE\_SOURCE.FIELDBUS  | Source of the actual value                                                                                                 |
| Input Const | `eControlStation`     | KSB\_PUMP\_DRIVE\_2\_MOD\_CONTROL\_STATION\_MODE | KSB\_PUMP\_DRIVE\_2\_MOD\_CONTROL\_STATION\_MODE.FIELDBUS | Type of control station                                                                                                    |
| Input Const | `diAdrOffset`         | `DINT`                                           | 0                                                         | <p>Offset for calculating the Modbus addresses (from the Modbus<br>registers) (permitted range: -1, 0, +1)</p>             |
| Input Const | `tTimeUpdateSetp`     | `TIME`                                           | TIME#10s0ms                                               | <p>Update interval for the operations that are influenced by the input<br><code>xUpdateSetp</code> influenced</p>          |
| Input Const | `tTimeUpdateActual`   | `TIME`                                           | TIME#3s0ms                                                | <p>Update interval for the operations that are influenced by the input<br><code>xUpdateActual</code> influenced</p>        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

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

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-modbus-library/functionblocks/ksb/ksb_pump_drive_2_mod.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.
