Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 821

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

Advertisement

3. Instructions
Precaution
• Do not read or write the system word (C2) from any other instruction. DSW(210) will not operate
correctly if the system word is accessed by another instruction. The system word is not initialized by
DSW(210) in the first cycle when program execution starts. If DSW(210) is being used from the first
cycle, clear the system word from the program.
• DSW(210) will not operate correctly if I/O refreshing is not performed with the Input Unit and Output
Unit connected to the digital switch or thumbwheel switch after DSW(210) is executed. Consequently,
set the input time constant for the Input Units used for the data line input word to a value that is
shorter than the cycle time, or do not connect the digital switch or thumbwheel switch to the following
Units.
• Basic I/O Units or High-density I/O Units mounted in a SYSMAC BUS Remote I/O Slave Rack
• Communications Slaves (DeviceNet or CompoBus/S Slaves)
• 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 (unlike the
C200HX/HG/HE and CQM1H Series).
Sample program
In this example, DSW(210) is used to read an 8-digit number from a digital switch and outputs the
resulting value constantly to D0 and D1. The digital switch is connected through CIO 100 (allocated to a
CS1W-ID211 16-point DC Input Unit) and CIO 200 (allocated to a CS1W-OD211 16-point Transistor
Output Unit).
D32000 is used as the system word.
P_On
Always ON Flag
784
DSW(210)
100
I
200
O
D
D0
C1
&1
C2
D32000
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents