Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

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

Advertisement

2 Instruction Descriptions
The following conversion is used.
Y1−Y0
(Sclln − X0) + Y0 + SclOfs
Out =
X1−X0
Notation Example
The following notation example scales an input value of 2,500 from an input range of 0 to 4,000 to an
output range of 0% to 100%. An offset of 5% is added to the output value.
The following values are used: SclIn = REAL#2500, X0 = REAL#0, X1 = REAL#4000, Y0 = REAL#0,
Y1 = REAL#100, and SclOfs = REAL#5.
The value of Out will be REAL#67.5.
LD
AIn0
REAL#0
REAL#0
REAL#4000
REAL#100
REAL#5
Output
Y1
REAL#100
Out
REAL#67.5
62.5
Y0
REAL#0
X0
An input value of 2,500 is scaled to 62.5 for an input range of 0 to 4,000
and an output range of 0 to 100. When an offset of 5 is added, Out
becomes REAL#67.5.
2-768
ScaleTrans
EN
ENO
SclIn
Out
X0
Y0
X1
Y1
SclOfs
X1
REAL#0
SclIn
REAL#2500
Output
Y1
Out
Y0
0
X0
SclIn
ST
Out :=ScaleTrans(AIn0,REAL#0,REAL#0,REAL#4000,
REAL#100,REAL#5);
ScOfs
REAL#5
Input
REAL#4000

NY-series Instructions Reference Manual (W560)

SclOfs
Input
X1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents