beautypg.com

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

Page 315

background image

2-279

2 Instructions

CP1E CPU Unit Instructions Reference Manual(W483)

Data C

ont

ro

l I

n

stru

ctio

ns

2

SCL

In this example, values from 0000 to 00C8 hexadecimal will be converted to negative values. SCL(194),
however, can output only unsigned BCD values from 0000 to 9999, so 0000 BCD will be output when-
ever the contents of D0.00 is between 0000 and 00C8 hexadecimal.

Reverse Scaling

Reverse scaling can also be used by setting As < Bs and Ar > Br. The following relationship will result.

Reverse scaling can be used, for example, to convert (reverse scale) 1 to 5 V (0000 to 0FA0 hexadeci-
mal) to 0300 to 0000, respectively, as shown in the following diagram.

S (unsigned binary)

Point A

Point B

R (unsigned BCD)

As

Ar

Br

Bs

S

0000Hex

1V

0FA0Hex

5V

0300

0000

R

Point A

Point B

This manual is related to the following products: