66
4-4-1 Basic Terms
Each
condition in a ladder diagram is either ON or OFF depending on the status
of
the operand bit that has been assigned to it. A normally
open condition is ON if
the
operand bit is ON; OFF if the operand bit is OFF
. A
normally closed condition
is
ON if the operand bit is OFF; OFF if the operand bit is ON. Generally speaking,
you
use a normally open
condition when you want something to happen when a
bit
is ON, and a normally closed condition when you want something to happen
when a bit is OFF.
Instruction
Instruction
00000
00000
Instruction is executed
when IR bit 00000 is ON.
Instruction is executed
when IR bit 00000 is OFF.
Normally
open
condition
Normally closed
condition
Execution Conditions 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.
Operand Bits The
operands designated for
any of the ladder instructions can be any bit in the
IR,
SR, HR, AR,
LR, or TC areas. This means that the conditions in a ladder dia
-
gram
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 spe
-
cial applications. Refer to 4-7-7 Branching Instruction Lines for details.
Logic Blocks The way that conditions correspond to what instructions is determined by the
relationship between the conditions within the instruction lines that connect
them.
Any group of conditions that go together to
create a logic result 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 pro
-
gramming and is essential when programs are to be input in mnemonic code.
4-4-2 Mnemonic Code
The
ladder diagram cannot be directly input into the PC via a Programming Con
-
sole;
LSS is required. T
o input from a Programming Console, it is necessary to
convert the ladder diagram to mnemonic code. The mnemonic code provides
exactly the same information as the ladder diagram, but in a form that can be
typed
directly into the PC. Actually you can program directly in mnemonic code,
although it in not recommended for beginners or for complex programs. Also,
regardless
of the Programming Device used, the program is stored in memory in
mnemonic form, making it important to understand mnemonic code.
Because
of the importance of
the Programming Console as a peripheral device
and
because of the importance of mnemonic code in complete understanding of
a program, we will introduce and describe the mnemonic code along with the
ladder
diagram. Remember
, you will
not need to use the mnemonic code if you
are inputting via LSS (although you can use it with LSS too, if you prefer).
Program Memory Structure The
program is input into addresses in
Program Memory
. Addresses in Program
Memory
are
slightly dif
ferent 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. Because some instructions require no
operands,
while others require up to three operands, Program Memory address
-
es can be from one to four words long.
Normally Open and
Normally Closed
Conditions
Basic Ladder Diagrams Section 4-4