# KLINGENBURG\_OJ\_DRHX

## `KLINGENBURG_OJ_DRHX` (FB)

FUNCTION\_BLOCK KLINGENBURG\_OJ\_DRHX

InOut:

| Scope       | Name                  | Type                       | Initial                                         | Comment                                                                                                                                    |
| ----------- | --------------------- | -------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Input       | `xEn`                 | `BOOL`                     | TRUE                                            | Enable / disable communication ( TRUE = enabled )                                                                                          |
| Input       | `byUnitId`            | `BYTE`                     | 1                                               | Device address (1…247, default = factory setting)                                                                                          |
| Input       | `xUpdateActual`       | `BOOL`                     | FALSE                                           | <p>Update of actual values (on every rising edge<br>)</p>                                                                                  |
| Input       | `xUpdateSetp`         | `BOOL`                     | FALSE                                           | <p>Update of setpoint values (on every rising edge<br>)</p>                                                                                |
| Input       | `xResError`           | `BOOL`                     | FALSE                                           | Reinitialization of the outputs ‘eErrorCodeCom’ and/or ‘stErrorCodeDv’ to the fault-free state (on each rising edge)                       |
| Input       | `xEnMotor`            | `BOOL`                     | FALSE                                           | Enable / disable of the motor (TRUE = enabled)                                                                                             |
| Input       | `rSetpRotSpeed`       | `REAL`                     | 0.0                                             | Setpoint - rotation speed in % (0.0 - 100.0 %) (rMotorSpMin - rMotorSpMax)                                                                 |
| Input       | `xResAlarmsDev`       | `BOOL`                     | FALSE                                           | Reset of all device alarms (on each rising edge)                                                                                           |
| Inout       | `ModbusClient`        | `ModbusClientBase`         |                                                 | Client of the device                                                                                                                       |
| Output      | `xEnMotorFb`          | `BOOL`                     |                                                 | Feedback - motor enable / disable (TRUE = enabled)                                                                                         |
| Output      | `rSetpRotSpeedFb`     | `REAL`                     |                                                 | Feedback - setpoint - rotation speed in % (0.0 - 100.0 %) (rMotorSpeed\_Min - rMotorSpeed\_Max)                                            |
| Output      | `rPercentOut`         | `REAL`                     |                                                 | Control signal for the stepper motor in %                                                                                                  |
| Output      | `xRotation`           | `BOOL`                     |                                                 | Rotation indicator (TRUE = rotation)                                                                                                       |
| Output      | `rMotorSpeed`         | `REAL`                     |                                                 | Motor rotation speed in 1/min                                                                                                              |
| Output      | `rRotorSpeed`         | `REAL`                     |                                                 | Rotor rotation speed in 1/min                                                                                                              |
| Output      | `rMotorSpMin_Fb`      | `REAL`                     |                                                 | Feedback - minimum value - motor rotation speed in 1/min                                                                                   |
| Output      | `rMotorSpMax_Fb`      | `REAL`                     |                                                 | Feedback - maximum value - motor rotation speed in 1/min                                                                                   |
| Output      | `rTorque`             | `REAL`                     |                                                 | Motor torque in Nm                                                                                                                         |
| Output      | `rIntTemp`            | `REAL`                     |                                                 | Internal temperature                                                                                                                       |
| Output      | `eControlModeFb`      | OJ\_DRHX\_CONTROL\_MODE    |                                                 | Feedback - type of control (0 = MODBUS, 1 = 0-10V)                                                                                         |
| Output      | `eRotDirectFb`        | OJ\_DRHX\_ROTATION\_DIRECT |                                                 | Feedback - rotor direction (0 = clockwise, 1 = counterclockwise)                                                                           |
| Output      | `eAltCommSetFb`       | OJ\_DRHX\_ALT\_COMM\_SET   |                                                 | Feedback - status of the alternative Modbus connection (FALSE = factory default, TRUE = alternative connection (Holding Register 13 - 16)) |
| Output      | `xDI1`                | `BOOL`                     |                                                 | State of digital input 1 (FALSE = LOW)                                                                                                     |
| Output      | `xDI2`                | `BOOL`                     |                                                 | State of digital input 2 (FALSE = LOW)                                                                                                     |
| Output      | `xDI3`                | `BOOL`                     |                                                 | State of digital input 3 (FALSE = LOW)                                                                                                     |
| Output      | `xDI4`                | `BOOL`                     |                                                 | State of digital input 4 (FALSE = LOW)                                                                                                     |
| Output      | `eDI1Config_Fb`       | OJ\_DRHX\_DIX\_CONFIG      |                                                 | Feedback - configuration of digital input 1                                                                                                |
| Output      | `eDI2Config_Fb`       | OJ\_DRHX\_DIX\_CONFIG      |                                                 | Feedback - configuration of digital input 2                                                                                                |
| Output      | `eDI3Config_Fb`       | OJ\_DRHX\_DIX\_CONFIG      |                                                 | Feedback - configuration of digital input 3                                                                                                |
| Output      | `eDI4Config_Fb`       | OJ\_DRHX\_DIX\_CONFIG      |                                                 | Feedback - configuration of digital input 4                                                                                                |
| Output      | `rInputPower`         | `REAL`                     |                                                 | Power consumption \[W]                                                                                                                     |
| Output      | `rExtSetp`            | `REAL`                     |                                                 | Voltage at analog input 1 - setpoint rotation speed (0.0 - 10000 mV)                                                                       |
| Output      | `eType`               | OJ\_DRHX\_TYPE             |                                                 | Type of control                                                                                                                            |
| Output      | `eRelay1Config_Fb`    | OJ\_DRHX\_RELAYX\_CONFIG   |                                                 | Feedback - configuration of relay 1                                                                                                        |
| Output      | `eRelay2Config_Fb`    | OJ\_DRHX\_RELAYX\_CONFIG   |                                                 | Feedback - configuration of relay 2                                                                                                        |
| Output      | `xAlarm`              | `BOOL`                     | FALSE                                           | General fault ( TRUE = fault )                                                                                                             |
| Output      | `xAlarmCom`           | `BOOL`                     | FALSE                                           | General fault - communication ( TRUE = fault )                                                                                             |
| Output      | `eErrorCodeCom`       | ModbusErrorCode            |                                                 | Error code - communication ( 0 = no error )                                                                                                |
| Output      | `stErrorCodeDev`      | `STRING`                   |                                                 | String with the numbers of the active device errors                                                                                        |
| Output      | `xBusy`               | `BOOL`                     |                                                 | Communication indicator ( TRUE = communication )                                                                                           |
| Input Const | `rPercentOutMult`     | `REAL`                     | 1.0                                             | Multiplier for the output ‘rPercentOut’ (rPercentOut = transmitted value \* 0.01 \* rPercentOutMult)                                       |
| Input Const | `rSetpRotSpeedMult`   | `REAL`                     | 1.0                                             | Multiplier for the input ‘rSetpRotSpeed’ (transmitted value = rSetpRotSpeed \* 100 \* rSetpRotSpeedMult)                                   |
| Input Const | `eDI4Config`          | OJ\_DRHX\_DIX\_CONFIG      | OJ\_DRHX\_DIX\_CONFIG.DISABLED                  |                                                                                                                                            |
| Input Const | `eDI3Config`          | OJ\_DRHX\_DIX\_CONFIG      | OJ\_DRHX\_DIX\_CONFIG.EXT\_ROTOR\_GUARD\_SIGNAL | Configuration of digital input 4                                                                                                           |
| Input Const | `eDI2Config`          | OJ\_DRHX\_DIX\_CONFIG      | OJ\_DRHX\_DIX\_CONFIG.ENABLE\_EXT\_ROTOR\_GUARD | Configuration of digital input 3                                                                                                           |
| Input Const | `eDI1Config`          | OJ\_DRHX\_DIX\_CONFIG      | OJ\_DRHX\_DIX\_CONFIG.ALARM\_RESET              | Configuration of digital input 2                                                                                                           |
| Input Const | `rKFactor`            | `REAL`                     | 100.0                                           | Factor influencing the control signal curve in 0-10V operation, k = 10000: linear curve 1.1V - 9.5V = (rMotorSpMin - rMotorSpMax)          |
| Input Const | `rRotorSize`          | `REAL`                     | 0.0                                             | Diameter of the rotor in mm (relevant for the variable ‘rRotorSpeed’, 0 mm = rRotorSpeed = rMotorSpeed)                                    |
| Input Const | `rPulleySize`         | `REAL`                     | 0.0                                             | Diameter of the motor pulley in mm (relevant for the variable ‘rRotorSpeed’, 0 mm = rRotorSpeed = rMotorSpeed)                             |
| Input Const | `rPurgeCtrlSignal`    | `REAL`                     | 10.0                                            | Purge operation: control signal during purge operation in %                                                                                |
| Input Const | `tPurgeTime`          | `TIME`                     | TIME#10s0ms                                     | Purge operation: duration of the purge operation                                                                                           |
| Input Const | `tPurgeIntervall`     | `TIME`                     | TIME#10m0s0ms                                   | Purge operation: time interval between two purge cycles (T#0s: disable cyclic purge operation)                                             |
| Input Const | `tPurgeDetect`        | `TIME`                     | TIME#10m0s0ms                                   | Purge operation: minimum inactive rotor time before triggering the purge operation                                                         |
| Input Const | `rMotorSpMax`         | `REAL`                     | 250.0                                           | Maximum value - motor rotation speed in 1/min                                                                                              |
| Input Const | `rMotorSpMin`         | `REAL`                     | 1.0                                             | Minimum value - motor rotation speed in 1/min                                                                                              |
| Input Const | `xAutoDetectCtrlMode` | `BOOL`                     | TRUE                                            | Enable / disable automatic detection of the operating mode (FALSE = no automatic detection)                                                |
| Input Const | `eControlMode`        | OJ\_DRHX\_CONTROL\_MODE    | OJ\_DRHX\_CONTROL\_MODE.MODBUS                  |                                                                                                                                            |
| Input Const | `eRotDirect`          | OJ\_DRHX\_ROTATION\_DIRECT | OJ\_DRHX\_ROTATION\_DIRECT.CLOCK\_WISE          | Type of control (0 = MODBUS, 1 = 0-10V)                                                                                                    |
| Input Const | `tTimeUpdateSetp`     | `TIME`                     | TIME#45s0ms                                     | <p>Update interval for operations influenced by the input<br>'xUpdateSetp'</p>                                                             |
| Input Const | `tTimeUpdateActual`   | `TIME`                     | TIME#3s0ms                                      | <p>Update interval for operations influenced by the input<br>'xUpdateActual'</p>                                                           |
