External Connections - Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
D: First Result Word
Specifies the leading word address where the external digital switch's set values will be stored.
15
D
15
D+1
(See note.)
Note: Only when C1 = 0001 hex to read 8 digits.
C1: Number of Digits
Specifies the number of digits that will be read from the external digital switch. Set C1 to 0000 hex to
read 4 digits or 0001 hex to read 8 digits.
C2: System Word
Specifies a work word used by the instruction. This word cannot be used in any other application.
15
C2
Operand Specifications
Word addresses
Area
CIO
WR
HR
I, O
OK
OK
OK
D
C1
---
---
---
C2
OK
OK
OK
Flags
Name
Error Flag
Function
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.

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 following example illustrates connections for an A7B
Thumbwheel Switch.
782
12 11
8
7
4
3
Digit 4
Digit 3
Digit 2
12 11
8
7
4
3
Digit 8
Digit 6
Digit 7
0
System word
(Cannot be accessed by the user.)
Indirect DM/EM
@DM
AR
T
C
DM
EM
@EM
OK
OK
OK
OK
OK
OK
---
---
---
---
---
OK
OK
OK
OK
OK
OK
Label
ER
OFF
0
Digit 1
0
Digit 5
addresses
Con-
stants
*DM
DR
*EM
OK
OK
---
---
---
OK
---
---
OK
Operation
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
OK
---
---
---
---
OK
TR
bits
---
---

Advertisement

Table of Contents
loading

Table of Contents