EasyManua.ls Logo

Omron CQM1 - Page 116

Omron CQM1
312 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
97
Programming and Adjustment Section 3-3
SCL
The following is an example of SCL instruction use.
When input 00000 turns ON, the conversion data of Word 002 is scaled
according to the parameters set in DM 0100 and DM 0102 and the result is
stored in DM 0000.
Scaling is executed so that 0030 to 0FD0 (hexadecimal) will correspond to
0000 to 0100 (BCD).
SCL2
The following is an example of SCL2 instruction use.
When input 00000 turns ON, the conversion data of Word 002 is scaled
according to the parameters set in DM 0100 to DM 0102 and the result is
stored in DM 0000.
Scaling is executed by subtracting 30 (hexadecimal) from the conversion data
and multiplying the result by 1/40 (0001 (BCD)/0028 (hexadecimal)) so that
0030 to 0FD0 (hexadecimal) will correspond to 0 to 100 (BCD).
Program Example for Scaling Conversion Data in an Input Range of –10
to 10 V into a Positive Value
The SCL2 instruction processes negative values expressed by 2’s comple-
ment. On the other hand, the SCL instruction cannot process negative values.
The following is an example of the scaling of negative conversion data in an
input range of –10 to 10 V into a positive value so that the positive value can
be processed by the SCL instruction.
When input 00000 turns ON, the rightmost 12 bits of the conversion data in
Word 005 is obtained by the ANDW instruction and stored in DM 0200 as
seen in the following program.
* " n" indicates the allocated word for analog input.
SCL(66)
*n
DM 0100
DM 0000
00000
DM 0100 0000 (BCD)
DM 0101
0030
(Hexadecimal)
DM 0102 0100 (BCD)
DM 0103 0FD0 (Hexadecimal)
Set value
* "n" indicates the allocated word for analog input.
SCL2( )
*n
DM 0100
DM 0000
00000
DM 0100
0030
(Hexadecimal)
DM 0101 0028 (Hexadecimal)
DM 0102 0001 (BCD)
Set value

Table of Contents

Related product manuals