60 Series Training - Variables

60 Series Training - Variables

Postby gseadmin » Wed Apr 08, 2009 2:34 pm

How do I set up a variable in a 60 Series indicator?

Re: 60 Series Training - Variables

Postby gseadmin » Wed Apr 08, 2009 2:38 pm

Variables are user defined memory registers within the 60 Series used to store various types of data values. The stored values may be saved, recalled and changed at any time to suit the needs of any application.

Types of Variables
60_SERIES_VARIABLES.jpg

Variable Setup Parameters
Up to 999 (660 Series) variables may be defined in any combination of variable types.
Variables are dynamically allocated. The number of variables to be used must be specified at P680.
Parameter 681 selects the individual variable to be configured.
Parameter 682 is used to name the selected variable.
Parameter 684 defines whether or not the value stored in the variable is stored in non-volatile memory.
Parameter 685 defines whether or not the variable’s value is “locked”, preventing manual entry.
Parameter 686 defines the variable type as defined in the table above.
Parameter 687 determines the number of decimal places for float type variables. *
Parameter 688 defines an integer or unsigned integer as a number, time, date, or time & date. *
Parameter 689 defines the size of a string variable. *

* Parameters 687 – 689 are only accessible per the variable type selection at parameter 686.

Accessing Variables
A variable is addressed as a system parameter. Parameter 80 (P80) is used for all variables. To specify a specific variable we include the variable number, or instance, following the parameter designation separated by a decimal point.

For example: Variable #1 would be defined as parameter 80.1, where ‘80’ is the variable parameter and ‘1’ is the variable number. Variable #2 would be defined as parameter 80.2, variable #3 as 80.3, and so on.

Variables may be accessed manually in three ways:
1. Key in the variable number and press the [ID] key.

  • Example: 1 [ID]
2. Key in the variable as a parameter and press the [SELECT] key.

  • Example: 80.1 [SELECT]
3. Enter the variable parameter in the “modes” list at setup parameters 300-309. Any parameter defined in the “modes” list is accessible by pressing [SELECT] in the normal operating mode to toggle through the defined selections.

Entering Variable Values
Variables may be assigned values manually through the front key panel, or through macro assignments.

To manually enter a value, simply access the desired variable as described above, key in the value and press [ENTER].

Time & Date values must be entered in the following formats:

Time - hh.mm.ss - hours.minutes.seconds
Date - mm.dd.yy - month.day.year

Macro assignments are accomplished by using mathematical operators and the %o command. The basic math operators are:
= equals
+ addition
- subtraction
* multiplication
/ division
\ concatenate (strings only)

Examples:
80.1P=10%o assigns the value 10 to variable #1
80.2P=20%o assigns the value 20 to variable #2
80.3P=80.1P+80.2P%o assigns the sum of variables 1 & 2 to variable 3
80.4P=book%o assigns the word ‘book’ to string variable #4
80.5P=mark%o assigns the word ‘mark’ to string variable #5
80.6P=80.4P\80.5P%o concatenates the words ‘book‘ and ‘mark’ into string variable #6

When using a variable in a math statement we must define it as a parameter by placing a ‘P’ immediately after the variable parameter. Note how the following two commands are treated differently:

80.1P=80.2%o assigns the value 80.2 to variable #1
80.1P=80.2P%o assigns variable #2’s value to variable #1

CAUTION: String variables that contain math symbols as part of their value must have the value enclosed in quotes.

80.4P=”100-55”%o assigns the string 100-55 to string variable #4
80.4P=100-55%o assigns the value 45 to string variable #4


Return to 60 Series



cron