106
7–1 Introduction
This section provides the procedures for inputting and debugging a program
and monitoring and controlling the PC through a Programming Console. The
Programming Console is the most commonly used Programming Device for
the K-type PCs. It is compact and available both in hand-held models or
CPU-mounted models. Refer to
Appendix A Standard Models
for model num-
bers and other details.
If you are using a GPC, FIT, or a computer running LSS, refer to the
Opera-
tion Manual
for corresponding procedures on these. If you are going to use a
GPC, FIT, or a computer running LSS, but want to input in mnemonic code
rather than in ladder-diagram form, refer to
7–2 Converting to Mnemonic
Code
.
7–2 Converting to Mnemonic Code
Before a program can be input via a Programming Console, it must be con-
verted to mnemonic code. Converting a ladder diagram to mnemonic code
prepares it so that it can be keyed directly into the appropriate Program
Memory addresses.
7–2–1 Program Memory Structure
The program is input into addresses in Program Memory. Addresses in Pro-
gram Memory are slightly different than those in other memory areas be-
cause each address does not necessarily hold the same amount of data.
Rather, each address holds one instruction and all of the definers and oper-
ands required for that instruction. Because some instructions require no op-
erands, while other require up to three operands, Program Memory ad-
dresses 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 and some bit operands used by the instruction
are also contained in the first word. The rest of the words required by an in-
struction contain the operands that tell what data is to be used. When con-
verting to mnemonic code, instructions are written in the same form, one
word to a line, just as they appear in the ladder diagram symbols. The only
exception to this is TIMH(15), in which the definer is written on a second line.
When programming, addresses are automatically displayed and do not have
to be set unless for some reason a different location is desired for the pro-
gram. 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.
7–2–2 Ladder Instructions
As described in
4–3–2 Ladder Instructions
, the conditions on the ladder dia-
gram correspond to LD, LD NOT, AND, AND NOT, OR, and OR NOT. Logic
blocks containing various combinations of these are combined with AND LD
and OR LD. These are described in
4–3–3 Logic Block Instructions
. Only one
word is required for each of these instructions. This is illustrated in the follow-
ing diagram, which turns ON 0505 whenever both 0005 and 0006 are ON.
The table of mnemonic code is also provided for this diagram.
Converting to Mnemonic Code Section 7–2