Local variables allow you to store data in memory when you start your runtime system.
To add a local variable:
For a description of the properties, see below.
Local Variables Properties
Field |
Description |
||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name |
You can use any name for a tag (79 characters) provided it follows tag name syntax and is not the same as the name of a Cicode function within the project or any included projects. See Tag Name Reserved Words for a list of restrictions on naming. |
||||||||||||||||||||||||||||||||||||||||
Data Type |
The data type of the variable (16 characters). Select one of the following supported data types:
Numeric and digital variables have a default value of 0 and string variables default to "" (empty string). If you do not specify a data type, the local variable will be treated as 16-bit integer. |
||||||||||||||||||||||||||||||||||||||||
Array Size |
In the Array Size field (8 characters), enter the size of the array (number of elements) used to store the local variable. The array will be of the data types specified in the Data Type field. The array can be one or two-dimensional. Up to 32766 elements can be used, which, for a two dimensional array, means that the size of the first dimension multiplied by the size of the second is less than or equal to 32766. When specifying a multi-dimensional array, separate the dimensions with a comma, for example "20,30"." |
||||||||||||||||||||||||||||||||||||||||
Eng Units |
The engineering units that the value represents (for example, %, deg, or mm/sec). This property is optional. If you do not specify engineering units, no engineering units are used. |
||||||||||||||||||||||||||||||||||||||||
Format |
(11 characters). The display format of the value (of the variable) when it is displayed on a graphics page, written to a file, or passed to a function (that expects a string). This property is optional. If you do not specify a format, the format defaults to ####.##. For more information, see Format Specifiers. |
||||||||||||||||||||||||||||||||||||||||
Comment |
Any useful comment (254 characters). |
Field |
Description |
---|---|
Zero Scale |
Enter the value that represents the zero point for the local variable's data (11 characters). The zero scale value is used as the lower limit for trend and bar graphs, and values below the zero scale value will cause an "Out of Range" alert message in the runtime system. |
Full Scale |
Enter the value that represents the full scale point for the local variable's data (11 characters). The full scale value is used as the upper limit for trend and bar graphs, and values above the full scale value will cause an "Out of Range" alert message in the runtime system. |
Property |
Description |
---|---|
Project |
The project in which the local tag is configured. |
See Also
Published June 2018