Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the following notes and explanations are followed when installing and commissioning these components.

The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under development.
For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics.
In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE® and XFC® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

Patent Pending

The TwinCAT Technology is covered, including but not limited to the following patent applications and patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

Copyright

© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


Overview

The MP-Bus library is a TwinCAT PLC library for data exchange with MP-Bus devices.

This library is to be used only in conjunction with a MP-Bus master terminal KL6771.


Target groups

This software library is intended for building automation system partners of Beckhoff Automation GmbH. The system partners operate in the field of building automation and are concerned with the installation, commissioning, expansion, maintenance and service of measurement, control and regulating systems for the technical equipment of buildings.


User requirement profile

The user of this library requires basic knowledge of the following.

  • TwinCAT PLC-Control
  • TwinCAT System Manager
  • PCs and networks
  • Structure and properties of the Beckhoff Embedded PC and its Bus Terminal system
  • Technology of MP-Bus devices
  • Relevant safety regulations for building technical equipment


Introduction

MP-Bus = Multi-Point bus

The MP-Bus (Multi-Point) is a simple sensor/actuator bus, which is used for certain sub-systems of building automation systems. The MP-Bus serves to control HVAC actuators for flaps, control valves and volumetric flow rate controllers from the Belimo Bus Solutions product range. Up to eight different devices from HVAC systems can be connected to an MP-Bus master using 3-wire technology. Additionally, a sensor can be connected to each of these eight devices; the sensor is addressed by the MP-Bus. An additional range of products with an MP-Bus connection is the FLS window ventilation system by the Belimo company (see Belimo documentation for the connection of the Belimo drives).

The MP-Bus was developed by Belimo Automation AG for connecting valves, throttle valves, air valves, fire dampers, and for window ventilation systems.


Topology

There are no restrictions whatsoever with regard to the topological structure of MP-Bus strands: star, ring, tree or mixed topologies are possible. The length of the entire bus strand depends on the selected cable cross-section and the type as well as the number of connected drives! Documentation from the Belimo Automation AG contains further information.


Programming

Content
General Information
Linking to the TwinCAT System Manager

POUs

POUs | Description
KL6771 | Communication with the MP-Bus master terminal KL6771.

POUs/Function blocks

POUs | Description
MP_DamperLinearActuator | This function block is used to control and monitor a flap and the drive of a raising/lowering valve.
MP_EV | This function block is used to control a characterised control valve of P6..W..EV-BAC series.
MP_MPX | For BELIMO Room sensor MS24A-R..-MPX.
MP_PTH | This function block is used to control and monitor a PTH sensor.
MP_Smoker | This function block is used to control and monitor a fire protection flap.
MP_UST_3 | This function block is used to control and monitor a Multi IO Module UST3.
MP_VAV | This function block is used to control and monitor a volume flow rate regulator.
MP_Window | This function block is used to control and monitor a window ventilation system (FLS).
MPL_DamperLinearActuator | This function block is used to control and monitor a flap and the drive of a raising/lowering valve.

POUs/Functions

POUs | Description
NI1000_LuS_TO_INT | This function calculates a temperature from the value of an NI1000 L&S resistor.
NI1000_TO_INT | This function calculates a temperature from the value of an NI1000 resistor.
NTC_TO_INT | This function calculates a temperature from the value of an NTC resistor.
PT1000_TO_INT | This function calculates a temperature from the value of an PT1000 resistor.

POUs/Slave addressing

POUs | Description
MP_Addressing | This function block allows an MP-Bus slave to be addressed

Data types/Enums

Data types | Description
Data_Window | Type of ventilation
MP_Error | Error messages
UST3_Ex | Scaling of the voltage
UST3_R_set | Scaling of the resistor

Data types/Structures

Data types | Description
DataKL6771 | Connection between KL6771 and the read / send function blocks.
MP_BUS_MPX_ERROR | Error messages of the "MPX" sensors
MP_Serial_Number | Serial number of the device.
UST3_SET | Data structure for setting and adjusting the scaling of the resistor measurement.


General Information

Note 		Installation
Beginning with TwinCAT 2.11 Build 2229 (R3 and x64 Engineering), the libraries "TcMPBus.lib/.lb6/.lbx" will be installed automatically.

Note 		Name of the library
This library replaces the "TcKL6771.lib/.lb6./.lbx". Only the name of the libraries has changed. The modules are still compatible.

Hardware documentation in Beckhoff Information System: KL6771 - MP-Bus master terminal

Further libraries are required

For PC systems (x86) and Embedded-PCs (CXxxxx):

  • Standard.lib
  • TcBase.lib
  • TcSystem.lib

For Bus Terminal Controller of BCxx00 series:

  • Standard.lb6
  • PlcHelperBC.lb6

For Bus Terminal Controller of BCxx50, BCxx20 and BC9191 series:

  • Standard.lbx
  • TcBaseBCxx50.lbx
  • TcSystemBCxx50.lbx

For Bus Terminal Controller of BXxx00 series:

  • Standard.lbx
  • TcBaseBX.lbx
  • TcSystemBX.lbx

Note 		Memory usage
By linking the library PLC program memory is already consumed. Depending on the application program the remaining memory can not be sufficient.


KL6771 - Linking to the TwinCAT System Manager

How do I link the KL6771 to the System Manager?

Figure 1

Select "All Types" and "Continuous" (see Figure 2).

Figure 2

Click the mouse on the first variable in the KL6771 "Parameter Status". Then press the <SHIFT> key, and hold it down. Take the mouse pointer to the last variable in the KL6771 "Input Data 10", and again click the left mouse button. Now release the <SHIFT> key again. All the terminal's data should now be highlighted (see Figure 3). Then press the "OK" button.

Figure 3

You can now check the connection. To do this, go to the KL6771 and open it. All the terminal's data should now be marked by a small arrow (see Figure 4). If that is the case, then proceed in exactly the same way with the outputs.

Figure 4


Integration in TwinCAT (CX9020)

This example describes how a simple PLC program for MP-Bus can be written in TwinCAT and how it is linked with the hardware. The task is to control an individual flap drive and change it with a button.

Unpacking the example files

Hardware

Setting up the components

The following hardware is required:

  • 1x Bus Terminal Controller CX9020
  • 1x digital 2-channel input terminal KL1002 (for the Open and Close functions)
  • 1x MP-Bus master terminal KL6771
  • 1x end terminal KL9010

Set up the hardware and the MP-Bus components as described in the associated documentation.

This example assumes that the address of the flap drive is known.

Software

Creation of the PLC program

Create a new PLC project for PC-based systems (ARM) and add the TcMPBus.lib library.

Next, generate the following global variables:

