563
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Table Data Processing Instructions
3
SNUM
SNUM
Applicable Program Areas
Operands
TB: First stack address
TB through TB+3: Stack control words TB+4 through TB+(N-1): Data storage region
z Operand Specifications
Instruction Mnemonic Variations
Function
code
Function
STACK SIZE READ SNUM @SNUM 638
Counts the amount of stack data (number of
words) in the specified stack.
Symbol
SNUM
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
TB First stack address UINT Variable
D Destination word UINT 1
Area
Word addresses
Indirect DM/EM
addresses
Con-
stants
Registers Flags
Pulse
bits
TR
bits
CIO WR HR AR T C DM EM
@DM
@EM
*DM
*EM
DR IR
Indirect
using IR
TK CF
TB
OK OK OK OK OK OK OK OK OK OK ---
---
--- OK --- --- --- ---
D OK
TB: First stack address
D: Destination word
SNUM(638)
TB
D
TB
0
15
TB+1
0
15
TB+2
0
15
TB+3
0
15
PLC memory address of the last
word in the stack (rightmost 4 digits)
PLC memory address of the last
word in the stack (leftmost 4 digits)
Stack pointer (rightmost 4 digits)
(Initial value is the rightmost 4 digits of
the PLC memory address for TB+4.)
Stack pointer (leftmost 4 digits)
(Initial value is the leftmost 4 digits of
the PLC memory address for TB+4.)
15 0
TB+4
TB+(N–1)
Data storage region
toto