Plc programming – CONTREX CX-1200 User Manual

Page 206

Advertising
background image

5 - 113

PLC PROGRAMMING

Editor and the Compiler:
The PLC program consists of a text-based list of commands (instructions) and operands that work on bit data
to produce the same result as a ladder-logic language. Each rung of a ladder logic program is implemented as
a group of commands/operands starting with the “LOAD” (or LD NOT) command and ending with the “OUT
”command. A special series of screens that function as an editor allow you to change the PLC program. You
can add commands, delete commands or change a command or operand. This is done with the keypad and
screens; programming computer is not required.

Go to PLC / PLC Programming. This will bring up the current PLC program. There are five pages with a
total of 64 lines. Each line consists of one command and one operand. The simplest rung would require two
lines: one for the opening “LOAD” and one for the closing “OUT”. Scroll through the lines with the Par Up
or Par Down keys. The second line of the PLC Programming title block will display what line is active
(highlight) and if the command or operand on that line is active. Use the Page Up and Page Down keys scroll
quickly through the entire program. Any changes made to the PLC program will be compiled immediately.
The changes go into effect as soon as the PLC Program has been exited and saved.

Changing Commands:
Scroll the Par Up or Par Down keys to the command that you want to change (highlight). Use the Page Up
and Page Down keys scroll quickly through the entire program. The second line of the PLC Programming title
block will display what line is active (highlight) and the command on the line that is active. When an
command is active (highlight), it can be changed by using the “increment scroll up/down” keys to scroll
through the list of available commands. Stop scrolling when the correct command appears. Use the Clear key
to delete a the active line. The operand may need to be changed to be consistent with the new command. Use
the Par Down key to scroll to the operand (highlight).

Changing Operands:
Scroll the Par Up or Par Down keys to the to the operand that you want to change. Use the Page Up and Page
Down keys scroll quickly through the entire program. The second line of the PLC Programming title block
will display what line is active (highlight) and the operand on the line that is active. When a operands is
active, it can be changed either by entering the PLC Bit number or by scrolling through the list of operands
with the “increment scroll

s

or

t

” keys. The name of the operand appears on the line to the right of the

PLC Bit number. Stop scrolling when the correct operand appears. Press the Enter key to enter operand. Use
the Clear key to delete a the active line.

Inserting a New Line:
To insert a new line at the active line (highlight), scroll to the command and press the Enter key. The new line
is now active and the prior active line, as well as the rest of the lines, move down one line. The new line
appears as a “NOP” (no operation) command and a “No Opnd” (No operand).

To Insert a new line below the active line (highlight), scroll to the operand and press the Enter key. A new line
is inserted on the next line and becomes the active line. The entire program, moves down one line. The new
line appears as a “NOP” (no operation) command and a “No Opnd” (No operand).

Delete a Line:
To delete a line, scroll to either the command or operand of the line and press the Clear key. A dialog box
appears and asks if you want to delete the line. Press the Enter key to delete the line or the Clear key to cancel
the request to delete.

Advertising