Galil DMC-13X8 user manual Special Operands Keywords, Examples of Internal Variables

Models: DMC-13X8

1 210
Download 210 pages 31.17 Kb
Page 129
Image 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 VAR1=_KPX*2 JP #LOOP,_TEX>5 JP #ERROR,_TC=1

Assigns value from Tell Position X to the variable POSX. Assigns value from KPX multiplied by two to variable, VAR1. Jump to #LOOP if the position error of X is greater than 5 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

_BGn

_BN

_DA

_DL

_DM

_HMn

_LFn

_LRX

_UL

TIME

FUNCTION

*Returns a 1 if motion on axis ‘n’ is complete, otherwise returns 0. *Returns serial # of the board.

*Returns the number of arrays available

*Returns the number of available labels for programming *Returns the available array memory

*Returns status of Home Switch (equals 0 or 1)

Returns status of Forward Limit switch input of axis ‘n’ (equals 0 or 1) Returns status of Reverse Limit switch input of axis ‘n’ (equals 0 or 1) *Returns the number of available variables

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

USER MANUAL

Chapter 7 Application Programming • 129

Page 129
Image 129
Galil DMC-13X8 user manual Special Operands Keywords, Examples of Internal Variables, Examples of Keywords