Omron SYSMAC C200HS Operation Manual page 142

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

Advertisement

Bit Control Instructions
Precautions
Example 1:
When There is No
Differentiated Instruction
00000
00000
22500
Example 2:
Simplifying Programming
00000
22500
00001
00002
00003
00004
00005
132
DIFU(13) and DIFD(14) operation can be uncertain when the instructions are
programmed between IL and ILC, between JMP and JME, or in subroutines. Re-
fer to 5-10 INTERLOCK and INTERLOCK CLEAR – IL(02) and ILC(03), 5-11
JUMP and JUMP END – JMP(04) and JME(05), and 5-23 Subroutines and Inter-
rupt Control for details.
In diagram A, below, whenever CMP(20) is executed with an ON execution con-
dition it will compare the contents of the two operand words (HR 10 and DM
0000) and set the arithmetic flags (GR, EQ, and LE) accordingly. If the execution
condition remains ON, flag status may be changed each cycle if the content of
one or both operands change. Diagram B, however, is an example of how
DIFU(13) can be used to ensure that CMP(20) is executed only once each time
the desired execution condition goes ON.
Diagram A
Diagram B
Although a differentiated form of MOV(21) is available, the following diagram
would be very complicated to draw using it because only one of the conditions
determining the execution condition for MOV(21) requires differentiated treat-
ment.
Address
Instruction
CMP(20)
00000
LD
HR 10
00001
CMP(20)
DM 0000
DIFU(13) 22500
Address
Instruction
00000
LD
CMP(20)
00001
DIFU(13)
HR 10
00002
LD
DM 0000
00003
CMP(20)
Address
Instruction
DIFU(13) 22500
00000
LD
00001
DIFU(13)
MOV(21)
00002
LD
00003
LD
HR 10
00004
AND NOT
DM 0000
00005
AND NOT
00006
OR LD
00007
LD
00008
AND NOT
00009
OR LD
00010
MOV(21)
Section 5-9
Operands
00000
HR
10
DM
0000
Operands
00000
22500
22500
HR
10
DM
0000
Operands
00000
22500
22500
00001
00002
00003
---
00004
00005
---
HR
10
DM
0000

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents