# THERMOKON\_WRF07\_CO2\_VOC

## `THERMOKON_WRF07_CO2_VOC` (FB)

FUNCTION\_BLOCK THERMOKON\_WRF07\_CO2\_VOC

### General

InOut:

| Scope       | Name                    | Type                                                 | Initial                                                                    | Comment                                                                                                                                                                   |
| ----------- | ----------------------- | ---------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Input       | `xEn`                   | `BOOL`                                               | TRUE                                                                       | Enable / disable communication ( TRUE = enabled )                                                                                                                         |
| Input       | `byUnitId`              | `BYTE`                                               | 0                                                                          | <p>Address of the device ( 1 .. 247 ) ( 1 .. 63 via DIP<br>switch, 1 .. 247 via Modbus commands )</p>                                                                     |
| 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       | `xUpdateConfig`         | `BOOL`                                               | FALSE                                                                      | <p>Update of the configuration ( on every rising<br>edge )</p>                                                                                                            |
| Input       | `xUpdateStates`         | `BOOL`                                               | FALSE                                                                      | <p>Update of the states ( on every rising edge<br>)</p>                                                                                                                   |
| Input       | `xUpdateInfo`           | `BOOL`                                               | FALSE                                                                      | <p>Update of the information ( on every rising<br>edge )</p>                                                                                                              |
| Input       | `xResDevice`            | `BOOL`                                               | FALSE                                                                      | Reset of the device ( on every rising edge ) (                                                                                                                            |
| Input       | `rSetpTempBase`         | `REAL`                                               | 22.0                                                                       | Base setpoint temperature ( degrees Celsius )                                                                                                                             |
| Input       | `xEnOffset`             | `BOOL`                                               | FALSE                                                                      | <p>Enable / disable the influence of the setpoint adjuster<br>‘rOffset’ on the setpoint temperature ( ‘rSetpTemp’ )</p>                                                   |
| Input       | `xLED1`                 | `BOOL`                                               | FALSE                                                                      | Control of LED1 ( TRUE = On )                                                                                                                                             |
| Input       | `xLED2`                 | `BOOL`                                               | FALSE                                                                      | Control of LED2 ( TRUE = On )                                                                                                                                             |
| Input       | `xLED3`                 | `BOOL`                                               | FALSE                                                                      | Control of LED3 ( TRUE = On )                                                                                                                                             |
| Input       | `xLED4`                 | `BOOL`                                               | FALSE                                                                      | Control of LED4 ( TRUE = On )                                                                                                                                             |
| Input       | `xLED5`                 | `BOOL`                                               | FALSE                                                                      | Control of LED5 ( TRUE = On )                                                                                                                                             |
| Input       | `xLED6`                 | `BOOL`                                               | FALSE                                                                      | Control of LED6 ( TRUE = On )                                                                                                                                             |
| Input       | `xLED7`                 | `BOOL`                                               | FALSE                                                                      | Control of LED7 ( TRUE = On )                                                                                                                                             |
| Input       | `xLED8`                 | `BOOL`                                               | FALSE                                                                      | Control of LED8 ( TRUE = On )                                                                                                                                             |
| Input       | `xLED9`                 | `BOOL`                                               | FALSE                                                                      | Control of LED9 ( TRUE = On )                                                                                                                                             |
| Input       | `xOverrRoomOccu`        | `BOOL`                                               | FALSE                                                                      | Override of room occupancy ( TRUE = Room occupancy active )                                                                                                               |
| Input       | `eFanLevelSelect`       | THERMOKON\_WRF07\_CO2\_VOC\_FAN\_LEVEL               | THERMOKON\_WRF07\_CO2\_VOC\_FAN\_LEVEL.FAN\_LEVEL\_AUTO                    | Selection of the current fan level                                                                                                                                        |
| Input       | `xResError`             | `BOOL`                                               | FALSE                                                                      | <p>Reinitialization of the output 'eErrorCodeCom' (on each<br>rising edge)</p>                                                                                            |
| Inout       | `ModbusClient`          | `ModbusClientBase`                                   |                                                                            | Client of the device                                                                                                                                                      |
| Output      | `rDeviceType`           | `REAL`                                               |                                                                            | Device identification                                                                                                                                                     |
| Output      | `rSensorAssembly`       | `REAL`                                               |                                                                            | Device sensor configuration                                                                                                                                               |
| Output      | `rOffset`               | `REAL`                                               |                                                                            | Current offset from setpoint - potentiometer in K ( +/- )                                                                                                                 |
| Output      | `rOffsetPercent`        | `REAL`                                               |                                                                            | <p>Current offset from setpoint - potentiometer in percent<br>0.0 = left stop, 100.0 = right stop )</p>                                                                   |
| Output      | `rSetpTemp`             | `REAL`                                               |                                                                            | Current setpoint temperature in degrees Celsius                                                                                                                           |
| Output      | `rTemp`                 | `REAL`                                               |                                                                            | Current room temperature in degrees Celsius or degrees Fahrenheit                                                                                                         |
| Output      | `rRelHumidity`          | `REAL`                                               |                                                                            | Relative room humidity in percent                                                                                                                                         |
| Output      | `rCO2`                  | `REAL`                                               |                                                                            | Current CO2 concentration in ppm                                                                                                                                          |
| Output      | `rVOC`                  | `REAL`                                               |                                                                            | Current VOC value in percent                                                                                                                                              |
| Output      | `rCO2_VOC_Mix`          | `REAL`                                               |                                                                            | Current CO2-VOC mix value in percent                                                                                                                                      |
| Output      | `xSensorOffsetInDevice` | `BOOL`                                               |                                                                            | <p>Indicator whether the calibration of the sensors must be<br>performed in the device (TRUE = calibration in device required, FALSE = calibration in<br>FB required)</p> |
| Output      | `rDewPointTemp`         | `REAL`                                               |                                                                            | Dew point temperature in degrees Celsius or Fahrenheit                                                                                                                    |
| Output      | `rAbsHumidity`          | `REAL`                                               |                                                                            | Absolute room humidity in g/m3 or grain/ft3                                                                                                                               |
| Output      | `rEnthalpy`             | `REAL`                                               |                                                                            | Enthalpy in kJ/kg or BTU/lb3                                                                                                                                              |
| Output      | `xRoomOccu`             | `BOOL`                                               |                                                                            | State of room occupancy ( TRUE = Room is occupied )                                                                                                                       |
| Output      | `xButton1`              | `BOOL`                                               | FALSE                                                                      | <p>Actuation of button 1 ( RAW, pulse with duration<br>‘tTimeButtonPulse’ )</p>                                                                                           |
| Output      | `xButton2`              | `BOOL`                                               | FALSE                                                                      | <p>Actuation of button 2 ( RAW, pulse with duration<br>‘tTimeButtonPulse’ )</p>                                                                                           |
| Output      | `xButton3`              | `BOOL`                                               | FALSE                                                                      | <p>Actuation of button 3 ( RAW, pulse with duration<br>‘tTimeButtonPulse’ )</p>                                                                                           |
| Output      | `xButton4`              | `BOOL`                                               | FALSE                                                                      | <p>Actuation of button 4 ( RAW, pulse with duration<br>‘tTimeButtonPulse’ )</p>                                                                                           |
| Output      | `xButton5`              | `BOOL`                                               | FALSE                                                                      | <p>Actuation of button 5 ( RAW, pulse with duration<br>‘tTimeButtonPulse’ )</p>                                                                                           |
| Output      | `rTLSZone`              | `REAL`                                               |                                                                            | <p>Current traffic light zone ( 0.0 = Off, 1.0 = Zone 1, 2.0 = Zone 2,<br>3.0 = Zone 3 )</p>                                                                              |
| Output      | `rFanLevel`             | `REAL`                                               |                                                                            | <p>Current fan level ( 0.0 = Level 0, 1.0 = Level 1, 2.0 =<br>Level 2, 3.0 = Level 3, 4.0 = Automatic )</p>                                                               |
| Output      | `xDI1`                  | `BOOL`                                               | FALSE                                                                      | <p>State of digital input 1 ( assignment depending on<br>function ‘eFunctionDI1’ ) ( FALSE = Open, TRUE =<br>Closed to GND )</p>                                          |
| Output      | `xDI2`                  | `BOOL`                                               | FALSE                                                                      | <p>State of digital input 2 ( assignment depending on<br>function ‘eFunctionDI2’ ) ( FALSE = Open, TRUE =<br>Closed to GND )</p>                                          |
| 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      | `xBusy`                 | `BOOL`                                               |                                                                            | Communication indicator ( TRUE = communication )                                                                                                                          |
| Input Const | `xEnOverrRoomOccu`      | `BOOL`                                               | FALSE                                                                      | <p>Enable of the input for overriding room occupancy (<br>TRUE = Override is active )</p>                                                                                 |
| Input Const | `rFanLevelMax`          | `REAL`                                               | 3.0                                                                        | Maximum fan level ( 0 - 3, -1.0 = none )                                                                                                                                  |
| Input Const | `rFanLevelMin`          | `REAL`                                               | 0.0                                                                        | Minimum fan level ( 0 - 3 )                                                                                                                                               |
| Input Const | `rTLSThreshold_23`      | `REAL`                                               | 1250.0                                                                     | Threshold for switching to range 3                                                                                                                                        |
| Input Const | `rTLSThreshold_12`      | `REAL`                                               | 750.0                                                                      | Threshold for switching to range 2                                                                                                                                        |
| Input Const | `eTLSSource`            | THERMOKON\_WRF07\_CO2\_VOC\_TLS\_SOURCE              | THERMOKON\_WRF07\_CO2\_VOC\_TLS\_SOURCE.CO2                                | Source ( = sensor value ) for the traffic light function                                                                                                                  |
| Input Const | `rResDeviceValue`       | `REAL`                                               | 2.0                                                                        | <p>Value for the register for device reset ( register 1000 )<br>( 1.0 = factory default, 2.0 = restart )</p>                                                              |
| Input Const | `eUnit`                 | THERMOKON\_WRF07\_CO2\_VOC\_UNIT                     | THERMOKON\_WRF07\_CO2\_VOC\_UNIT.SI                                        | Current unit system of the device                                                                                                                                         |
| Input Const | `rHeightAboveSeaLevel`  | `REAL`                                               | 400.0                                                                      | Height of the device above sea level in meters                                                                                                                            |
| Input Const | `rVOCOffset`            | `REAL`                                               | 0.0                                                                        | <p>Offset of the VOC sensor ( for calibration of the VOC sensor )<br>in percent</p>                                                                                       |
| Input Const | `rCO2Offset`            | `REAL`                                               | 0.0                                                                        | <p>Offset of the CO2 sensor ( for calibration of the CO2 sensor )<br>in ppm</p>                                                                                           |
| Input Const | `rHumidityOffset`       | `REAL`                                               | 0.0                                                                        | <p>Offset of the room humidity ( for calibration of the humidity sensor<br>) in percent</p>                                                                               |
| Input Const | `rTempOffset`           | `REAL`                                               | 0.0                                                                        | <p>Offset of the room temperature ( for calibration of the<br>temperature sensor ) in K</p>                                                                               |
| Input Const | `eFunctionLED9`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 9                                                                                                                                                         |
| Input Const | `eFunctionLED8`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 8                                                                                                                                                         |
| Input Const | `eFunctionLED7`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 7                                                                                                                                                         |
| Input Const | `eFunctionLED6`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 6                                                                                                                                                         |
| Input Const | `eFunctionLED5`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 5                                                                                                                                                         |
| Input Const | `eFunctionLED4`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 4                                                                                                                                                         |
| Input Const | `eFunctionLED3`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 3                                                                                                                                                         |
| Input Const | `eFunctionLED2`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 2                                                                                                                                                         |
| Input Const | `eFunctionLED1`         | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION            | THERMOKON\_WRF07\_CO2\_VOC\_LED\_FUNCTION.EXTERNAL\_CONTROL                | Function of LED 1                                                                                                                                                         |
| Input Const | `eFunctionDI2`          | THERMOKON\_WRF07\_CO2\_VOC\_DIGITAL\_INPUT\_FUNCTION | THERMOKON\_WRF07\_CO2\_VOC\_DIGITAL\_INPUT\_FUNCTION.NO\_SPECIAL\_FUNCTION | Function of digital input 2                                                                                                                                               |
| Input Const | `eFunctionDI1`          | THERMOKON\_WRF07\_CO2\_VOC\_DIGITAL\_INPUT\_FUNCTION | THERMOKON\_WRF07\_CO2\_VOC\_DIGITAL\_INPUT\_FUNCTION.NO\_SPECIAL\_FUNCTION | Function of digital input 1                                                                                                                                               |
| Input Const | `rOffsetMax`            | `REAL`                                               | 3.0                                                                        | Upper limit - setpoint potentiometer ( Kelvin )                                                                                                                           |
| Input Const | `rOffsetMin`            | `REAL`                                               | -3.0                                                                       | Lower limit - setpoint potentiometer ( Kelvin )                                                                                                                           |
| Input Const | `rSetpTempMax`          | `REAL`                                               | 30.0                                                                       | Absolute maximum - setpoint temperature ( degrees Celsius )                                                                                                               |
| Input Const | `rSetpTempMin`          | `REAL`                                               | 15.0                                                                       | Absolute minimum - setpoint temperature ( degrees Celsius )                                                                                                               |
| Input Const | `tTimeButtonPulse`      | `TIME`                                               | TIME#1s0ms                                                                 | <p>Duration of the pulse at the output if the assigned<br>button was actuated</p>                                                                                         |
| Input Const | `eButton5OutpMode`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE       | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE.RAW                         | Operating mode of the output ‘xButton1’ ( RAW, PULSE )                                                                                                                    |
| Input Const | `eButton4OutpMode`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE       | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE.RAW                         | Operating mode of the output ‘xButton1’ ( RAW, PULSE )                                                                                                                    |
| Input Const | `eButton3OutpMode`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE       | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE.RAW                         | Operating mode of the output ‘xButton1’ ( RAW, PULSE )                                                                                                                    |
| Input Const | `eButton2OutpMode`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE       | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE.RAW                         | Operating mode of the output ‘xButton1’ ( RAW, PULSE )                                                                                                                    |
| Input Const | `eButton1OutpMode`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE       | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_OUTP\_MODE.RAW                         | Operating mode of the output ‘xButton1’ ( RAW, PULSE )                                                                                                                    |
| Input Const | `eFunctionButton5`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION         | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION.NO\_SPECIAL\_FUNCTION         | Function of button 5                                                                                                                                                      |
| Input Const | `eFunctionButton4`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION         | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION.NO\_SPECIAL\_FUNCTION         | Function of button 4                                                                                                                                                      |
| Input Const | `eFunctionButton3`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION         | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION.NO\_SPECIAL\_FUNCTION         | Function of button 3                                                                                                                                                      |
| Input Const | `eFunctionButton2`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION         | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION.NO\_SPECIAL\_FUNCTION         | Function of button 2                                                                                                                                                      |
| Input Const | `eFunctionButton1`      | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION         | THERMOKON\_WRF07\_CO2\_VOC\_BUTTON\_FUNCTION.NO\_SPECIAL\_FUNCTION         | Function of button 1                                                                                                                                                      |
| Input Const | `tTimeUpdateInfo`       | `TIME`                                               | TIME#0ms                                                                   | <p>Update interval for the processes influenced by the input<br>‘xUpdateInfo’</p>                                                                                         |
| Input Const | `tTimeUpdateStates`     | `TIME`                                               | TIME#500ms                                                                 | <p>Update interval for the processes influenced by the input<br>‘xUpdateStates’</p>                                                                                       |
| Input Const | `tTimeUpdateConfig`     | `TIME`                                               | TIME#0ms                                                                   | <p>Update interval for the processes influenced by the input<br>‘xUpdateConfig’</p>                                                                                       |
| 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>                                                                                          |
