![background image](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532073.webp)
68
In ladder diagram programming, the logical combination of ON and OFF condi-
tions before an instruction determines the compound condition under which the
instruction is executed. This condition, which is either ON or OFF, is called the
execution condition for the instruction. All instructions other than LOAD instruc-
tions have execution conditions. Execution conditions are maintained in buffers
in memory and are continuously changed by each instruction that is executed
until a LOAD or LOAD NOT instruction is used to start a new instruction line and
thus a new execution condition.
The operands designated for any of the ladder instructions can be any bit in the
data areas accessible by bit (e.g., not the DM or EM Areas). This means that the
conditions in a ladder diagram can be determined by I/O bits, flags, work bits,
timers/counters, etc. LOAD and OUTPUT instructions can also use TR Area
bits, but they do so only in special applications. Refer to 4-5-1 TR Bits for details.
The relationship between the conditions on the instruction lines that lead to an
instruction determine the execution condition for the instruction. Any group of
conditions that go together to create an execution condition for an instruction is
called a logic block. Although ladder diagrams can be written without actually
analyzing individual logic blocks, understanding logic blocks is necessary for ef-
ficient programming and is essential when programs are to be input in mnemon-
ic code.
Block programming is a form of programming that can make it easier to program
complex operations such as a series of data calculations that would be difficult to
program using ladder diagrams. Creating structured programs can shorten
cycle time, thereby improving overall system processing speed.
4-3-2 Basic Mnemonic Code
Programs can be input from a Programming Device in either graphic form (i.e.,
as a ladder diagram) or in mnemonic form (i.e., as a list of code). The mnemonic
code provides exactly the same information as the ladder diagram. You can pro-
gram directly in mnemonic code, although it is not recommended for beginners
or for complex programs. Programming in mnemonic code is also necessary
when a logic block contains more than twenty instruction lines.
Because of the importance of mnemonic code in complete understanding of a
program, we will introduce and describe the mnemonic code along with ladder
diagrams.
The program is input into addresses in Program Memory. Addresses in Program
Memory are slightly different to those in other memory areas because each ad-
dress does not necessarily hold the same amount of data. Rather, each address
holds one instruction and all of the definers and operands (described in more
detail later) required for that instruction.
Instructions can require between one and eight words in memory. The length of
an instruction depends not only on the instruction, but also on the operands used
for the instruction. If an index register is addressed directly or a data register is
used as an operand, the instruction will require one word less than when specify-
ing a word address for the operand. If a constant is designated for instructions
that use 2-word operands, the instruction will require one word more than when
specifying a word address for the operand. The possible lengths for each
instruction are provided in Section 6 Program Execution Timing.
Program Memory addresses start at 00000 and run until the capacity of Program
Memory has been exhausted. The first word at each address defines the instruc-
tion. Any definers used by the instruction are placed on the same line of code.
Also, if an instruction requires only a single bit operand (with no definer), the bit
operand is also placed on the same line as the instruction. The rest of the words
required by an instruction contain the operands that specify what data is to be
Execution Conditions
Operand Bits
Logic Blocks
Block Programming
Program Memory Structure
Basic Ladder Diagrams
Section 4-3
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...