FB_ScaleAnalogHmi
Implements functions for scaling analog values with parameterization via the HMI.
Syntax:
FUNCTION_BLOCK FB_ScaleAnalogHmi EXTENDS FB_ScaleHmi
Properties
Name | Type | Access | Initial value | Description |
---|---|---|---|---|
Name | STRING | Get, Set | <SourceName> | Specifies the name of the class instance. |
FB_ScaleAnalogHmi | ||||
ScalingElectricalMax | LREAL | Get, Set | 10.0 | Maximum of the electrical voltage input. |
ScalingElectricalMin | LREAL | Get, Set | 0.0 | Minimum of the electrical voltage input. |
ScalingRawMax | LREAL | Get, Set | 32767 | Maximum of the raw analog measured value (bit). |
ScalingRawMin | LREAL | Get, Set | 0 | Minimum of the raw analog measured value (bit). |
ScalingValueMax | LREAL | Get, Set | 100.0 | Maximum of the scaled end unit. |
ScalingValueMin | LREAL | Get, Set | 0.0 | Minimum of the scaled end unit. |
UnitGroupElectrical | STRING(64) | Get, Set | ‘‘ | Physical quantity in which the electrical measurement is measured. |
UnitGroupValue | STRING(64) | Get, Set | ‘‘ | Physical quantity in which the scaled end value is measured. |
FB_Base | ||||
BaseState | Get | eNotHandled | Initialization state of the class instance. | |
Error | BOOL | Get | FALSE | Class is in an error state. |
ResultMessage | Get | - | Access to the class-internal EventLogger. | |
[ | STRING | Get | <SourceName> |
|
Methods
Name | Description |
---|---|
Reset() | Resets the error state of the class. |
FB_ScaleAnalogHmi | |
ElectricalToRaw( | Scales the electrical voltage to the raw analog measured value (bit/numeric). |
ElectricalToValue( | Scales the electrical voltage to the unit of the final scaling. |
RawToElectrical( | Scales the raw analog measured value (bit/numeric) to the electrical voltage. |
RawToValue( | Scales the raw analog measured value (bit/numeric) to the unit of the final scaling. |
ValueToElectrical( | Scales the unit of the final scaling to the electrical voltage. |
ValueToRaw( | Scales the unit of the final scaling to the raw analog measured value (bit/numeric). |
FB_ScaleHmi | |
[ | Scales a value |
FB_BaseHmi | |
Init( | Default initialization method to pass the base class. |
Interfaces
Type | Description |
---|---|
I_Base | Standard interface on FB_Base. |
I_ScaleAnalogHmi | Standard interface on FB_ScaleAnnalogHmi. |
I_ScaleAnalogScalings | Interface to the scaling minima and maxima. |
I_BaseHmi | Standard interface on FB_BaseHmi. |
I_BaseEmpty | For extension without standard interface. |
I_BaseDev | Covers all methods and properties of the base class. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT >= v3.1.4024.54 (recommended) | PC or CX (x64, x86) | Tc3_PlasticBaseApplication (>= v12.8.1.0) |