VAR_GLOBAL
    bOpen           AT %I* : BOOL;
    bClose          AT %I* : BOOL;
    arrKL6771_IN    AT %I* : ARRAY[0..11] OF BYTE;
    arrKL6771_OUT   AT %Q* : ARRAY[0..11] OF BYTE;
    stDataKL6771           : DataKL6771;
END_VAR

bOpen: Input variable for the Open button.

bClose: Input variable for the Close button.

arrKL6771_IN : Input variable for the MP-Bus terminal.

arrKL6771_OUT : Output variable for the MP-Bus terminal.

stDataKL6771 : Required for communication with MP-Bus (see DataKL6771).

All blocks with MP-Bus must be executed in one task.

Therefore, create a MAIN program (CFC) in which the KL6771() and MP_DamperLinearActuator function blocks are called. Make sure to link the communication block with arrKL6771_IN, arrKL6771_OUT and stDataKL6771.

The input SetPoint is set depending on the selected function. Link the global variables bOpen and bClose with an auxiliary variable.

Go to the task configuration and give the task a lower interval time. More detailed information can be found in the KL6771() block description.

Load the project to the CX as the boot project and save it.

Configuration in the System Manager

Create a new System Manager project, select the CX as the target system, and search for the associated hardware.

Add the PLC program created above under PLC configuration.

Now link the global variables of the PLC program with the Bus Terminal inputs and outputs, create the allocations, and activate the configuration. Then start the device in run mode.
Your CX is now ready for use.

After pressing the button the flap drive can be moved. The current position is stored in variable wActValue.


Integration into TwinCAT (BC9191)

This example describes how a simple PLC program for MP-Bus can be written in TwinCAT and how it is linked with the hardware. The task is to control an individual flap drive and change it with a button.

Unpacking the example files

Hardware

Setting up the components

The following hardware is required:

  • 1x Bus Terminal Controller BC9191
  • 1x potential feed terminal 24V DC
  • 1x digital 2-channel input terminal KL1002 (for the Open and Close functions)
  • 1x MP-Bus master terminal KL6771
  • 1x end terminal KL9010

Set up the hardware and the MP-Bus components as described in the associated documentation.

This example assumes that the address of the flap drive is known.

Software

Creation of the PLC program

Create a new PLC project for BC-based systems (BCxx50 via AMS) and add the libraries TcMPBus.lbx and TcSystemBCxx50.lbx. Then navigate to Project → Options... → Build and select Treat LREAL as REAL.

Next, generate the following global variables:

VAR_GLOBAL
    bOpen           AT %I* : BOOL;
    bClose          AT %I* : BOOL;
    arrKL6771_IN    AT %I* : ARRAY[0..11] OF BYTE;
    arrKL6771_OUT   AT %Q* : ARRAY[0..11] OF BYTE;
    stDataKL6771           : DataKL6771;
END_VAR

bOpen: Input variable for the Open button.

bClose : Input variable for the Close button.

arrKL6771_IN : Input variable for the MP-Bus terminal.

arrKL6771_OUT : Output variable for the MP-Bus terminal.

stDataKL6771 : Required for communication with MP-Bus (see DataKL6771).

All blocks with MP-Bus must be executed in one task.

Therefore, create a MAIN program (CFC) in which the KL6771() and MP_DamperLinearActuator function blocks are called. Make sure to link the communication block with arrKL6771_IN, arrKL6771_OUT and stDataKL6771.

The input SetPoint is set depending on the selected function. Link the global variables bOpen and bClose with an auxiliary variable.

Go to the task configuration and give the task a lower interval time. More detailed information can be found in the KL6771() block description.

Now load the project as a boot project to the BC and save it.

Configuration in the System Manager

Create a new System Manager project, select the BC as the target system, and search for the associated hardware.

Add the PLC program created above under PLC configuration.

Now link the global variables of the PLC program with the Bus Terminal inputs and outputs, create the allocations, and activate the configuration. Then start the device in run mode.
Your BC is now ready for use.

After pressing the button the flap drive can be moved. The current position is stored in variable wActValue.


POUs

POUs | Description
KL6771 | Communication with the MP-Bus master terminal KL6771.

Function blocks

POUs | Description
MP_DamperLinearActuator | This function block is used to control and monitor a flap and the drive of a raising/lowering valve.
MP_EV | This function block is used to control a characterised control valve of P6..W..EV-BAC series.
MP_MPX | For BELIMO Room sensor MS24A-R..-MPX.
MP_PTH | This function block is used to control and monitor a PTH sensor.
MP_Smoker | This function block is used to control and monitor a fire protection flap.
MP_UST_3 | This function block is used to control and monitor a Multi IO Module UST3.
MP_VAV | This function block is used to control and monitor a volume flow rate regulator.
MP_Window | This function block is used to control and monitor a window ventilation system (FLS).
MPL_DamperLinearActuator | This function block is used to control and monitor a flap and the drive of a raising/lowering valve.

Functions

POUs | Description
NI1000_LuS_TO_INT | This function calculates a temperature from the value of an NI1000 L&S resistor.
NI1000_TO_INT | This function calculates a temperature from the value of an NI1000 resistor.
NTC_TO_INT | This function calculates a temperature from the value of an NTC resistor.
PT1000_TO_INT | This function calculates a temperature from the value of an PT1000 resistor.

Slave addressing

POUs | Description
MP_Addressing | This function block allows an MP-Bus slave to be addressed


KL6771

Application

This function block takes care of communication with the MP-Bus master terminal KL6771. The KL6771 is configured with this block, and data exchange with the MP network is started.

Restrictions:

  • The block must only be called once for each KL6771!

  • In the PLC project this block may only be called once per cycle!

VAR_INPUT

KL6771_IN          : ARRAY [0..11] OF BYTE;

KL6771_IN: Is linked with the input process image of the MP-Bus master terminal.

VAR_OUTPUT

KL6771_OUT         : ARRAY [0..11] OF BYTE;
strDataKL6771      : DataKL6771;
bError             : BOOL;
ErrorCode          : MP_Error;
BusLoad            : INT := -1;

KL6771_OUT: Is linked with the output process image of the MP-Bus master terminal.

strDataKL6771: A data structure that is linked with the various MP-Bus function blocks and which contains communication with the KL6771 block (see DataKL6771).

bError: The output becomes TRUE as soon as an error occurs. This error is described by the variable ErrorCode.

ErrorCode: The output issues an error code when an error occurs (see MP_Error). Simultaneously bError is TRUE.

BusLoad: Utilization of the MP-Bus as a percentage.


Function blocks

POUs | Description
MP_DamperLinearActuator | This function block is used to control and monitor a flap and the drive of a raising/lowering valve.
MP_EV | This function block is used to control a characterised control valve of P6..W..EV-BAC series.
MP_MPX | For BELIMO Room sensor MS24A-R..-MPX.
MP_PTH | This function block is used to control and monitor a PTH sensor.
MP_Smoker | This function block is used to control and monitor a fire protection flap.
MP_UST_3 | This function block is used to control and monitor a Multi IO Module UST3.
MP_VAV | This function block is used to control and monitor a volume flow rate regulator.
MP_Window | This function block is used to control and monitor a window ventilation system (FLS).
MPL_DamperLinearActuator | This function block is used to control and monitor a flap and the drive of a raising/lowering valve.


MP_DamperLinearActuator

Application

This function block is used to control and monitor a flap and the drive of a raising/lowering valve.

MP_Address is used to specify the MP-Bus device with which the function block is to communicate. bStart activates communication with the MP-Bus device. bBusy indicates that the block is active. If bStart remains TRUE, the device is addressed cyclically with a period specified by the time in TMPolling. The time should be set longer than 1 second. bError is used to indicate an error in communication with the drive. The type of the error can be read with iErrorID.

A rising edge at bReset clears any pending error messages from the drive. This resets errors that affect the output variables bErr_MecOcld, bErr_ActHunt and bErrMecTrv. If the error itself is still present, the drive will set these error bits again.

SetPoint is used to adjust the position of the flap from 0..100%. The current position of the drive can be read through ActValue.

If a sensor is connected to the drive, its type is to be indicated in iSensorTyp. If no sensor is connected, the value "0" should be entered, or the variable left open. A digital sensor should be parameterized with "1". The state of the sensor can be interrogated through bMP_Sensor_Digi. Analog sensors "2..6" are output in variable iMP_Sensor_Analog.

VAR_INPUT

MP_Address             : USINT := 1;
bStart                 : BOOL;
bReset                 : BOOL;
iSensorTyp             : INT;
SetPoint               : USINT;
strDataKL6771          : DataKL6771;
TMpolling              : TIME := t#10s;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

bReset: A rising edge resets the drive's error messages.

iSensorTyp: "0" or open: no sensor is connected; "1": a digital sensor is connected; "2": an analog sensor is connected with output in mV; "3..6": output of a resistance in ohms. The appropriate conversion functions must be used in order to convert to a temperature.

SetPoint: 0..100% the flap position specified for the drive.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the drive. The default value is 10s, while the minimum time is 1s.

VAR_OUTPUT

bBusy                  : BOOL;
ActValue               : WORD;
bMP_Sensor_Digi        : BOOL;
iMP_Sensor_Analog      : INT;
iErrorID               : MP_Error;
bError                 : BOOL;
bErr_MecOvld           : BOOL;
bErr_ActHunt           : BOOL;
bErr_MecTrv            : BOOL;
bPositionSetByHand     : BOOL;
bSynchronisationActive : BOOL;

bBusy: This bit is set for as long as the block is active.

ActValue: Contains the current position of the drive (0..100%).

bMP_Sensor_Digi: If a digital sensor is connected, its state is indicated through this variable. iSensorTyp must be "1".

iMP_Sensor_Analog: If an analog sensor is connected, its value is indicated through this variable. iSensorTyp must be in the range "2..6".

iErrorID: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorID.

bErr_MecOvld: Drive error, "Overload"; the desired position could not be reached.

bErr_ActHunt: Drive error, "Regulator oscillation"; the drive is swinging backwards and forwards.

bErr_MecTrv: Drive error, "Positioning angle exceeded"; the drive has passed more than 10° beyond the adaptation position.

bPositionSetByHand: The position of the drive has been manually changed.

bSynchronisationActive: The drive synchronizes.


MP_EV

Application

This function block is used to control a characterised control valve of P6..W..EV-BAC series. Further information can be found at www.belimo.ch.

MP_Address is used to specify the MP-Bus device with which the function block is to communicate. bStart activates communication with the MP-Bus device. bBusy indicates that the block is active. If bStart remains TRUE, the device is addressed cyclically with a period specified by the time in TMPolling. The time should be set longer than 1s. bError is used to indicate an error in communication with the drive. The type of the error can be read with iErrorId.

VAR_INPUT

MP_Address                    : USINT := 1;
bStart                        : BOOL;
strDataKL6771                 : DataKL6771;
TMpolling                     : TIME := t#10s;
nOverreideControl             : E_MPBus_Override := MPBus_Override_Auto;
nRelSetpoint                  : INT;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the drive. The default value is 10s, while the minimum time is 1s.

nOverreideControl: The relative setpoint nRelSetpoint is ignored in override mode. If the command is not repeated within 120min, the override control will be disabled.

nRelSetpoint: The setpoint is interpreted either as position setpoint or as flow setpoint.

VAR_OUTPUT

bBusy                         : BOOL;
bError                        : BOOL;
iErrorId                      : MP_Error;
nAbsPos                       : INT;
rT1_SI                        : REAL;
rT2_SI                        : REAL;
rDELTA_T                      : REAL;
rP_SI                         : REAL;
nE_COOLING_SI                 : DINT;
nE_HEATING_SI                 : DINT;
nRelFlow                      : INT;
rAbsFlow_SI                   : REAL;
nRelPos                       : INT;
nRelSetPointRead              : INT;
bErrorStateT1                 : BOOL;
bErrorStateT2                 : BOOL;
bErrorStateFlowSensorErr      : BOOL;
bErrorStateMechanicalOverload : BOOL;

bBusy: This bit is set for as long as the block is active.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorId.

iErrorId: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

nAbsPos: Absolute position in °.

rT1_SI: Temperature 1 (remote) in °C.

rT2_SI: Temperature 2 (embedded) in °C.

rDELTA_T: Delta temperature in °C.

rP_SI: Power in kW.

nE_COOLING_SI: Cooling energy in kWh.

nE_HEATING_SI: Heating energy in kWh.

nRelFlow: Relative flow in %.

rAbsFlow_SI: Absolute flow in l/min.

nRelPos: Relative position in %.

nRelSetPointRead: The setpoint is interpreted either as position setpoint or as flow setpoint (related to Vmax) in %.

bErrorStateT1: Failure temperature sensor T1.

bErrorStateT2: Failure temperature sensor T2.

bErrorStateFlowSensorErr: Failure flow sensor.

bErrorStateMechanicalOverload: Mechanical overload detected.


MP_MPX

Application

For BELIMO Room sensor MS24A-R..-MPX.

MS24A-R01-MPX Temperature

MS24A-R02-MPX Temperature, CO2

MS24A-R03-MPX Temperature, VOC

MS24A-R04-MPX Temperature, CO2, VOC

MS24A-R05-MPX Temperature, Humidity

MS24A-R06-MPX Temperature, Humidity, CO2

