Advanced I/O Instructions (CQM1 Only)
2-2-5
Alternate I/O Bits
Example
The 8-digit BCD data in DM 0120 (rightmost 4 digits) and DM 0121 (leftmost 4
digits) are always displayed by means of 7SEG(88). When the contents of
DM 0120 and DM 0121 change, the display will also change.
Although the advanced I/O instructions generally using I/O bits starting from
bit 00 of the specified words, they can be programmed through intermediate
words to use other I/O bits. The following example shows how this can be
achieved for HKY(––).
The following wiring and program examples show how to use input bits
IR 00004 through IR 00007 and output bits IR 10004 through IR 10007 to
input values from a hexadecimal keypad.
Wiring Diagram (Not Complete)
ID212
0
1
2
3
4
5
6
7
Input terminals
IR 000
Program
25313 (Always ON)
15
IR 000
DM 0000
C
D
E
F
8
9
A
B
4
5
6
7
3
0
1
2
Note Power supply lines have been omitted.
Bits 04 through 07 of IR 000 are
MOVD(83)
transferred to bits 00 through 03 of DM
000
0000.
#0001
DM0000
HKY
HKY is coded using DM 0000 as the
input word and DM 0100 as the output
DM0000
word. Execution results are placed in
DM0100
DM 1000 to DM 1002.
DM1000
Bits 00 through 03 of DM 0100 are
MOVD (83)
transferred to bits 04 through 07 of IR
DM0100
100.
#0100
100
0
Output
HKY execution
Input
Section 2-2
OD212
0
1
2
3
4
5
6
7
8
9
Output Unit
IR 100
15
0
DM 0100
IR 100
129
Need help?
Do you have a question about the CPM1 and is the answer not in the manual?
Questions and answers