Programmable Variables - Galil Motion Control DMC-14 5 Series Manual

Table of Contents

Advertisement

Example:
PR POSX
JG RPMY*70

Programmable Variables

The DMC-14XX allows the user to create up to 126 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. Variable names should not
be the same as DMC-14XX instructions. For example, PR is not a good choice for a variable name.
Examples of valid and invalid variable names are:
Valid Variable Names
POSX
POS1
SPEEDZ
Invalid Variable Names
REALLONGNAME
123
SPEED Z
Assigning Values to Variables:
Assigned values can be numbers, internal variables and keywords, functions, controller parameters and
strings;
The range for numeric variable values is 4 bytes of integer (2
(+/-2,147,483,647.9999).
Numeric values can be assigned to programmable variables using the equal sign.
Any valid DMC-14XX function can be used to assign a value to a variable. For example,
V1=@ABS[V2] or V2=@IN[1]. Arithmetic operations are also permitted.
To assign a string value, the string must be in quotations. String variables can contain up to six
characters which must be in quotation.
Examples:
POSX=_TPX
SPEED=5.75
INPUT=@IN[2]
V2=V1+V3*V4
VAR="CAT"
Assigning Variable Values to Controller Parameters
Variable values may be assigned to controller parameters such as PR or SP.
PR V1
SP VS*2000
DMC-14x5/6
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Assigns variable POSX to PR command
Assigns variable RPMY 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
Assigns returned value from TPX command to variable POSX.
Assigns value 5.75 to variable SPEED
Assigns logical value of input 2 to variable INPUT
Assigns the value of V1 plus V3 times V4 to the variable V2.
Assign the string, CAT, to VAR
Assign V1 to PR command
Assign VS*2000 to SP command
31
)followed by two bytes of fraction
Chapter 7 Application Programming
113
i

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dmc-14 6 seriesDmc-1415Dmc-1416Dmc-1425

Table of Contents