Omron CS1D DUPLEX SYSTEM - 10-2009 Operation Manual page 357

Cs1d duplex system
Table of Contents

Advertisement

Condition Flags
!Caution Condition Flags can be tricky to use. They are manipulated by essentially all
Saving and Loading Condition Flag Status
instructions and if they are not used with the proper timing, the wrong status
may be read, leading to unexpected operation. Program Condition Flags with
caution.
The Condition Flags are cleared when the program switches tasks, so the sta-
tus of a Condition Flag cannot be passed to another task. For example the
status of a flag in task 1 cannot be read in task 2. (The flag's status must be
transferred to a bit.)
The CS1D CPU Units support instructions to save and load the Condition
Flag status (CCS(282) and CCL(283)). These can be used to access the sta-
tus of the Condition Flags at other locations in a task or in a different task.
The following example shows how the Equals Flag is used at a different loca-
tion in the same task.
Task
CMP
CCS
Instruction A
CCL
=
Instruction B
Section 8-20
Stores result of comparison in the Condition
Flags. This will enable loading the results to
use with Instruction B.
Saves status of Condition Flags.
Loads the statuses of the Conditions Flags
that were stored.
The result of the comparison instruction in the
Equals Flag can be used by Instruction B
without interference from Instruction A.
321

Advertisement

Table of Contents
loading

Table of Contents