MS24A-R07-MPX Temperature, Humidity, VOC

MS24A-R08-MPX Temperature, Humidity, CO2, VOC

VAR_INPUT

MP_Address         : USINT := 1;
bStart             : BOOL;
strDataKL6771      : DataKL6771;
TMpolling          : TIME := t#10s;
bTemp_C_F          : BOOL;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the sensor. The default value is 10s, while the minimum time is 1s.

bTemp_C_F: FALSE = °C / TRUE = °F.

VAR_OUTPUT

bBusy              : BOOL;
bError             : BOOL;
iErrorId           : MP_Error;
strMPX_ERR         : MP_BUS_MPX_ERROR;
iU                 : INT;
bDigital           : BOOL;
iTemp              : INT;
iCO2               : INT;
iVOC               : INT;
iHumidity          : INT;
bFlushStatus       : BOOL;

bBusy: This bit is set for as long as the block is active.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorId.

iErrorId: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

strMPX_ERR: Error messages of the sensor (see MP_BUS_MPX_ERROR).

iU: 0..10 V UNIT 1 mV.

bDigital: DI 24 V.

iTemp: 0..50 °C Unit: 0.01°C.

iCO2: 0..2000 ppm Unit: 1 ppm.

iVOC: 0..2000 ppm Unit: 1 ppm (pseudo).

iHumidity: 10..90% Unit: 0.01%.

bFlushStatus: VOC gradient threshold exceeded, FALSE = air quality OK, TURE = air quality not OK, flush.


MP_PTH

Application

This function block is used to control and monitor a PTH sensor.

MP_Address is used to specify the MP-Bus device with which the function block is to communicate. bStart activates communication with the MP-Bus device. bBusy indicates that the block is active. If bStart remains TRUE, the device is addressed cyclically with a period specified by the time in TMPolling. The time should be set longer than 1s. bError is used to indicate an error in communication with the sensor. The type of the error can be read with iErrorId.

If an external sensor is connected to the sensor, its type is to be indicated in iSensorTyp. If no sensor is connected, the value "0" should be entered, or the variable left open. A digital sensor should be parameterized with "3". The state of the sensor is output through the variable iYSensor.

VAR_INPUT

MP_Address         : USINT := 1;
bStart             : BOOL;
iSensorTyp         : INT;
strDataKL6771      : DataKL6771;
TMpolling          : TIME := t#10s;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

iSensorTyp: "0" or open: no sensor is connected; "1": an analog sensor is connected with voltage output in mV; "2": an output of a resistance in ohms - 1.0 ohm; "3": an output of a resistance in ohms - 0.1 ohm; "4": digital sensor.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the sensor. The default value is 10s, while the minimum time is 1s.

VAR_OUTPUT

bBusy              : BOOL;
bError             : BOOL;
iErrorId           : MP_Error;
iDampness          : INT;
iPressure          : INT;
iTemperature       : INT;
iYSensor           : INT;
byPTH_Error        : BYTE;

bBusy: This bit is set for as long as the block is active.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorId.

iErrorId: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

iDampness: Relative humidity in 0.01%.

iPressure: Differential pressure, output in 0.1 Pa.

iTemperature: Temperature in 0.01°C.

iYSensor: Y-input, iSensorTyp = "1": voltage 0..10V output in [mV]; iSensorTyp = "2": resistance output in 1.0 ohm; iSensorTyp = "3": resistance output in 0.1 ohm; iSensorTyp = "4": digital switch 0 or 1.

byPTH_Error: Sensor error - 0 - no error.

byPTH_Error | Description
Bit 0 | Servicing error
Bit 1 | Error message, sensor faulty
Bit 2 | -
Bit 3 | -
Bit 4 | Sensor (temperature/humidity) faulty
Bit 5 | A/D converter (pressure) faulty
Bit 6 | A/D converter (Y-input) faulty
Bit 7 | -


MP_Smoker

Application

This function block is used to control and monitor a fire protection flap.

MP_Address is used to specify the MP-Bus device with which the function block is to communicate. bStart activates communication with the MP-Bus device. bBusy indicates that the block is active. If bStart remains TRUE, the device is addressed cyclically with a period specified by the time in TMPolling. The time should be set longer than 1s, with a maximum of 30s. bError is used to indicate an error in communication with the drive. The type of the error can be read with iErrorID.

A rising edge at bReset clears any pending error messages from the drive. This resets errors that affect the output variables bErr_MecOcld, bErr_ActHunt and bErrMecTrv. If the error itself is still present, the drive will set these error bits again.

bOpen_Close is used to open or close the fire protection flap. TRUE causes the fire protection flap to open, while FALSE closes it. bOpen indicates that the flap is open, and bClosed indicates that it is closed. If both bits are FALSE, the drive is currently opening or closing.

A rising edge at bTest initiates a test run on the fire protection flap. Errors that have been set can be cleared with this if they are no longer present.

VAR_INPUT

MP_Address         : USINT := 1;
bStart             : BOOL := TRUE;
bTest              : BOOL;
bOpen_Close        : BOOL;
bReset             : BOOL;
strDataKL6771      : DataKL6771;
TMpolling          : TIME := t#10s;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

bTest: A rising edge starts the test run at a fire protection flap.

bOpen_Close: TRUE opens a flap, while FALSE closes a flap.

bReset: A rising edge resets the drive's error messages.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the drive. The default value is 10s, while the minimum time is 1s.

VAR_OUTPUT

bBusy              : BOOL;
bError             : BOOL;
iErrorId           : MP_Error;
bOpen              : BOOL;
bClosed            : BOOL;
bErr_MecTrv        : BOOL;
bErr_MecOvld       : BOOL;
bErr_EmFlt         : BOOL;
bErr_DmpTrv        : BOOL;
bErr_DctAlm        : BOOL;
bErr_SmAlm         : BOOL;

bBusy: This bit is set for as long as the block is active.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorId.

iErrorId: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

bOpen: Fire protection flap is open.

bClosed: Fire protection flap is closed.

bErr_MecTrv: Drive error, "Positioning angle exceeded"; the drive has passed more than 10° beyond the adaptation position.

bErr_MecOvld: Drive error, "Overload"; the desired position could not be reached.

bErr_EmFlt: Drive error, "Safety-relevant error"; ambient temperature above 72°C or motor temperature above 85°C. Error can only be reset at the factory.

bErr_DmpTrv: Drive error, "Free flap movement error"; is cleared if the test run is okay.

bErr_DctAlm: Drive error, "Channel temperature too high"; the drive is swinging backwards and forwards.

bErr_SmAlm: Drive error, "Smoke alarm".


MP_UST_3

Application

This function block is used to control and monitor a Multi IO Module UST3.

