Function Blocks

Overview

A listing of all relevant components in this library. This overview is continuously kept up to date.

Last status: 1.1.0.36

📂 Function Blocks

  • ModbusClient_RTU

  • ModbusClient_TCP

  • ModbusClient_TCP_Fast

  • ModbusValue

  • SimpleRead

    • 📂 Value (Read a single value)

      • SimpleReadValue

      • SimpleReadCoilInput

    • 📂 Values (Read multiple values at once)

      • SimpleReadArray

  • SimpleWrite

    • 📂 Value (Write a single value)

      • SimpleWriteCoil_FC05

      • SimpleWriteValueCoil

      • SimpleWriteValueFloat

      • SimpleWriteValueInt

    • 📂 Values (Write multiple values at once)

      • SimpleWriteArrayOfInt

      • SimpleWriteArrayOfWord

      • SimpleWriteCoils_FC15

📂 Manufacturer Modbus Devices

  • ABB

    • ABB_B21_23_24

    • ABB_TERRA_AC

  • BD_SENSORS

    • BD_SENSORS_DCT_531

  • BELIMO

    • BELIMO_C615QP_B_MOD

    • BELIMO_CQ24A_BAC_MOD

    • BELIMO_EPO15R_R6_MOD

    • BELIMO_GR24A_MOD_5

    • BELIMO_LM24A_MOD

    • BELIMO_LMV_D3

    • BELIMO_LR24A_MOD

    • BELIMO_LR24A_MOD_V2

    • BELIMO_NM24A_MOD

    • BELIMO_NR24A_MOD

    • BELIMO_NV24A_MOD

    • BELIMO_PRCA_BAC_S2_T

    • BELIMO_SF24A_MOD

    • BELIMO_VRU_D3_BAC_EASY

    • BELIMO_VRU_D3_BAC_FULL

    • BELIMO_VSR24A_LP1_MOD

  • DANFOSS

    • DANFOSS_NOVOCON

    • DANFOSS_VLT_HVAC_DRIVE

  • EBM-PAPST

    • EBM_SERIES_84_112_150_200_V5_0 (FunctionBlock)

    • EBM_SERIES_84_112_150_200_V6_0 (FunctionBlock)

    • EBM_SERIES_84_112_150_200_V6_3 (FunctionBlock)

  • ELSNER

    • ELSNER_P03_3_MODBUS_WITH_GPS

  • FINDER

    • FINDER_7E_46_8_400_0212

    • FINDER_7E_78_8_400_0212

    • FINDER_7M_38_8_400_0212

  • GRUNDFOS

    • GRUNDFOS_MAGNA_3_25_50_180_MONO

  • HELIOS

    • HELIOS_KWL_MODBUS_GATEWAY

  • IMI

    • IMI_TA_SLIDER_160

  • KAMPMANN

    • KAMPMANN_FAN_COIL

  • KIEBACK_UND_PETER

    • KP_MD15_MOD_N_HE

  • KLINGENBURG

    • KLINGENBURG_OJ_DRHX

  • KSB

    • KSB_PUMP_DRIVE_2_MOD

  • OPPERMANN

    • OPPERMANN_KRM_2_DZ_MOD

    • OPPERMANN_WS10_MOD

  • POWERIO

    • POWERIO_T1_B100_EASY

    • POWERIO_T1_B100_FULL

    • POWERIO_T1_BSK1_3DO_2DI_XXX_EASY

    • POWERIO_T1_BSK1_3DO_2DI_XXX_FULL

    • POWERIO_T1_BSK1_XXX_ECO_EASY

    • POWERIO_T1_BSK1_XXX_ECO_FULL

    • POWERIO_T1_BSK2_XXX_EASY

    • POWERIO_T1_BSK2_XXX_FULL

    • POWERIO_T1_BSK2_XXX_1

    • POWERIO_T1_R100

    • POWERIO_T1_R100_V2

    • POWERIO_T1_R100_4DI_EASY

    • POWERIO_T1_R100_4DI_FULL

    • POWERIO_T1_R100_8DI_EASY

    • POWERIO_T1_R100_8DI_FULL

    • POWERIO_T1_R300

    • POWERIO_T1_R310

  • PRIGNITZ

    • PRIGNITZ_CIT2

  • ROSENBERG

    • ROSENBERG_FAN_EC_MOTOR

    • ROSENBERG_FAN_EC_MOTOR_BG5_6_GEN3

  • SCHNEIDER

    • SCHNEIDER_IEM3255

  • SIEMENS

    • SIEMENS_PAC_2200

    • SIEMENS_PAC_3200

  • SPLUSS

    • AERASGARD

      • SPLUSS_AFTM_LQ_CO2_MOD

      • SPLUSS_FSFTM_CO2_MOD

      • SPLUSS_FSFTM_CO2_POTI_MOD

      • SPLUSS_KFTM_LQ_CO2_MOD

      • SPLUSS_RFTM_CO2_POTI_MOD

      • SPLUSS_RFTM_LQ_PS_CO2_WITHOUT_POT_REV2022_MOD

      • SPLUSS_RFTM_XXX_MOD

    • HYGRASGARD

      • SPLUSS_AFTF_MOD

      • SPLUSS_FSFTM_MOD

      • SPLUSS_FSFTM_POTI_MOD

      • SPLUSS_KFTF_MOD

      • SPLUSS_RPFTF_MOD

      • SPLUSS_TW_MOD

      • SPLUSS_VFTF_MOD

    • PREMASGARD

      • SPLUSS_2327_MOD_LCD

      • SPLUSS_2328_MOD_LCD

      • SPLUSS_8147_MOD_LCD

      • SPLUSS_8148_MOD_LCD

    • RYMASKON

      • SUNDS_RYMASKON_2XX_MOD

      • SUNDS_RYMASKON_2XX_MOD_V2

      • SUNDS_RYMASKON_21X_MOD

      • SUNDS_RYMASKON_22X_MOD

    • THERMASGARD

      • SPLUSS_ALTM1_MOD

      • SPLUSS_ALTM2_MOD

      • SPLUSS_ATM2_MOD

      • SPLUSS_HFTM_MOD

      • SPLUSS_MWTM_MOD

      • SPLUSS_RPTM1_MOD

      • SPLUSS_RPTM2_MOD

      • SPLUSS_RTM1_MOD

      • SPLUSS_TM65_MOD

      • SPLUSS_TM65_MOD_V2

      • SPLUSS_TM65_MOD_V3

  • SYSTEMAIR

    • SYSTEMAIR_ACCESS_CONTROL

    • SYSTEMAIR_SAVE_CONTROL

  • THERMOKON

    • THERMOKON_NOVOS_TOUCH_V2 (FunctionBlock)

    • THERMOKON_NOVOS_TOUCH_V3 (FunctionBlock)

    • THERMOKON_WRF07

    • THERMOKON_WRF07_CO2_VOC

  • THIES

    • THIES_WSC11_MOD

  • TRANE

    • TRANE_SYMBIO_800_RTWF_RTSF

  • TROX

    • TROX_BM0

    • TROX_FSL_CONTROL_3

    • TROX_VRU_BUDN

    • XM0

  • WILO

    • WILO_STRATOS_MAXO_MONO

  • ZIEHL_ABEGG

    • ZIEHL_ABEGG_ECBLUE_BASIC_MODBUS

