# KSB\_PUMP\_DRIVE\_2\_MOD

## `KSB_PUMP_DRIVE_2_MOD` (FB)

FUNCTION\_BLOCK KSB\_PUMP\_DRIVE\_2\_MOD

InOut:

| Scope       | Name                  | Type                                             | Initial                                                   | Comment                                                                                                                      |
| ----------- | --------------------- | ------------------------------------------------ | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Input       | `xEn`                 | `BOOL`                                           | TRUE                                                      | Enable / disable of communication ( TRUE = enabled )                                                                         |
| Input       | `byUnitId`            | `BYTE`                                           | 0                                                         | Device address ( 1 .. 247 )                                                                                                  |
| Input       | `xUpdateActual`       | `BOOL`                                           | FALSE                                                     | <p>Update of actual values ( on each rising edge<br>)</p>                                                                    |
| Input       | `xUpdateSetp`         | `BOOL`                                           | FALSE                                                     | <p>Update of setpoints ( on each rising edge<br>)</p>                                                                        |
| Input       | `xEnDevice`           | `BOOL`                                           | FALSE                                                     | Enable / disable the unit ( 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(s) 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(s) 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 all messages ( on each rising edge<br>)</p>                                                                         |
| Inout       | `ModbusClient`        | `ModbusClientBase`                               |                                                           | Client of the device                                                                                                         |
| Output      | `xEnDeviceFb`         | `BOOL`                                           | FALSE                                                     | <p>Enable / disable the unit ( 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 condition of pump 1                                                                                                |
| Output      | `xFb_P1`              | `BOOL`                                           | FALSE                                                     | Operating indication 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                                                       | DC-link 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 energy of pump 1 in kWh                                                                                     |
| Output      | `rOperatingHours_P1`  | `REAL`                                           |                                                           | Operating hours of pump 1 in h                                                                                               |
| Output      | `rCountSwitchOn_P1`   | `REAL`                                           |                                                           | Number of starts of pump 1                                                                                                   |
| 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 - unit ( TRUE = Fault )                                                                                     |
| Output      | `xAlarm_Pump1`        | `BOOL`                                           | FALSE                                                     | Collective fault - pump 1 ( TRUE = Fault )                                                                                   |
| Output      | `sErrorCode1_Pump1`   | `STRING`                                         |                                                           | <p>String with the numbers of active device errors 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 errors 16 - 31 of<br>pump 1 ( bit 0 = number 16, bit 1 = number 17, etc. )</p>   |
| Output      | `xWarning_Pump1`      | `BOOL`                                           | FALSE                                                     | Collective 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 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 Modbus addresses ( from the Modbus<br>registers ) ( Permissible range: -1, 0, +1 )</p>             |
| Input Const | `tTimeUpdateSetp`     | `TIME`                                           | TIME#10s0ms                                               | <p>Update interval for the processes affected by the input<br>‘xUpdateSetp’</p>                                              |
| Input Const | `tTimeUpdateActual`   | `TIME`                                           | TIME#3s0ms                                                | <p>Update interval for the processes affected by the input<br>‘xUpdateActual’</p>                                            |
