> 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="/files/794dac97f5e81b04e3ccaa9ad9a4a1e1961523b2" 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 / disable of the system (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 / disable of the system (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 for 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>Heatsink temperature of pump 1 in base unit -<br>temperature</p>                                                       |
| Output      | `rTorque_P1`          | `REAL`                                           | 0.0                                                       | Torque of the motor of pump 1 in Nm                                                                                       |
| Output      | `rEfficiency_P1`      | `REAL`                                           | 0.0                                                       | Efficiency of pump 1 in percent                                                                                           |
| Output      | `rElecEnergyTota_P1`  | `REAL`                                           |                                                           | Total electrical work 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                                                     | Collective fault - system (TRUE = fault)                                                                                  |
| Output      | `xAlarm_Pump1`        | `BOOL`                                           | FALSE                                                     | Collective fault - pump 1 (TRUE = fault)                                                                                  |
| Output      | `sErrorCode1_Pump1`   | `STRING`                                         |                                                           | String with the numbers of the active device faults 0 - 15 of pump 1 (Bit 0 = number 1, Bit 1 = number 2, etc.)           |
| Output      | `sErrorCode2_Pump1`   | `STRING`                                         |                                                           | String with the numbers of the active device faults 16 - 31 of pump 1 (Bit 0 = number 16, Bit 1 = number 17, etc.)        |
| Output      | `xWarning_Pump1`      | `BOOL`                                           | FALSE                                                     | Collective warning - pump 1 (TRUE = warning)                                                                              |
| Output      | `sWarningCode1_Pump1` | `STRING`                                         |                                                           | String with the numbers of the active device warnings 0 - 15 of pump 1 (Bit 0 = number 1, Bit 1 = number 2, etc.)         |
| Output      | `sWarningCode2_Pump1` | `STRING`                                         |                                                           | String with the numbers of the active device warnings 16 - 31 of pump 1 (Bit 0 = number 16, Bit 1 = number 17, etc.)      |
| 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 for 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 processes influenced by the input<br><code>xUpdateSetp</code> influenced</p>                   |
| Input Const | `tTimeUpdateActual`   | `TIME`                                           | TIME#3s0ms                                                | <p>Update interval for the processes 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.powerio.com/hub/codesys-hvac/en/hvac-modbus-library/functionblocks/ksb/ksb_pump_drive_2_mod.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
