3. Instructions
574
CS/CJ/NSJ Series Instructions Reference Manual (W474)
SDEL
Applicable Program Areas
Operands
TB: First stack address
TB through TB+3: Stack control words TB+4 through TB+(N-1): Data storage region
Instruction Mnemonic Variations
Function
code
Function
STACK DATA DELETE SDEL @SDEL 642
Deletes the data element at the specified location
in the stack, outputs that data to the specified des-
tination word, and shifts the remaining the data in
the stack upward. The offset value indicates the
location of the desired data element (how many
data elements before the current pointer position).
Symbol
SDEL
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
C Offset value UINT 1
D Destination word UINT 1
TB: First stack address
C: Offset value
D: Destination word
SDEL(642)
TB
C
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