Exchange - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

Exchange

The Exchange instruction exchanges the values of two variables.
Instruction
Exchange
Data Exchange
Variables
Name
Meaning
InOut1 and
Data to
InOut2
exchange
Out
Return
value
Bit strings
OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK
InOut1
InOut2
Out
OK
Function
The Exchange instruction exchanges the values of data to exchange InOut1 and InOut2. You can spec-
ify enumerations, structures, or structure members for InOut1 and InOut2.
The following figure shows a programming example. The values in variables abc and def are
exchanged.
LD
abc
def
NY-series Instructions Reference Manual (W560)
Name
FB/FUN
FUN
I/O
Description
In-out
Data to exchange
Output
Always TRUE
An enumeration, structure, or structure member can also be specified.
Must be same data type as InOut1.
Exchange
EN
ENO
InOut1
abc
InOut2
def
Out
Graphic expression
(@)Exchange
EN
ENO
InOut1
InOut2
Valid range
Depends on data type.
TRUE only
Integers
ST
Exchange(abc, def);
2 Instruction Descriptions
ST expression
Exchange(InOut1, InOut2);
Out
Unit
Default
---
---
---
---
Times, durations,
dates, and text strings
2
2-367

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents