Omron C200HX Computer Hardware User Manual


 
340
Overview DSW(––) is used to read the value set on a digital switch connected to I/O Units.
When the execution condition is OFF, DSW(––) is not executed. When the
execution condition is ON, DSW(––) reads the 8-digit value set on the digital
switch from IW and places the result in R.
The 8-digit value it is placed in R and R+1, with the most significant digits placed
in R+1.
DSW(––) reads the 8-digit value in 20 executions, and then starts over and con-
tinues reading the data.
The digital switch must provide four data lines and one latch signal line and read
signal line for each digit being input.
Precautions I/O refreshing must be performed for all I/O points used by DSW(––) each time it
is executed to ensure effective operation. The I/O REFRESH instruction must
thus be used with DSW(––) whenever DSW(––) is used in a subroutine to en-
sure that the I/O points are refreshed each execution. Refer to page 350 for an
example of this type of programming.
DSW(––) will be executed from the first cycle whenever program execution is
started, including restarts made after power interruptions.
Do not use DSW(––) more than twice in the program.
DSW(––) cannot be used for I/O Units mounted to Slave Racks.
Note Input and output bits not used here can be used as ordinary input and output bits.
Hardware With this instruction, 8-digit BCD set values are read from a digital switch.
DSW(––) utilizes 5 output bits and 8 input bits. Connect the digital switch and the
Input and Output Units as shown in the diagram below. Output point 5 will be
turned ON when one round of data is read, but there is no need to connect output
point 5 unless required for the application.
1
3
5
7
9
11
13
15
COM
0
2
4
6
8
10
12
14
COM
ID212
1
3
5
7
9
11
13
15
COM
0
2
4
6
8
10
12
14
COM
OD212
D
0
D
1
D
2
D
3
D
0
D
1
D
2
D
3
CS
0
CS
1
CS
2
CS
3
RD
D
0
D
1
D
2
D
3
D
0
D
1
D
2
D
3
CS
0
CS
1
CS
2
CS
3
RD
Interface
A7E data line
leftmost digits
To A7E chip selection
To A7E RD terminal
Leftmost digits
A7E
Rightmost digits
A7E data line rightmost digits
Input Unit
Output Unit
Note An interface to convert signals from 5 V to 24 V is
required to connect an A7E digital switch.
Advanced I/O Instructions Section 5-28