Movicon Help on Line - Rel. 11.7.1301
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. |
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:
Integer numeric variables: any value can be set, even those preceded with the +/- signs. The positive number will be considered if a sign is omitted.
Numeric variables with floating point:: numbers need to be set using the same decimal point configured in the Windows international settings, as separator.
String variables: any ASCII or Unicode character can be set. The project will need to be set as "unicode" when using unicode characters so that they will get saved.
Byte array variables: when setting the values of each single byte you will need to separate them with a comma and a space like this: var_array(3) = "125, 256, 34".
Structure Variables : the values of each single byte will need to be set by separating them with a comma and a space like this: var_structure(1 byte + 1 word) = "125, 256, 34".
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:
In the display object set for displaying variables and not set with a different format in its properties
In the numeric pad to format values displayed in edit boxes. The numeric pad can also manage formats with integer numbers with floating points. Therefore, integer variables can be used for displaying and setting values with floating points, as with the display object, by using a format that includes decimal figures (ie. "x.xx"). If the numeric pad is used with variables without formats, it will behave by default using its base "%.g" format
Trend and Data Analysis objects: are displayed according to the pen variable value format and, as a consequence, the pens scales as well.
Meter objects: are displayed with scales formatted according to the variable format
Alarm Window Object: the variable's format is used for defining the display value format of the variable inserted in threshold's alarm text when using the "%(VAR00001)" syntax. In cases where nothing is specified in the variable's "Default Format" property, the "%f" default value will be used.
|
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. |
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.
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.
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.
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
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
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.
The maximum unscaled value that the variable can obtain.
The minimum unscaled Value that the variable can obtain.
The maximum scaled value that the variable can obtain.
The minimum scaled Value that the variable can obtain.
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
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
The Gain value for the scale calculation with the use of multiplication factors.
The Offset value for the scale calculation with the use of multiplication factors.