Omron SYSMAC C200HS Operation Manual page 161

Programmable controllers
Hide thumbs Also See for SYSMAC C200HS:
Table of Contents

Advertisement

Data Shifting
Example 1:
Basic Application
00005
25502
00006
Example 2:
Controlling Bits in Shift
Registers
00200
00201
00202
00203
00004
12800
12800
Example 3:
Control Action
The following example uses the 1-second clock pulse bit (25502) so that the
execution condition produced by 00005 is shifted into a 3-word register between
IR 010 and IR 012 every second.
I
P
R
The following program is used to control the status of the 17th bit of a shift regis-
ter running from AR 00 through AR 01. When the 17th bit is to be set, 00004 is
turned ON. This causes the jump for JMP(04) 00 not to be made for that one
cycle, and AR 0100 (the 17th bit) will be turned ON. When 12800 is OFF (i.e., at
all times except during the first cycle after 00004 has changed from OFF to ON),
the jump is executed and the status of AR 0100 will not be changed.
I
P
R
DIFU(13) 12800
JMP(04) 00
JME(05) 00
When a bit that is part of a shift register is used in OUT (or any other instruction
that controls bit status), a syntax error will be generated during the program
check, but the program will executed properly (i.e., as written).
The following program controls the conveyor line shown below so that faulty
products detected at the sensor are pushed down a shoot. To do this, the execu-
tion condition determined by inputs from the first sensor (00001) are stored in a
shift register: ON for good products; OFF for faulty ones. Conveyor speed has
been adjusted so that HR 0003 of the shift register can be used to activate a
pusher (00500) when a faulty product reaches it, i.e., when HR 0003 turns ON,
00500 is turned ON to activate the pusher.
Address Instruction
SFT(10)
00000
LD
00001
LD
010
00002
LD
012
00003
SFT(10)
Address Instruction
00000
LD
SFT(10)
00001
AND
AR 00
00002
LD
00003
LD
AR 01
00004
SFT(10)
00005
LD
00006
DIFU(13)
00007
LD
00008
JMP(04)
00009
LD
AR 0100
00010
OUT
00011
JME(05)
Section 5-15
Operands
00005
25502
00006
010
012
Operands
00200
00201
00202
00203
AR
00
AR
01
00004
12800
12800
00
12800
AR
0100
00
151

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents