Zs (zero subroutine stack), Program flow, 0 returns stack to original condition – Yaskawa LEGEND-MC User Manual

Page 254: 1 eliminates one return on stack

Advertising
background image

244

LEGEND-MC User’s Manual

ZS (Zero Subroutine Stack)

[Program Flow]

DESCRIPTION:

The ZS command is only valid from within 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.

ARGUMENTS: ZS n

where

0 returns stack to original condition

1 eliminates one return on stack

USAGE:

OPERAND USAGE:

_ZSn contains the stack level for the specified thread where n = 0 or 1. The response, an integer between
zero and seven, indicates zero for beginning condition and 15 for the deepest value.

EXAMPLES:

While Moving

Yes

Minimum value

0

In a Program

Yes

Maximum value

16

Command Line

No

Default Value

n/a

Can be Interrogated

Yes

Default Format

n/a

Used as an Operand

Yes

Distributed Control

No, Local

II1

Input Interrupt on 1

#A;JP #A;EN

Main program

#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

Advertising