ModbusClient_TCP

ModbusClient_RTU

SimpleReadValue

Short description

Used to read a Modbus value of various function codes as well as various data types up to 64-bit values. Addresses to be read are automatically expanded to up to 4 registers for values larger than 16 bits. The raw values can always be processed directly via an array. As a parameter, there is the option to scale values directly.

Parameter window

Inputs / Outputs and Parameters

Scope
Name
Type
Initial
Comment

Input

xEn

BOOL

TRUE

Enable / disable communication ( TRUE = enabled )

byUnitId

BYTE

0

Device address

xUpdateActual

BOOL

FALSE

Update of actual values (on every rising edge)

xResError

BOOL

FALSE

Reinitialization of the outputs ‘eErrorCodeCom’ and ‘eErrorCodeDev’ to the error-free state (on every rising edge)

Inout

ModbusClient

ModbusClientBase

Client of the device

Output

eExpectedTypeFb

EXPECTED_TYPE

Feedback - Expected data type for the received Modbus data

eFunctionCodeFb

ReadFunctionCodes

Feedback - Modbus function code for the Modbus telegram

wRegisterAddrFb

WORD

Feedback - Start address of the register for the Modbus telegram

arwRawValue

ARRAY [0..3] OF WORD

Raw values of the registers of the Modbus telegram

rScaleFactorFb

REAL

Feedback - Scale factor — Formula: rValue = rawVal * rScaleFactor

xBigEndianFb

BOOL

Feedback - Position of the most significant element in a datum ( TRUE = lowest memory location )

xSwapValueFb

BOOL

Feedback - Enable / disable swapping the positions of the bytes of a register ( TRUE = swap active )

rValue

REAL

