Variable Engineering Data Properties

By using the variable's Engineering data you can execute the variable's value scale. In this way the variables coming from the field are read and the scaled value is written directly in the variable.

To modify Variable Engineering Data Property select the object with the mouse and use the Movicon 'Properties Window'.

 

The variable scaling is linear type only and is only significant for variables exchanged with the field. To execute scalings between variables within the project you will need to use the appropriate 'Scaling Objects List' resource which can be accessed through the 'Project Explorer' window.

 

Attention:  Fixed length Array variables do no consent individual array elements to be scaled.

 

Initial Value

This property allows you to specify the initial value to be used for a "Not Retentive" variable. At project startup the variable is set with its initial value before the project's logic is run. A retentive variable (only when in a not shared area) is not initialized on the initial value if there is a valid value in its retentivity file.

Please note that this property is not supported in the basic script interface.

 

The initial quality value, if used, is set by using the following the rules:

 

Default Format

This allows you to enter the format preset for default for displaying variable. The format types available are only those listed in the "Predefined Movicon Formats" paragraph from the "Data Formats" section.

The variable format set will be used in displaying data in the following objects:

 

 

Caution: The format set in objects that display the variable have priority over the format set in the variable.  If you want to use the format set in the variable, you must leave the "Value Format" field empty in the object displaying the variable.

 

Caution: Display formats in numeric pads created on screen (see template library), are  in  "%G" so that variables can be displayed in the most compact form possible.  In any case, values with floating points in integer numbers can be set using a preset variable format which included decimal figures. 

 

Note: This function can also solve the problems of variables with floating point approximations (floating points in 32 bit) when displayed in numeric pads.  The numeric pad will round off numbers with decimal points, as set in the variable format.  

 

Engineering Units

By using this property you can associate the engineering units to the variable. This will be displayed in the controls provided for this property's management.

 

Close bit String

When the variable is Bit type, it can be associated with a text string to identify the variable's Close value, being when the bit assumes a value other than zero. In this way, by displaying the variable in the  "Watch Window"  the string will appear directly, replacing the binary value.  In addition to this, if the variable has been inserted in a Datalogger, the recording of the variable will show  the string's caption instead of the value "1". The DataBase field, for bit type variables, is in fact defined as string type.

 

This property is available for the "Check Box Button" and "Radio Button" objects when  inserted in a Movicon  "Report Interno" object.  The moment boolean data is recorded using the DataLogger, it is executed by inserting a string data type in the database, when this data is associated to a "Check Box Button" or "Radio Button" object, the correspondence between the boolean value and the string value recorded in the table field will need to be specified.  In this case the text corresponding to the one registered in the database when the boolean value corresponds to "True" should be inserted in the "Check Box Button" or "Radio Button" object's  "Open Bit String" property.  By doing this the  "Check Box Button"  will be displayed with a tick when the table field value corresponds to the "Open Bit String"  set in the object.  In cases concerning the  "Radio Button", which is set with only two options, the second option will be marked.

 

Open Bit String

When the variable is Bit type it can be associated with a text string to identify the variable's Open value, being when the bit assumes the zero value. other than zero. In this way, by displaying the variable in the  "Watch Window"  the string will appear directly in the place of the binary value.  In addition to this, if the variable has been inserted in a Datalogger, the recording of the variable will report the string's caption instead of the value "0". The DataBase field, for bit type variables, is in fact defined as string type.

 

This property is available for the "Check Box Button" and "Radio Button" objects when  inserted in a Movicon  "Report Interno" object.  The moment boolean data is recorded using the DataLogger, it is executed by inserting a string data type in the database, when this data is associated to a "Check Box Button" or "Radio Button" object, the correspondence between the boolean value and the string value recorded in the table field will need to be specified.  In this case the text corresponding to the one registered in the database when the boolean value corresponds to "False" should be inserted in the "Check Box Button" or "Radio Button" object's  "Close Bit String" property.  By doing this the  "Check Box Button"  will be displayed with a tick when the table field value corresponds to the "Close Bit String"  set in the object.  In cases concerning the  "Radio Button", which is set with only two options, the first option will be marked.

 

 

Enable

This setting enables or disables the variables scaling property.

The mathematic formula for a variable scaling is:

 

SCALED = ((SCALED_MAX - SCALED_MIN) / (RAW_MAX - RAW_MIN) * (RAW - RAW_MIN)) + SCALED_MIN

 

Where:

 

Input: RAW

Input Min: RAW_MIN

Input Max: RAW_MAX

Scaled Min: SCALED_MIN

Scalde Max: SCALED_MAX

Output: SCALED

 

Inverse

By enabling this property the scaling will be executed in reverse.  For instance if the following was set:

 

Raw Max. Value   = 100

Raw Min. Value  = 0

Scale Max. Value = 1000

Scale Min. Value  = 0

 

When the variable obtains the raw 0 value,  the scaled value will be 1000 and when the variable obtains  the 100 value  the scaled value will be 0.

The mathematic formula for a variable inverted scaling is:

 

SCALED = ((SCALED_MAX - SCALED_MIN) / (RAW_MIN - RAW_MAX) * (RAW - RAW_MIN)) + SCALED_MAX

 

Where:

 

Input: RAW

Input Min: RAW_MIN

Input Max: RAW_MAX

Scaled Min: SCALED_MIN

Scalde Max: SCALED_MAX

Output: SCALED

 

Dead Band

This property is used for specifying the value to which the scaled data will be set the moment the raw value of the variable should exceed the maximum or minimum set limits. This property is set at '-1' for default.

 

Raw Max.

The maximum unscaled value that the variable can obtain.

 

Raw Min.

The minimum unscaled Value that the variable can obtain.

 

Scale Max.

The maximum scaled value that the variable can obtain.

 

Scale Min.

The minimum scaled Value that the variable can obtain.

 

Enable Factor

This property allows you to use the Gain and Offset factors for scale calculations.  The expressions become:

 

(Value * Gain) + Offset

 

You must consider that in this formula the"Value" parameter refers to the Movicon variable and not the Communication Driver's value.  Therefore the most explicative formula would be:

 

DriverValue = (Movicon Value * Gain) + Offset

 

Inverse Factor

This property consents the inverted use of the Gain and Offset factors for scale calculations (you will also need to check the "Enable Factor" property).  The expression will become:

 

 

You must consider that in this formula the "-value" parameter refers to the Movicon variable and not the Communication Driver's value.  Therefore the most explicative formula would be:

 

DriverValue = (Movicon Value - Offset) / Gain

 

Gain

The Gain value for the scale calculation with the use of multiplication factors.

 

Offset

The Offset value for the scale calculation with the use of multiplication factors.

 

 

See Also