Swrit - Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual

Table of Contents

Advertisement

3. Instructions

SWRIT

Instruction
STACK DATA OVERWRITE
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
TB
First stack address
C
Offset value
S
Source word
TB: First stack address
TB through TB+3: Stack control words
15
TB
15
TB+1
15
TB+2
15
TB+3
566
Mnemonic
Variations
SWRIT
@SWRIT
Block program areas
Step program areas
OK
OK
Description
0
PLC memory address of the last
word in the stack (rightmost 4 digits)
0
PLC memory address of the last
word in the stack (leftmost 4 digits)
0
Stack pointer (rightmost 4 digits)
(Initial value is the rightmost 4 digits of
the PLC memory address for TB+4.)
0
Stack pointer (leftmost 4 digits)
(Initial value is the leftmost 4 digits of
the PLC memory address for TB+4.)
Function
code
Writes the source data to the specified data ele-
ment in the stack (overwriting the existing data).
640
The offset value indicates the location of the
desired data element (how many data elements
before the current pointer position).
SWRIT
SWRIT(640)
TB: First stack address
TB
C: Offset value
C
S: Source word
S
Subroutines
Interrupt tasks
OK
Data type
UINT
UINT
UINT
TB+4 through TB+(N-1): Data storage region
TB+4
TB+(N–1)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
SFC action or
transition programs
OK
OK
Size
Variable
1
1
15
0
Data storage region

Advertisement

Table of Contents
loading

Table of Contents