Final value (Formula: rValue = rawVal * rScaleFactor), parameters: eExpectedType, xSwapValue, xIsBigEndian and rScaleFactor

xAlarm

BOOL

General fault ( TRUE = fault )

xAlarmCom

BOOL

General fault - Communication ( TRUE = fault )

eErrorCodeCom

ModbusErrorCode

Error code - Communication ( 0 = no error )

eErrorCodeDev

SIMPLE_READ_VALUE_ERROR_CODE

Error code - Device ( 0 = no error )

xBusy

BOOL

Communication indicator ( TRUE = communication )

Input Const

xBigEndian

BOOL

FALSE

Position of the most significant 16 bits in a datum ( TRUE = most significant 16 bits first ) ( only relevant for 32 / 64 bit )

xSwapValue

BOOL

TRUE

Enable / disable swapping the positions of the bytes of a register ( TRUE = swap active ) ( only relevant for 32 / 64 bit )

rScaleFactor

REAL

1.0

Scale factor — Formula: rValue = rawVal * rScaleFactor

eExpectedType

EXPECTED_TYPE

EXPECTED_TYPE.TYPE_UINT16

Expected data type for the received Modbus data

eFunctionCode

ReadFunctionCodes

ReadFunctionCodes.FC03_ReadHoldingRegisters

Modbus function code for the Modbus telegram

wRegisterAddr

WORD

Start address of the register for the Modbus telegram

tTimeUpdateActual

TIME

TIME#3s0ms

Update interval for the operations influenced by the input ‘xUpdateActual’

Special feature: Evaluation of actual values for function codes 01 ( Read Coils ) and 02 ( Read Discrete Inputs )

When evaluating the actual values, only the output ‘arwRawValue’ must be considered. This is an array consisting of four variables ‘arwRawValue[0]’ - ‘arwRawValue[3]’ of type WORD ( = 16 bit ). The determination of the bits to be transmitted is primarily determined by the choice of the function code ( eFunctionCode ) and the start address ( wRegisterAddr ). The number of bits to be transmitted is determined by the choice of the expected data type ( eExpectedType ). Therefore, depending on the data type, 16, 32 or 64 consecutive bits are transmitted. At least 16 consecutive bits are always transmitted. The actual values are available as follows: 16 transmitted bits: actual values in ‘arwRawValue[0]’ 32 transmitted bits: actual values in ‘arwRawValue[0]’ and ‘arwRawValue[1]’ 64 transmitted bits: actual values in ‘arwRawValue[0]’, ‘arwRawValue[1]’, ‘arwRawValue[2]’ and ‘arwRawValue[3]’ Example: Read the actual value of coil 17 Settings: eFunctionCode: ReadFunctionCodes.FC01_ReadCoils wRegisterAddr = 17 eExpectedType = EXPECTED_TYPE.TYPE_BYTE ( = 8 bit ) Due to the fact that at least 16 consecutive bits are always transmitted, the actual values of coils 17 - 32 are requested. After successful transmission, the actual values are available in the variable ‘arwRawValue[0]’: ‘arwRawValue[0].0’: actual value of coil 17 ‘arwRawValue[0].1’: actual value of coil 18 ‘arwRawValue[0].2’: actual value of coil 19 ‘arwRawValue[0].3’: actual value of coil 20 ‘arwRawValue[0].4’: actual value of coil 21 ‘arwRawValue[0].5’: actual value of coil 22 ‘arwRawValue[0].6’: actual value of coil 23 ‘arwRawValue[0].7’: actual value of coil 24 ‘arwRawValue[0].8’: actual value of coil 25 ‘arwRawValue[0].9’: actual value of coil 26 ‘arwRawValue[0].10’: actual value of coil 27 ‘arwRawValue[0].11’: actual value of coil 28 ‘arwRawValue[0].12’: actual value of coil 29 ‘arwRawValue[0].13’: actual value of coil 30 ‘arwRawValue[0].14’: actual value of coil 31 ‘arwRawValue[0].15’: actual value of coil 32

SOLVIMUS_GE20M_xxx

Function block
Description

SOLVIMUS_GE20M_GATEWAY

Read general data about the Solvimus gateway (optional)

SOLVIMUS_GE20M_MBUS_DEVICE

Read the meter number and M-Bus problem status

SOLVIMUS_GE20M_MBUS_VALUE

Read individual values per meter with specified start Modbus address. Formatting and unit are read automatically.

Example: Reading a heat quantity meter. Heat quantity as well as supply temperature.

Placement in the CODESYS CFC Editor:

Last updated