Galil DMC-13X8 Home Theater Server User Manual


 
USER MANUAL Chapter 7 Application Programming 129
Operands
Operands allow motion or status parameters of the DMC-13X8 to be incorporated into programmable
variables and expressions. Most DMC commands have an equivalent operand - which are designated
by adding an underscore (_) prior to the DMC-13X8 command. The command reference indicates
which commands have an associated operand.
Status commands such as Tell Position return actual values, whereas action commands such as KP or
SP return the values in the DMC-13X8 registers. The axis designation is required following the
command.
Examples of Internal Variables:
POSX=_TPX Assigns value from Tell Position X to the variable POSX.
VAR1=_KPX*2 Assigns value from KPX multiplied by two to variable, VAR1.
JP #LOOP,_TEX>5 Jump to #LOOP if the position error of X is greater than 5
JP #ERROR,_TC=1 Jump to #ERROR if the error code equals 1.
Operands can be used in an expression and assigned to a programmable variable, but they cannot be
assigned a value. For example: _GNX=2 is invalid.
Special Operands (Keywords)
The DMC-13X8 provides a few additional operands which give access to internal variables that are not
accessible by standard DMC-13X8 commands.
KEYWORD FUNCTION
_BGn *Returns a 1 if motion on axis ‘n’ is complete, otherwise returns 0.
_BN *Returns serial # of the board.
_DA *Returns the number of arrays available
_DL *Returns the number of available labels for programming
_DM *Returns the available array memory
_HMn *Returns status of Home Switch (equals 0 or 1)
_LFn Returns status of Forward Limit switch input of axis ‘n’ (equals 0 or 1)
_LRX Returns status of Reverse Limit switch input of axis ‘n’ (equals 0 or 1)
_UL *Returns the number of available variables
TIME Free-Running Real Time Clock (off by 2.4% - Resets with power-on).
Note: TIME does not use an underscore character (_) as other keywords.
* - These keywords have corresponding commands while the keywords _LF, _LR, and TIME do not
have any associated commands. All keywords are listed in the Command Summary, Chapter 11.
Examples of Keywords:
V1=_LFX Assign V1 the logical state of the Forward Limit Switch on the X-axis
V3=TIME Assign V3 the current value of the time clock
V4=_HMW Assign V4 the logical state of the Home input on the W-axis