beautypg.com

2 instructions – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 319

background image

2-283

2 Instructions

CP1E CPU Unit Instructions Reference Manual(W483)

Data C

ont

ro

l I

n

stru

ctio

ns

2

SCL2

Scaling 1 to 5-V Analog Input to –200 to 200

In the following example, it is assume that an analog signal from 1 to 5 V is converted and input to CIO
3 as 0000 to 1770 hexadecimal. SCL2(486) is used to convert (scale) the value in CIO 3 to a value
between –0200 and 0200 BCD.

When CIO 0.00 is ON, the contents of CIO 3 is scaled using the linear function defined by

∆X (1770),

∆Y (0400), and the offset (07D0). These values are contained in D100 to D102, and the result is output
to D200.

SCL2

3

D100

D200

0.00

S

P1

R

FED4

0.8V

0200

0000

0220

1770

5V

0000

1V

189C

5.2V

1770 Hex

(

∆X)

-0200

-0220

0400(

∆Y)

Contents of S (CIO 200)

P1: D100

P1+1:D101

P1+2:D102

Contents of R(D200)

Offset

∆X
∆Y

0

7

D

0

1

7

7

0

0

4

0

0

Offset
07D0 Hex

This manual is related to the following products: