
41
gram can be determined by I/O status, flag status, status contained in work
bits, timer/counter status, etc.
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
efficient programming and is essential when programs are to be input in
mnemonic code.
3-4-2
Mnemonic Code
The ladder diagram cannot be directly input into the PC via a Programming
Console. To 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,
the program is stored in memory in mnemonic form.
Because of the importance of mnemonic code, we will introduce and de-
scribe the mnemonic code along with the ladder diagram.
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,
each address holds one instruction and all of the definers and operands (de-
scribed in more detail later) required for that instruction. Because some in-
structions require one word, while others require up to five words, Program
Memory addresses can be from one to five words long.
Program Memory addresses start at 000 and run until the capacity of Pro-
gram Memory has been exhausted (144 words). The first word at each ad-
dress defines the instruction. Any definers used by the instruction are also
contained in the first word. Also, if an instruction requires only a single bit
operand (with no definer), the bit operand is also programmed on the same
line as the instruction. The rest of the words required by an instruction con-
tain the operands that specify what data is to be used. When converting to
mnemonic code, all but ladder diagram instructions are written in the same
form, one word to a line, just as they appear in the ladder diagram symbols.
An example of mnemonic code is shown below. The instructions used in it
are described later in the manual.
Address
Instruction
Operands
000
LD
DR
0001
001
AND
0001
002
OR
0002
003
LD NOT
0100
004
AND
0101
005
AND LD
006
MOV(30)
00
DR
00
007
CMP(32)
#
0100
DR
00
The address and instruction columns of the mnemonic code table are filled in
for the instruction word only. For all other lines, the left two columns are left
Logic Blocks
Program Memory Structure
Basic Programming
Section 3-4