Mnemonic Code - Omron CPM1 Programming Manual

Hide thumbs Also See for CPM1:
Table of Contents

Advertisement

Basic Ladder Diagrams
Execution Conditions
Operand Bits
Logic Blocks
Instruction Block
4-3-2

Mnemonic Code

Program Memory
Structure
158
thing to happen when a bit is ON, and a normally closed condition when you
want something to happen when a bit is OFF.
00000
Normally open
condition
00000
Normally closed
condition
In ladder diagram programming, the logical combination of ON and OFF con-
ditions 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
instructions have execution conditions.
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 lad-
der 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-3-8 Branching Instruction Lines for
details.
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 ana-
lyzing individual logic blocks, understanding logic blocks is necessary for effi-
cient programming and is essential when programs are to be input in
mnemonic code.
An instruction block consists of all the instructions that are interconnected
across the ladder diagram. One instruction block thus consists of all the
instructions between where you can draw a horizontal line across the ladder
diagram without intersecting any vertical lines and the next place where you
can draw the same type of horizontal line.
The ladder diagram cannot be directly input into the PC via a Programming
Console; the SSS is required. To input from a Programming Console, it is nec-
essary 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 mne-
monic code.
Because of the importance of the Programming Console as a peripheral
device and because of the importance of mnemonic code in complete under-
standing of a program, we will introduce and describe the mnemonic code
along with the ladder diagram. Remember, you will not need to use the mne-
monic code if you are inputting via the SSS (although you can use it with the
SSS if you prefer).
The program is input into addresses in Program Memory. Addresses in Pro-
gram Memory are slightly different to those in other memory areas because
each address does not necessarily hold the same amount of data. Rather,
Instruction is executed
Instruction
when IR bit 00000 is ON.
Instruction is executed
Instruction
when IR bit 00000 is OFF.
Section 4-3

Advertisement

Table of Contents
loading

Table of Contents