Supported platforms: CODESYS 2.3

 

HWD_Measurements(FB)

Description

This function block monitors voltages, temperatures and the program cycle time of the control unit. All the voltages and temperatures have high and low limits, both signaled with a boolean output when exceeded. Each measurement limit has it's own parameter. Only the high limit of the program cycle time can be set and monitored.

Limitations

The low and high limit parameters for supply voltage must be set within the specified voltage range of the control unit.

 

 

Inputs

Input variable name

Data type

Range

Description

i_SupplyVoltage1

UINT

 

Supply voltage 1 measured value.

i_SupplyVoltage2

UINT

 

Supply voltage 2 measured value.

i_SupplyVoltage3

UINT

 

Supply voltage 3 measured value.

i_Ref5V

UINT

 

Reference 5V measured value.

i_Ref10V

UINT

 

Reference 10V measured value.

i_PullUp10V

UINT

 

Pull-up 10V measured value.

i_RefADC

UINT

 

 ADC reference measured value.

i_Temperature1

UINT

 

Temperature 1 measured value.

i_Temperature2

UINT

 

Temperature 2 measured value.

i_SupplyVoltageHighLimit

UINT

 

High limit of supply voltage. 100 = 1.00 volts.

i_SupplyVoltageLowLimit

UINT

 

Low limit of supply voltage. 100 = 1.00 volts.

i_Ref5VHighLimit

UINT

 

High limit of 5V reference voltage. 100 = 1.00 volts.

i_Ref5VLowLimit

UINT

 

Low limit of 5V reference voltage. 100 = 1.00 volts.

i_Ref10VHighLimit

UINT

 

High limit of 10V reference voltage. 100 = 1.00 volts.

i_Ref10VLowLimit

UINT

 

Low limit of 10V reference voltage. 100 = 1.00 volts.

i_PullUp10VHighLimit

UINT

 

High limit of 10V pull-up voltage. 100 = 1.00 volts.

i_PullUp10VLowLimit

UINT

 

Low limit of 10V pull-up voltage. 100 = 1.00 volts.

i_RefADCVHighLimit

UINT

 

High limit of ADC reference voltage. 100 = 1.00 volts.

i_RefADCVLowLimit

UINT

 

Low limit of ADC reference voltage. 100 = 1.00 volts.

i_TempHighLimit

INT

 

High limit of temperature 1. 10 = 1 °C.

i_TempLowLimit

INT

 

Low limit of temperature 1. 10 = 1 °C.

i_CycleTimeHighLimit

UINT

 

High limit of application cycle time in milliseconds.

Outputs

Output variable name

Data type

Range

Description

o_SupplyVoltage1

UINT

 

Scaled value of module supply voltage. 100 = 1.00 volts..

o_SupplyVoltage2

UINT

 

Scaled value of module power 1 voltage. 100 = 1.00 volts..

o_SupplyVoltage3

UINT

 

Scaled value of module power 2 voltage. 100 = 1.00 volts..

o_Ref5V

UINT

 

Scaled value of 5 volt reference voltage. 100 = 1.00 volts.

o_Ref10V

UINT

 

Scaled value of 10 volt reference voltage. 100 = 1.00 volts.

o_Temperature1

INT

 

Calculated value of temperature 1. 10 = 1 °C

o_Temperature2

INT

 

Calculated value of temperature 2. 10 = 1 °C

o_CycleTime

UINT

 

Latest application cycle time in milliseconds

o_CycleTimeAverage

UINT

 

Average application cycle time in milliseconds.

o_SupplyVoltage1High

BOOL

 

TRUE if supply voltage is higher than limit

o_SupplyVoltage1Low

BOOL

 

TRUE if supply voltage is lower than limit

o_SupplyVoltage2High

BOOL

 

TRUE if supply voltage is higher than limit

o_SupplyVoltage2Low

BOOL

 

TRUE if supply voltage is lower than limit

o_SupplyVoltage3High

BOOL

 

TRUE if supply voltage is higher than limit

o_SupplyVoltage3Low

BOOL

 

TRUE if supply voltage is lower than limit

o_Ref5VHigh

BOOL

 

TRUE if 5V reference voltage is higher than limit

o_Ref5VLow

BOOL

 

TRUE if 5V reference voltage is lower than limit

o_Ref10VHigh

BOOL

 

TRUE if 10V reference voltage is higher than limit

o_Ref10VLow

BOOL

 

TRUE if 10V reference voltage is lower than limit

o_PullUp10VHigh

BOOL

 

TRUE if 10V pull-up voltage is higher than limit

o_PullUp10VLow

BOOL

 

TRUE if 10V pull-up voltage is lower than limit

o_RefADCVHigh

BOOL

 

TRUE if ADC reference voltage is higher than limit

o_RefADCVLow

BOOL

 

TRUE if ADC reference voltage is lower than limit

o_Temperature1High

BOOL

 

TRUE if temperature 1 is higher than limit

o_Temperature1Low

BOOL

 

TRUE if temperature 1 is lower than limit

o_Temperature2High

BOOL

 

TRUE if temperature 2 is higher than limit

o_Temperature2Low

BOOL

 

TRUE if temperature 2 is lower than limit

o_CycleTimeHigh

BOOL

 

TRUE if application cycle time is higher than limit

 

Example code

 

This example is from Epec 5050 control unit. Measured analog inputs may vary in different hardware.

 

See also

-

 

Source file Topic000244.htm

Last updated 19-Dec-2024