EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 810

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
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...
777
Basic I/O Unit Instructions Section 3-22
Description DSW(210) outputs control signals to bits 00 to 04 of O, reads the specified
number of digits (either 4-digit or 8-digit, specified in C1) of digital switch data
line data from I, and stores the result in D and D+1. (If 4 digits are read, the
result is stored in D. If 8 digits are read, the result is stored in D and D+1.)
DSW(210) reads the 4-digit or 8-digit switch data once every 16 cycles, and
then starts over and continues reading the data. The One Round Flag (bit 05
of O) is turned ON once every 16 CPU Unit cycles.
DSW(210) reads the 4-digit or 8-digit data once in 16 cycles, and then starts
over and reads the data again in the next 16 cycles.
When executed, DSW(210) begins reading the switch data from the first of the
sixteen cycles, regardless of the point at which the last instruction was
stopped.
There is no restriction on the number of times that DSW(210) can appear in
the program.
External Connections Connect the digital switch or thumbwheel switch to Input Unit contacts 0 to 7
and Output Unit contacts 0 to 4, as shown in the following diagram. The fol-
lowing example illustrates connections for an A7B Thumbwheel Switch.
Index Registers ---
Indirect addressing
using Index Regis-
ters
,IR0 to ,IR15
–2048 to +2047 ,IR0
to –2048 to +2047
,IR15
DR0 to DR15, IR0 to
IR15
,IR0+(++) to
,IR15+(++)
,–(– –)IR0 to, –(– –
)IR15
--- --- ,IR0 to ,IR15
–2048 to +2047
,IR0 to –2048 to
+2047 ,IR15
DR0 to DR15, IR0
to IR15
,IR0+(++) to
,IR15+(++)
,–(– –)IR0 to, –(–
–)IR15
Area I O D C1 C2
COM
00
01
02
03
04
05
06
07
08
09
10
11
IN
CPM1A-20EDT
OUT
COM
00
COM
01
COM
02
03
COM
04
05
06
07
8
No. 1No. 2No. 3No. 4No. 5No. 6No. 7No. 8
4 2 1
A7B
Thumbwheel
Switch
Switch Switch Switch Switch Switch Switch Switch Switch

Table of Contents

Related product manuals