MP_UST_3

MP_UST_3 1:

This function block is used to control and monitor a multi-I/O module UST3.

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 function block is active. If bStart remains TRUE, the device is addressed cyclically with a period specified by the time in TMPolling. The time must be set greater than one second. bError indicates an error in communication with the actuator. The type of the error can be read with iErrorID.

MP_UST_3 2:

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. One digit corresponds to 1 mV.

The data structure SETTINGS is used for parameterization of the UST3. The scaling of the analog input data can be set, and the resistance measurement can be enabled on PIN4. For resistance measurement, the scaling of the resistance reading can be changed. This can also be done during operation. iU1 is the analog input on PIN 3. One digit corresponds to one mV or, if the scaling in the data structure SETTINGS has been changed, 250 µV. The same applies to the analog inputs iU2_YSensor (PIN 4) and iU3 (PIN 7).iU2_YSensor can also be used for resistance measurement. This must be set via the data structure SETTINGS bDigital_S1 to bDigital_S3 correspond to the digital inputs of the UST3, PIN 7 to PIN 9.

All data is automatically polled by the KL6771 MP-Bus master terminal. The polling speed depends on the number of connected MP-Bus devices and the set polling time. The digital inputs are unsuitable for connecting push buttons or sensors, which only issue short pulses. In order to be able to register a change in signal level reliably, it must be present for at least one second.

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 positive edge starts the function block. If this remains continuously TRUE, the function block will be activated cyclically with a period specified by the time in TMPolling.

strDataKL6771: the data structure with which the KL6771 function block must be linked (see DataKL6771).

TMpolling: the time for which the function block should address the actuator. Default 10 s, minimum time 1 s.

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 for setting the scaling and the resistance 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.