![Galil Motion Control DMC-40x0 Series Command Reference Manual Download Page 276](http://html1.mh-extra.com/html/galil-motion-control/dmc-40x0-series/dmc-40x0-series_command-reference-manual_558773276.webp)
266
●
ZS
DMC-40x0 Command Reference
ZS
FUNCTION:
Zero Subroutine Stack
DESCRIPTION:
The ZS command is only valid in an application program and is used to avoid returning from an
interrupt (either input or error). ZS alone returns the stack to its original condition. ZS1
adjusts the stack to eliminate one return. This turns the jump to subroutine into a jump. Do
not use RI (Return from Interrupt) when using ZS. To re-enable interrupts, you must use II
command again.
The status of the stack can be interrogated with the operand _ZSn - see operand usage below.
ARGUMENTS:
ZS n
where
n = 0 Returns stack to original condition
n = 1 Eliminates one return on stack
USAGE: DEFAULTS:
While Moving
Yes
Default Value
0
In a Program
Yes
Default Format
3.0
Command Line
No
Controller Usage
ALL CONTROLLERS
OPERAND USAGE:
_ZSn contains the stack level for the specified thread where n = 0 to 7.
EXAMPLES:
#A
;
'Main Program
II
1
;
'Input Interrupt on 1
#B
;
JP
#B
;
EN
;
'Loop
#ININT
;
'Input Interrupt
MG
"INTERRUPT"
;
'Print message
S=
_ZS
;
'Interrogate stack
S=
;
'Print stack
ZS
;
'Zero stack
S=
_ZS
;
'Interrogate stack
S=
;
'Print stack
EN
;
'End
Summary of Contents for DMC-40x0 Series
Page 2: ......
Page 4: ......
Page 10: ...vi i Table of Contents DMC 40x0 Command Reference This Page is Left Blank Intentionally ...