Via MP_Address it is parameterized with witch MP-Bus device the block has to communicate. bStart activates the communication to the MP-Bus device. Via bBusy is displayed, that the block is active. If bStart stays TRUE the device is called cyclical with the time TMPolling. The time is to be set larger than one second. bError displays an error at the communication to the drive. The character of the error can be read out with iErrorID.

The input data bRelay_R1 to bRelay_R3 switch the relays R1 to R3 (PIN 15 to PIN 17). The variable iUa switches the analog output 0..10 V to PIN 5. Here one digit is equal to one mV.

The data structure SETTINGS is used to parameterize the UST3. The scaling of the analog input data can be set and the resistor measuring at pin 4 can be activated. For resistor measuring the scaling of the measured resistor value can be changed. This can also be done during operation. iU1 is the analog input at PIN 3. Here one digit is equal to one mV or if you have changed the scaling within the data structure equal to 250 µV. The same is right for the analog inputs iU2_YSensor (PIN 4) or iU3 (PIN 7).

iU2_YSensor can also be used for resistor measuring. This has to be parameterized via the data structure SETTINGS. bDigital_S1 to bDigital_S3 comply with digital inputs of the UST3, PIN 7 to PIN 9.

All data is polled by the MP-Bus master terminal KL6771 automatically. The polling speed depends on the number of connected MP-Bus devices and the set polling time. The digital inputs doesn't fit for the connection of push buttons or sensors witch generate just short pulses. For safe recognition of a level change it has to be stand for one second at minimum.

VAR_INPUT

MP_Address         : USINT := 1;
bStart             : BOOL;
strDataKL6771      : DataKL6771;
TMpolling          : TIME := t#10s;
bRelay_R1          : BOOL;
bRelay_R2          : BOOL;
bRelay_R3          : BOOL;
iUa                : UINT;
SETTINGS           : UST3_SET;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the drive. The default value is 10s, while the minimum time is 1s.

bRelay_R1: Relay PIN 15.

bRelay_R2: Relay PIN 16.

bRelay_R3: Relay PIN 17.

iUa: Analog output PIN 5 (1 mV = 1 digit).

SETTINGS: Data structure to parameterize the scaling and for the setting of the resistor measurement (see UST3_SET).

VAR_OUTPUT

bBusy              : BOOL;
bError             : BOOL;
iErrorId           : MP_Error;
iU1                : INT;
iU2_YSensor        : INT;
iU3                : INT;
bDigital_S1        : BOOL;
bDigital_S2        : BOOL;
bDigital_S3        : BOOL;
iResistor          : INT;

bBusy: This bit is set for as long as the block is active.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorId.

iErrorId: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

iU1: Analog input PIN 3 (1 digit = 1 mV or 1 digit = 250 µV).

iU2_YSensor: Analog input PIN 4 (1 digit = 1 mV or 1 digit = 250 µV).

iU3: Analog input PIN 7 (1 digit = 1 mV or 1 digit = 250 µV).

bDigital_S1: Digital input PIN 8.

bDigital_S2: Digital input PIN 9.

bDigital_S3: Digital input PIN 7.

iResistor: Resistor value PIN 4.


MP_VAV

Application

This function block is used to control and monitor a volume flow rate regulator.

MP_Address is used to specify the MP-Bus device with which the function block is to communicate. bStart activates communication with the MP-Bus device. bBusy indicates that the block is active. If bStart remains TRUE, the device is addressed cyclically with a period specified by the time in TMPolling. The time should be set longer than 1 second. bError is used to indicate an error in communication with the drive. The type of the error can be read with iErrorID.

A rising edge at bReset clears any pending error messages from the drive. This resets errors that affect the output variables bErr_MecOcld, bErr_ActHunt and bErrMecTrv. If the error itself is still present, the drive will set these error bits again.

SetPoint is used to adjust the volume flow rate from 0..100%. The current position of the flap can be read through ActValue.

If a sensor is connected to the drive, its type is to be indicated in iSensorTyp. If no sensor is connected, the value "0" should be entered, or the variable left open. A digital sensor should be parameterized with "1". The state of the sensor can be interrogated through bMP_Sensor_Digi. Analog sensors "2..6" are output in variable iMP_Sensor_Analog.

A rising edge at the bOpen or bClose inputs opens or closes the drive's flap. A falling edge at these two inputs clears the command again.

MaxVol and MinVol can be used to store a maximum and minimum flow rate in the drive. A rising edge at bSet writes the data to the drive. You can obtain the current value from the output data act_MaxVol and act_MinVol. The current volume flow rate is output in the AirVolume_m3h variable.

VAR_INPUT

MP_Address             : USINT := 1;
bStart                 : BOOL;
bSet                   : BOOL;
bOpen                  : BOOL;
bClose                 : BOOL;
bReset                 : BOOL;
iSensorTyp             : INT;
SetPoint               : USINT;
MaxVol                 : WORD;
MinVol                 : WORD;
strDataKL6771          : DataKL6771;
TMpolling              : TIME := t#10s;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

bSet: A rising edge writes the MaxVol and MinVol data to the drive.

bOpen: A rising edge opens the drive's flap, while a falling edge cancels the forced ventilation.

bClose: A rising edge closes the drive's flap, while a falling edge cancels the forced closure.

bReset: A rising edge resets the drive's error messages.

iSensorTyp: "0" or open: no sensor is connected; "1": a digital sensor is connected; "2": an analog sensor is connected with output in mV; "3..6": output of a resistance in ohms. The appropriate conversion functions must be used in order to convert to a temperature.

SetPoint: 0..100% set volume flow rate.

MaxVol: 30..100% maximum volume flow rate.

MinVol: 0..100% minimum volume flow rate.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the drive. The default value is 10s, while the minimum time is 1s.

VAR_OUTPUT

bBusy                  : BOOL;
bError                 : BOOL;
iErrorID               : MP_Error;
ActValue               : WORD;
bMP_Sensor_Digi        : BOOL;
iMP_Sensor_Analog      : INT;
AirVolume_m3h          : WORD;
iVnom_m3h              : INT;
act_MaxVol             : INT;
act_MinVol             : INT;
bErr_ActHunt           : BOOL;
bErr_MecTrv            : BOOL;
bErr_MecOvld           : BOOL;

bBusy: This bit is set for as long as the block is active.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorID.

iErrorID: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

ActValue: Contains the current position of the drive (0..100%).

bMP_Sensor_Digi: If a digital sensor is connected, its state is indicated through this variable. iSensorTyp must be "1".

iMP_Sensor_Analog: If an analog sensor is connected, its value is indicated through this variable. iSensorTyp must be in the range "2..6".

AirVolume_m3h: Output of the volume flow rate in m³/h.

iVnom_m3h: Nominal volumetric airflow in m3/h. This output is available from version 1.12.0.

act_MaxVol: Maximum set volume flow rate in %.

act_MinVol: Minimum set volume flow rate in %.

bErr_ActHunt: Drive error, "Regulator oscillation"; the drive is swinging backwards and forwards.

bErr_MecTrv: Drive error, "Positioning angle exceeded"; the drive has passed more than 10° beyond the adaptation position.

bErr_MecOvld: Drive error, "Overload"; the desired position could not be reached.


MP_Window

Application

This function block is used to control and monitor a window ventilation system (FLS).

MP_Address is used to specify the MP-Bus device with which the function block is to communicate. bStart activates communication with the MP-Bus device. bBusy indicates that the block is active. If bStart remains TRUE, the device is addressed cyclically with a period specified by the time in TMPolling. The time should be set longer than 1 second. bError is used to indicate an error in communication with the FLS. The type of the error can be read with iErrorId.

ManuelMode can be used to activate or deactivate manual operation. The type of ventilation can be specified through WindowSettings.

VAR_INPUT

MP_Address             : USINT := 1;
bStart                 : BOOL;
WindowSettings         : Data_Window;
ManuelMode             : BOOL;
strDataKL6771          : DataKL6771;
TMpolling              : TIME := t#10s;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

WindowSettings: See Data_Window for the nominal ventilation settings.

ManuelMode: FALSE: manual operation is permitted. TRUE: manual operation is deactivated.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the drive. The default value is 10s, while the minimum time is 1s.

VAR_OUTPUT

bBusy                  : BOOL;
bError                 : BOOL;
iErrorId               : MP_Error;
WindowState            : Data_Window;
Window_Mech_Error      : BOOL;
Memory_Error           : BOOL;

bBusy: This bit is set for as long as the block is active.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorId.

iErrorId: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

WindowState: Current value of the parameters (see Data_Window).

Window_Mech_Error: The window or drive is blocked.

Memory_Error: The drive has a memory error. Reprogram or replace.


MPL_DamperLinearActuator

Application

This function block is used to control and monitor a flap and the drive of a raising/lowering valve.

MP_Address is used to specify the MP-Bus device with which the function block is to communicate. bStart activates communication with the MP-Bus device. bBusy indicates that the block is active. If bStart remains TRUE, the device is addressed cyclically with a period specified by the time in TMPolling. The time should be set longer than 1 second. bError is used to indicate an error in communication with the drive. The type of the error can be read with iErrorID.

SetPoint is used to adjust the position of the flap from 0..100%. The current position of the drive can be read through ActValue.

VAR_INPUT

MP_Address             : USINT := 1;
bStart                 : BOOL;
SetPoint               : USINT;
strDataKL6771          : DataKL6771;
TMpolling              : TIME := t#10s;

MP_Address: MP-Bus address of the slave.

bStart: A rising edge starts the function block. If this remains continuously TRUE, the block will be activated cyclically with a period specified in TMPolling.

SetPoint: 0..100% the flap position specified for the drive.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

TMpolling: The time for which the block should address the drive. The default value is 10s, while the minimum time is 1s.

VAR_OUTPUT

bBusy                  : BOOL;
ActValue               : WORD;
iErrorID               : MP_Error;
bError                 : BOOL;

bBusy: This bit is set for as long as the block is active.

ActValue: Contains the current position of the drive (0..100%).

iErrorID: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorID.


Functions

POUs | Description
NI1000_LuS_TO_INT | This function calculates a temperature from the value of an NI1000 L&S resistor.
NI1000_TO_INT | This function calculates a temperature from the value of an NI1000 resistor.
NTC_TO_INT | This function calculates a temperature from the value of an NTC resistor.
PT1000_TO_INT | This function calculates a temperature from the value of an PT1000 resistor.


NI1000_LuS_TO_INT

TwinCAT PLC Library: MP-Bus

NI1000_LuS_TO_INT : INT

Application

This function calculates a temperature from the value of an NI1000 L&S resistor.

Connect this function to iMP_Sensor_Analog. As output, you receive an INT variable that represents the temperature with a resolution of 0.01°C (20.5°C, for example, is represented as 2050).

The lowest valid value of 872 ohms corresponds to -30°C. If the value is smaller than this, 16#7FFD is output.

The largest valid value of 1586 ohms corresponds to 115°C. If the value is greater than this, 16#7FFE is output.

VAR_INPUT

MP_Value      : WORD;

MP_Value: Input for an ohmic NI1000 L&S sensor.

NI1000_LuS_TO_INT: Temperature in 0.01°C.


NI1000_TO_INT

TwinCAT PLC Library: MP-Bus

NI1000_TO_INT : INT

Application

This function calculates a temperature from the value of an NI1000 resistor.

Connect this function to iMP_Sensor_Analog. As output, you receive an INT variable that represents the temperature with a resolution of 0.01°C (20.5°C, for example, is represented as 2050).

The lowest valid value of 867 ohms corresponds to -25°C. If the value is smaller than this, 16#7FFD is output.

The largest valid value of 1583 ohms corresponds to 95°C. If the value is greater than this, 16#7FFE is output.

VAR_INPUT

MP_Value      : WORD;

MP_Value: Input for an ohmic NI1000 sensor.

NI1000_TO_INT: Temperature in 0.01°C.


NTC_TO_INT

TwinCAT PLC Library: MP-Bus

NTC_TO_INT : INT

Application

This function calculates a temperature from the value of an NTC resistor.

Connect this function to iMP_Sensor_Analog. As output, you receive an INT variable that represents the temperature with a resolution of 0.01°C (20.5°C, for example, is represented as 2050).

The lowest valid value of 104 ohms corresponds to 145°C. If the value is smaller than this, 16#7FFD is output.

The largest valid value of 48555 ohms corresponds to -20°C. If the value is greater than this, 16#7FFE is output.

VAR_INPUT

MP_Value      : WORD;

MP_Value: Input for an ohmic NTC sensor.

NTC_TO_INT: Temperature in 0.01°C.


PT1000_TO_INT

TwinCAT PLC Library: MP-Bus

PT1000_TO_INT : INT

Application

This function calculates a temperature from the value of an PT1000 resistor.

Connect this function to iMP_Sensor_Analog. As output, you receive an INT variable that represents the temperature with a resolution of 0.01°C (20.5°C, for example, is represented as 2050).

The lowest valid value of 862 ohms corresponds to -35°C. If the value is smaller than this, 16#7FFD is output.

The largest valid value of 1592 ohms corresponds to 155°C. If the value is greater than this, 16#7FFE is output.

VAR_INPUT

MP_Value      : WORD;

MP_Value: Input for an ohmic PT1000 sensor.

PT1000_TO_INT: Temperature in 0.01°C.


Slave addressing

TwinCAT PLC Library: MP-Bus

Slave adressing

POUs | Description
MP_Addressing | This function block allows an MP-Bus slave to be addressed


MP_Addressing

Application

This function block allows an MP-Bus slave to be addressed. It is also possible to use this function block to read the serial number of the slave.
The slave address that the slave is to receive when addressed, or of the bus device whose serial number is to be read, is passed in MP_Address. The serial number is read out on a rising edge of bReadAddr. It is output through MP_Serial_Numer_Out. A rising edge of bAddrAuto addresses a slave whose address is MP_Address. The block waits for the time set in TMOUT for the transmission of the slave with its serial number. Transmission of the serial number is initiated differently from one slave to another. Please see the documentation for the MP-Bus device for how the serial number can be sent (in most cases there is a switch on the drive which will trigger this action when pressed). No telegrams are sent to the slaves during the time specified by TMOUT.

A rising edge at bAddrManual initiates manual addressing. This requires the serial number of the drive to be stored in MP_Serial_Number_In. The serial number of the slave can be found on an adhesive label on the drive.

Example: 00234-00016-002-031 The following must be entered in the MP_Serial_Numer_IN variable:

YearAndWeek = 234

DayAndNumber = 16

DeviceFamily = 2

TestStation = 31

FamilySuffix = is not evaluated, and should therefore be ignored.

bBusy is set for as long as the block is active. An error is indicated through bError, while the error number can be read with iErrorId.

VAR_INPUT

MP_Address                : USINT := 1;
bAddrAuto                 : BOOL;
bReadAddr                 : BOOL;
bAddrManual               : BOOL;
MP_Serial_Number_IN       : MP_Serial_Number;
TMOUT                     : TIME := t#30s;
strDataKL6771             : DataKL6771;

MP_Address: The MP address that is to be used for the addressing or for reading the serial number. Valid values (1..8).

bAddrAuto: A rising edge starts the function block. The block halts other MP-Bus communication, and waits until the time set through TMOUT has elapsed for an MP-Bus slave has transmitted its serial number, for instance in response to pressing a switch. The MP-Bus address that has been configured in the MP_Address variable is then transmitted to the slave.

bReadAddr: A rising edge starts the function block. The block reads the serial number of the MP-Bus slave whose address is MP_Address.

bAddrManual: A rising edge starts the function block. The block addresses the slave that has serial number MP_Serial_Number_IN. The slave's addresses configured with MP_Serial_Number_IN.

MP_Serial_Number_IN: Serial number of the device (see MP_Serial_Number).

TMOUT: Time after the automatic addressing is interrupted.

strDataKL6771: Data structure which has to be connected to the KL6771() function block (see DataKL6771).

VAR_OUTPUT

bBusy                     : BOOL;
bError                    : BOOL;
iErrorId                  : MP_Error;
MP_Serial_Number_OUT      : MP_Serial_Number;

bBusy: This bit is set for as long as the block is active.

bError: The output becomes TRUE as soon as an error occurs. The error is described via the variable iErrorId.

iErrorId: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously bError is TRUE.

MP_Serial_Number_OUT: The serial number of the slave that is addressed or interrogated (see MP_Serial_Number).


Data types

Enums

Data types | Description
Data_Window | Type of ventilation
MP_Error | Error messages
UST3_Ex | Scaling of the voltage
UST3_R_set | Scaling of the resistor

Structures

Data types | Description
DataKL6771 | Connection between the MP-Bus master terminal KL6771 and the read / send function blocks
MP_BUS_MPX_ERROR | Error messages of the "MPX" sensors
MP_Serial_Number | Serial number of the device
UST3_SET | Data structure for setting and adjusting the scaling of the resistor measurement


Enums

Data types | Description
Data_Window | Type of ventilation
MP_Error | Error messages
UST3_Ex | Scaling of the voltage
UST3_R_set | Scaling of the resistor


Data_Window

The type of ventilation can be specified through this.

TYPE Data_Window :
(
  Window_Close   := 8,
  Window_Unlock  := 9,
  Window_Open    := 16#0A,
  Window_20      := 16#0B,
  Window_40      := 16#0C,
  Window_60      := 16#0D,
  Window_80      := 16#0E,
  Window_100     := 16#0F,
  Auto_Close     := 1,
  Auto_5_15min   := 2,
  Auto_8_30min   := 3,
  Auto_10_50min  := 4,
  Auto_open      := 5,
  Auto           := 0,
)
END_TYPE

Window_Close: Closes the window.

Window_Unlock: If you use Unlock, use the Switch on the window to restart the MP Bus communication.

Window_Open: Opens the window.

Window_20: Opens the window to 20%.

Window_40: Opens the window to 40%.

Window_60: Opens the window to 60%.

Window_80: Opens the window to 80%.

Window_100: Opens the window to 100%.

Auto_Close: Automatic closing.

Auto_5_15min: Automatic ventilation every 5-15 minutes.

Auto_8_30min: Automatic ventilation every 8-30 minutes.

Auto_10_50min: Automatic ventilation every 10-50 minutes.

Auto_open: Automatic ventilation open.

Auto: Automatic-mode.


MP_Error

Error messages of library.

TYPE MP_Error :
(
  NO_MP_ERROR                          := 0,
  WRONG_TERMINAL                       := 1,
  NO_ANSWER_FROM_KL6771                := 2,
  WRONG_MP_ADDRESS_IS_0                := 10,
  WRONG_MP_ADDRESS                     := 11,
  WRONG_SET_POINT                      := 21,
  MP_BUS_TIMEOUT_NO_ANSWER_FROM_SLAVE  := 25,
  KL6771_TIME_OUT                      := 31,
  MP_ADDRESS_IS_IN_USE                 := 32,
  MP_DISABLED                          := 33,
  MP_BUS_ERROR                         := 87,
  MP_NO_ANSWER_ON_EVENT                := 88,
  MP_NO_ANSWER                         := 89,
  MP_COM_BREAK                         := 90,
  MP_LENGTH_PARITY_ERROR               := 98,
  MP_CROSS_PARITY_ERROR                := 99,
  MP_MASTER_CONFLICT_ERROR             := 101,
  MP_GAP_TIMEOUT_ERROR                 := 102,
  MP_NO_ANSWER_SLAVE                   := 103,
  MP_ANSWER_ERROR_FLAG                 := 110,
  MP_ANSWER_WRONG_LEN                  := 111,
  MP_ANSWER_WRONG_TELEG                := 112,
)
END_TYPE

NO_MP_ERROR: No error.

WRONG_TERMINAL: Wrong terminal.

NO_ANSWER_FROM_KL6771: No answer from the MP-Bus master terminal KL6771.

