Omron CQM1H series Operation Manual page 110

Hide thumbs Also See for CQM1H series:
Table of Contents

Advertisement

Programming and Adjustment
90
SCL
The following is an example of SCL instruction use.
00000
* "n" indicates the allocated word for analog input.
DM 0100
DM 0101
DM 0102
DM 0103
When input 00000 turns ON, the conversion data of Word 002 is scaled accord-
ing 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.
00000
* "n" indicates the allocated word for analog input.
DM 0100
DM 0101
DM 0102
When input 00000 turns ON, the conversion data of Word 002 is scaled accord-
ing 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 complement.
On the other hand, the SCL instruction cannot process negative values. The fol-
lowing 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.
The XORW instruction is used to reverse Bit 12 of the stored value so that the
range of the value will be shifted.
Set value
(BCD)
0000
(Hexadecimal)
0030
(BCD)
0100
(Hexadecimal)
0FD0
Set value
(Hexadecimal)
0030
(Hexadecimal)
0028
(BCD)
0001
Section 3-3
SCL(66)
*
n
DM 0100
DM 0000
SCL2( )
*
n
DM 0100
DM 0000

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cqm1 series

Table of Contents