Mathematical And Functional Expressions; Mathematical Operators - Galil Motion Control DMC-1600 Series User Manual

Table of Contents

Advertisement

_ED2
_ED3
The operands are used with the XQ command in the following format:
Where the ",1" at the end of the command line indicates a restart; therefore, the existing program
stack will not be removed when the above format executes.
The following example shows an error correction routine which uses the operands.
Example - Command Error w/Multitasking
#A
JP#A
EN
#B
N=-1
KP N
TY
EN
#CMDERR
IF _TC=6
N=1
XQ _ED2,_ED1,1
ENDIF
IF _TC=1
XQ _ED3,_ED1,1
ENDIF
EN

Mathematical and Functional Expressions

Mathematical Operators

For manipulation of data, the DMC-1600 provides the use of the following mathematical
operators:
OPERATOR
+
-
*
DMC-1600
Retry failed command (operand contains the location of the failed command)
Skip failed command (operand contains the location of the command after the failed
command)
XQ _ED2 (or _ED3),_ED1,1
FUNCTION
Addition
Subtraction
Multiplication
Begin thread 0 (continuous loop)
End of thread 0
Begin thread 1
Create new variable
Set KP to value of N, an invalid value
Issue invalid command
End of thread 1
Begin command error subroutine
If error is out of range (KP -1)
Set N to a valid number
Retry KP N command
If error is invalid command (TY)
Skip invalid command
End of command error routine
Chapter 7 Application Programming • 135

Advertisement

Table of Contents
loading

Table of Contents