3. Instructions
554
CS/CJ/NSJ Series Instructions Reference Manual (W474)
SSET
Applicable Program Areas
Operands
TB: First stack address
TB through TB+3: Stack control words TB+4 through TB+(N-1): Data storage region
Note TB and TB+(N-1) must be in the same data area.
N: Number of words
This number specifies the stack area that contains the stack control words and the data storage
region. N must be between 5 and 65535.
z Operand Specifications
Instruction Mnemonic Variations
Function
code
Function
SET STACK SSET @SSET 630
Defines a stack of the specified length beginning
at the specified word.
Symbol
SSET
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
N Number of words 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 --- --- --- ---
N OK OK
TB: First stack address
N: Number of words
SSET(630)
TB
N
15 0
TB
15 0
TB+1
15 0
TB+2
15 0
TB+3
Stack pointer (leftmost 4 digits)
The initial value of the stack pointer is the PLC memory address of TB+4.
Stack pointer (rightmost 4 digits)
The initial value of the stack pointer is the PLC memory address of TB+4.
PC memory address of the last
word in the stack (leftmost 4 digits)
PC memory address of the last
word in the stack (rightmost 4 digits)
15 0
TB+4
TB+(N–1)
---
Data storage region