WRONG_MP_ADDRESS_IS_0: MP-Bus address is 0. Only addresses 1-8 are allowed.

WRONG_MP_ADDRESS: MP-Bus address is >8. Only addresses 1-8 are allowed.

WRONG_SET_POINT: Wrong set point.

MP_BUS_TIMEOUT_NO_ANSWER_FROM_SLAVE: No answer from MP-Bus slave.

KL6771_TIME_OUT: KL6771 time out.

MP_ADDRESS_IS_IN_USE: Address is in use.

MP_DISABLED: Disabled.

MP_BUS_ERROR: MP-Bus error.

MP_NO_ANSWER_ON_EVENT: MP-Bus no answer on event.

MP_NO_ANSWER: MP-Bus no answer.

MP_COM_BREAK: MP-Bus communication break.

MP_LENGTH_PARITY_ERROR: MP-Bus length parity error.

MP_CROSS_PARITY_ERROR: MP-Bus cross parity error.

MP_MASTER_CONFLICT_ERROR: MP-Bus Master confict error.

MP_GAP_TIMEOUT_ERROR: MP-Bus GAP time out error.

MP_NO_ANSWER_SLAVE: MP-Bus no answer slave.

MP_ANSWER_ERROR_FLAG: MP-Bus answer error flag.

MP_ANSWER_WRONG_LEN: MP-Bus answer wrong length.

MP_ANSWER_WRONG_TELEG: MP-Bus wrong telegram.


UST3_Ex

Scaling of the voltage.

TYPE UST3_Ex :
(
  Ex_1mV    := 0,
  Ex_250uV  := 1,
)
END_TYPE

Ex_1mV: Scaling 0..11 V.

Ex_250uV: Scaling 0..3 V.


UST3_R_set

Scaling of the resistor.

TYPE UST3_R_set :
(
  R_1Ohm     := 0,
  R_250mOhm  := 1,
  R_4Ohm     := 2,
)
END_TYPE

R_1Ohm: Scaling 0..20kOhm.

R_250mOhm: Scaling 0..5kOhm.

R_4Ohm: Scaling 0..262kOhm.


Structures

Data types | Description
DataKL6771 | Connection between the read / send function blocks and the KL6771() function block.
MP_BUS_MPX_ERROR | Error messages of the "MPX" sensors.
MP_Serial_Number | Serial number of the device.
UST3_SET | Data structure for setting and adjusting the scaling of the resistor measurement.


DataKL6771

Connection between MP-Bus master terminal KL6771 and the read / send function blocks.

TYPE DataKL6771 :
STRUCT
  OrderNumber  : BYTE;
  ReciveData   : BOOL;
  SendData     : BOOL;
  Error        : BOOL;
  ErrorID      : MP_Error;
  pNumber      : DWORD;
END_STRUCT
END_TYPE

OrderNumber: Internal byte.

ReciveData: Data is received.

SendData: Data is sent.

Error: The output becomes TRUE as soon as an error occurs. This error is described by the variable ErrorID.

ErrorID: The output issues an error code when an error occurs (see MP_ERROR). Simultaneously Error is TRUE.

pNumber: Internal pointer.


MP_BUS_MPX_ERROR

Error messages of the "MPX" sensors (function block MP_MPX).

TYPE MP_BUS_MPX_ERROR :
STRUCT
  MP_BUS_MPX_TempSensorErr      : BOOL;
  MP_BUS_MPX_HumiditySensorErr  : BOOL;
  MP_BUS_MPX_CO2SensorErr       : BOOL;
  MP_BUS_MPX_VocSensorErr       : BOOL;
END_STRUCT
END_TYPE

MP_BUS_MPX_TempSensorErr: The temperature sensor is faulty.

MP_BUS_MPX_HumiditySensorErr: The humidity sensor is faulty.

MP_BUS_MPX_CO2SensorErr: The CO2 sensor is faulty.

MP_BUS_MPX_VocSensorErr: The VOC sensor is faulty.


MP_Serial_Number

Serial number of the device.

TYPE MP_Serial_Number :
STRUCT
  YearAndWeek   : WORD;
  DayAndNumber  : WORD;
  DeviceFamily  : BYTE;
  TestStation   : BYTE;
  FamilySuffix  : BYTE;
END_STRUCT
END_TYPE

YearAndWeek: Year and week.

DayAndNumber: Day and number.

DeviceFamily: Device family.

TestStation: Test station.

FamilySuffix: Device family suffix.


UST3_SET

Data structure for setting and adjusting the scaling of the resistor measurement.

TYPE UST3_SET :
STRUCT
  E1        : UST3_Ex;
  E2        : UST3_Ex;
  E3        : UST3_Ex;
  R_SET     : UST3_R_set;
  R_ON_OFF  : BOOL;
END_STRUCT
END_TYPE

E1: Parameter U1 (see UST3_Ex).

E2: Parameter U2 (see UST3_Ex).

E3: Parameter U3 (see UST3_Ex).

R_SET: Parameter Y (see UST3_R_set).

R_ON_OFF: Measurement R or U.


Download examples

BXxx00 Controller

BXxx00 controller "default configuration":

CX or PC TwinCAT PLC

TwinCAT PLC Control:

TwinCAT System Manager:

TwinCAT PLC "Manual Assignment of the MP Bus Address"

TwinCAT PLC Control:

TwinCAT System Manager:


Support and Service

Beckhoff and their partners around the world offer comprehensive support and service, making available fast and competent assistance with all questions related to Beckhoff products and system solutions.

Beckhoff's branch offices and representatives

Please contact your Beckhoff branch office or representative for local support and service on Beckhoff products!

The addresses of Beckhoff's branch offices and representatives round the world can be found on her internet pages:
http://www.beckhoff.com

You will also find further documentation for Beckhoff components there.

Beckhoff Headquarters

Beckhoff Automation GmbH

Huelshorstweg 20
33415 Verl
Germany

Phone: | +49(0)5246/963-0
Fax: | +49(0)5246/963-198
e-mail: | info@beckhoff.com
Beckhoff Support

Support offers you comprehensive technical assistance, helping you not only with the application of individual Beckhoff products, but also with other, wide-ranging services:

  • support
  • design, programming and commissioning of complex automation systems
  • and extensive training program for Beckhoff system components
Hotline: | +49(0)5246/963-157
Fax: | +49(0)5246/963-9157
e-mail: | support@beckhoff.com
Beckhoff Service

The Beckhoff Service Center supports you in all matters of after-sales service:

  • on-site service
  • repair service
  • spare parts service
  • hotline service
Hotline: | +49(0)5246/963-460
Fax: | +49(0)5246/963-479
e-mail: | service@beckhoff.com