Basic Procedure; Instruction Terminology - Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Instruction Terminology

6-1

Basic Procedure

1, 2, 3... 1.
6-2
Instruction Terminology
334
There are several basic steps involved in writing a program. Sheets that can be
copied to aid in programming are provided in Appendix D I/O Assignment Sheet
and Appendix E Program Coding Sheet.
Obtain a list of all I/O devices and the I/O points that have been assigned to
them and prepare a table that shows the I/O bit allocated to each I/O device.
2.
If you are using LR bits to link two PCs, prepare sheet showing the used of
these bits.
3.
Determine what words are available for work bits and prepare a table in
which you can allocate these as you use them.
4.
Also prepare tables of TC numbers and jump numbers so that you can allo-
cate these as you use them. Remember, the function of a TC number can
be defined only once within the program; jump numbers 01 through 99 can
be used only once each. (TC number are described in 7-15 Timer and
Counter Instructions; jump numbers are described later in this section.)
5.
Draw the ladder diagram.
6.
Input the program into the CPU Unit. When using the Programming Con-
sole, this will involve converting the program to mnemonic form.
7.
Check the program for syntax errors and correct these.
8.
Execute the program to check for execution errors and correct these.
9.
After the entire Control System has been installed and is ready for use,
execute the program and fine tune it if required.
The basics of ladder-diagram programming and conversion to mnemonic code
are described in 6-3 Basic Ladder Diagrams. Preparing for and inputting the pro-
gram via the Programming Console are described in the CPM1 Operation
Manual, the CPM1A Operation Manual, the CPM2A Operation Manual, the
CPM2C Operation Manual, and the SRM1 Master Control Units Manual and via
the SSS in the SSS Operation Manual: C-series PCs.
The rest of Section 6 covers more advanced programming, programming pre-
cautions, and program execution. All special application instructions are cov-
ered in Section 7 Instruction Set. Debugging is described in the CPM1 Operation
Manual, the CPM1A Operation Manual, the CPM2A Operation Manual, the
CPM2C Operation Manual, the SRM1 Master Control Units Manual, and SSS
Operation Manual: C-series PCs. Section 9 Troubleshooting also provides in-
formation required for debugging.
There are basically two types of instructions used in ladder-diagram program-
ming: instructions that correspond to the conditions on the ladder diagram and
are used in instruction form only when converting a program to mnemonic code
and instructions that are used on the right side of the ladder diagram and are
executed according to the conditions on the instruction lines leading to them.
Most instructions have at least one or more operands associated with them. Op-
erands indicate or provide the data on which an instruction is to be performed.
These are sometimes input as the actual numeric values, but are usually the ad-
dresses of data area words or bits that contain the data to be used. For instance,
a MOVE instruction that has IR 000 designated as the source operand will move
the contents of IR 000 to some other location. The other location is also desig-
nated as an operand. A bit whose address is designated as an operand is called
an operand bit; a word whose address is designated as an operand is called an
operand word. If the actual value is entered as a constant, it is preceded by # to
indicate that it is not an address.
Section
6-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents