Variables; Programmable Variables - Galil Motion Control CDS-3310 User Manual

Table of Contents

Advertisement

* Note that these functions are multi-valued. An application program may be used to find the correct
band.
Functions may be combined with mathematical expressions. The order of execution of mathematical
expressions is from left to right and can be over-ridden by using parentheses.

Variables

For applications that require a parameter that is variable, the CDS-3310 provides 510 variables. These
variables can be numbers or strings. A program can be written in which certain parameters, such as
position or speed, are defined as variables. The variables can later be assigned by the operator or
determined by program calculations. For example, a cut-to-length application may require that a cut
length be variable.

Programmable Variables

Each variable is defined by a name which can be up to eight characters. The name must start with an
alphabetic character, however,
numbers are permitted in the rest of the name. Spaces are not permitted. Variables can be upper or
lowercase, or any combination. Variables are case sensitive, SPEEDC≠speedC. Variable names
should not be the same as CDS-3310 instructions. For example, PR is not a good choice for a variable
name.
Examples of valid and invalid variable names are:
Valid Variable Names
Invalid Variable Names
Assigning Values to Variables
Assigned values can be numbers, internal variables and keywords, functions, controller parameters and
strings;
CDS-3310
Instruction
v1=@ABS[v7]
v2=5*@SIN[pos]
v3=@IN[1]
Instruction
PR posa
JG rpmb*70
POSA
pos1
speedC
REALLONGNAME
123
SPEED C
Interpretation
The variable, V1, is equal to the absolute value of variable V7.
The variable, V2, is equal to five times the sine of the variable,
POS.
The variable, V3, is equal to the digital value of input 1.
Interpretation
Assigns variable 'posa' to PR command
Assigns variable 'rpmb' multiplied by 70 to JG command.
; Cannot have more than 8 characters
; Cannot begin variable name with a number
; Cannot have spaces in the name
Chapter 7 Application Programming
i
37

Advertisement

Table of Contents
loading

Table of Contents