Omron SYSMAC C20K Operation Manual page 41

K-type programmable controllers
Hide thumbs Also See for SYSMAC C20K:
Table of Contents

Advertisement

The Ladder Diagram
Program Memory Structure
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 no operands, while others require up to three operands,
Program Memory addresses can be from one to four words long.
Program Memory addresses start at 0000 and run until the capacity of Pro-
gram Memory has been exhausted. The first word at each address 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 instruc-
tion. The rest of the words required by an instruction contain 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 mne-
monic code is shown below. The instructions used in it are described later in
the manual.
Address Instruction
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
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
blank. If the instruction requires no definer or bit operand, the operand col-
umn is left blank for first line. It is a good idea to cross through any blank
data column spaces (for all instruction words that do not require data) so that
the data column can be quickly cycled to see if any addresses have been left
out.
When programming, addresses are automatically displayed and do not have
to be input unless for some reason a different location is desired for the in-
struction. When converting to mnemonic code, it is best to start at Program
Memory address 0000 unless there is a specific reason for starting else-
where.
Operands
LD
HR
001
AND
0001
OR
0002
LD NOT
0200
AND
0201
AND LD
0102
MOV(21)
DM
CMP(20)
DM
HR
LD
0205
OUT
0101
MOV(21)
DM
DM
DIFU(13)
0002
AND
0005
OUT
0103
Section 4-3
00
00
00
0
00
05
29

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac c40kSysmac c60kSysmac c28k

Table of Contents