Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 46 of 59

Mini-PLC-2/02, -2/16, -2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual: 24 - Program Editing, pages 374 to 382

Pages 374 to 382 of 490, from Mini-PLC-2/02, -2/16, -2/17 Processor (cat. no. 1772-LZ, LZP, LX, LXP, LW, LWP) User Manual

The original document is the PDF (2.5 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1772-LX / LXP

Page 374

Chapter

24

Program Editing

Chapter Objectives

This chapter describes how to edit instructions in your program: rules for editing instructions editing relay-type instructions editing other instructions

Editing a Program

Changes to an existing program can be made through a variety of editing functions (Table 24.A). Instructions and rungs can be added or deleted; addresses, data, and bits can be changed. If the memory write protect is active, you can change only data table values between word addresses 010 and 177.

24-1

Page 375

Chapter 24 Program Editing

Table 24.A Editing Functions

1

Function

Key Sequence

Mode

Insert a condition instruction

[INSERT] (instruction) (address)

Program

Description Position the cursor on the instruction that will precede the instruction to be inserted. Then press the key sequence. 1 2 Position the cursor on the instruction that will follow the instruction to be inserted. Then press the key sequence. 1 2 or [INSERT][]

(instruction) (address)

Remove a condition instruction

[REMOVE] (instruction)

Program

Position the cursor on the instruction to be removed and press the key sequence. 1

Insert a rung

[INSERT][RUNG]

Program

Position the cursor on the instruction in the preceding rung and press the key sequence. Enter instructions and complete the rung. 1

Remove a rung

[REMOVE][RUNG]

Program

Position the cursor anywhere on the rung to be removed and press the key sequence. 1

Change data of a word or block instruction

[INSERT][DATA]

Program

Position the cursor on the word or block instruction whose data is to be changed. Press the key sequence.

Change the address of a word or block instruction

[INSERT] (first digit) []

Program

Position the cursor on a word or block instruction with data and press [Insert]. Enter the first digit of the first data value of the instruction. Then use the [ ] and [ ] key as needed to cursor up to the word address. Enter the appropriate digits of the word address.

(Address) Program on line

[SEARCH] 5 2

Initiates on-line programming.

Replace an instruction or change the address of an instruction without data

[Instruction] (Address)

Program

Position the cursor on the instruction to be replaced or whose address is to be Press the desired instruction key (or key sequence) and the required address(es).

Change data on line

[SEARCH] 5 1 (Data)

Run/Program

Position the cursor on the word or block instruction whose data is to be changed. Press the key sequence. Cursor keys can be used.

[RECORD]

Press [RECORD] to enter the new data into memory.

[CANCEL COMMAND] All editing functions

[CANCEL COMMAND]

To terminate on-line data change. Program Run/Program

Aborts the operation at the current cursor position.

1

1

These functions can also be used during on-line programming.

2

When bit address exceeds 5 digits, press the [Expand Addr] key before entering address and enter a leading zero if necessary.

Important: Only addresses corresponding to Output Energize, Latch, and Unlatch instructions are cleared to 0.

24-2

Page 376

Chapter 24 Program Editing

Inserting an Instruction Only non-output instructions can be inserted in a rung. There are ways of doing this: First instruction of an existing rung First instruction of another rung Another location in the rung. You insert an instruction using either of the two ways by performing the following steps. First Instruction of an Existing Rung 1.

Position the cursor of the first instruction of the existing rung.

2.

Press [Insert][←].

3.

Insert <instruction>.

4.

Insert <address>.

First Instruction at the Beginning of Another Rung. 1.

Position the cursor on the previous rung’s output instruction.

2.

Press [Insert].

3.

Insert <instruction>.

4.

Insert <address>.

If the cursor is on the END statement, the instruction is inserted before the END statement or subroutine area. Another Location in the Rung 1.

Position the cursor on the instruction immediately preceding your selected location.

2.

Press the key sequence [Insert].

3.

Press <instruction>.

4.

Press <address>.

The new instruction is inserted after the cursor’s present position. You can enter bit addresses of 6 or 7 digits provided the data table is expanded to a 4- or 5-digit word address and you press [Expand Addr] before you enter the address.

24-3

Page 377

Chapter 24 Program Editing

If, at any time, the memory is full, a MEMORY FULL message is displayed and you cannot enter more instructions.

Removing an Instruction Only non-output instructions can be removed from a rung. Output instructions can be removed only be removing the complete rung. Remove an instruction by performing the following steps. 1.

Place the cursor on the instruction you are going to remove.

2.

Press [Remove] <instruction>.

Bit values and data of word instructions are not cleared. The input image table bits are rewritten during the next I/O scan. If you press the wrong instruction, and INSTRUCTIONS DO NOT MATCH message is displayed.

Inserting a Rung A rung can be inserted anywhere within a program. The cursor can be positioned on any instruction of a rung. The new rung is inserted after the rung which contains the cursor. The rung appears as an unconditional rung. You must complete the rung. You cannot edit instructions in the new rung until the rung is complete. Insert a rung in a program by performing the following steps. 1.

Press [Insert][Rung].

2.

Insert <output instruction>.

3.

Insert <output address>.

4.

Press [Insert] <condition instruction>.

5.

Insert <address>.

If the cursor is on the END statement, the rung need not be inserted. You can enter the rung as in initial program entry. if, at any time, the memory is full, a MEMORY FULL message is displayed you cannot enter more instructions.

24-4

Page 378

Chapter 24 Program Editing

Removing a Rung Removing a rung is the only way an output instruction can be removed. You can remove any rung, except the last one containing the END statement. Remove a rung by performing the following steps. 1.

Position the cursor anywhere on the rung you want to remove.

2.

Press [Remove][Rung].

Only bits corresponding to Output Energize, Latch, or Unlatch instructions are cleared to zero. All other word and bit addresses are not cleared when a rung is removed.

Changing Data in a Word or Block Instruction You can change the data of any word or block instruction, except Mathematics and Put instructions, in the program mode without removing and re-entering the instruction. Change the data of any word or block instruction by performing the following steps. 1.

Position the cursor on the appropriate word instruction.

2.

Press [Insert] <data>.

When the last digit of the data is entered, the function is terminated and the data is entered into memory. Once you enter the first digit, you can use the [→][←] keys. The function can also be terminated and entered into memory before the last digit is entered if you press [Cancel Command].

Changing the Address of a Word or Block Instruction You can change the address of a word or block instruction with data, excluding Mathematics and Put instructions, without removing and re-entering the instruction.

24-5

Page 379

Chapter 24 Program Editing

Change the address of a word or block instruction by performing the following steps. 1.

Position the cursor on the instruction you want to change.

2.

Press [Insert].

The cursor, although not displayed, positions itself on the first data digit. Enter that digit to display the cursor.

Online Data Change

3.

Cursor back to the address digits using the [←] key.

4.

Change <address> as needed. Use a leading zero if required.

Certain data of a word or block instruction, excluding Mathematics and Put instructions, can be changed while the processor is in the Run/Program mode. Change data while the processor is in the Run/Program mode by performing the following steps. 1.

Position the cursor on the appropriate instruction.

2.

Press [Search] 51.

The key sequence displays the message ON-LINE DATA CHANGE, ENTER DIGITS FOR: <Required information> near the bottom of the screen. The new digits are displayed in a command buffer as they are entered. After the new data is displayed: 3.

Press [Insert] to enter the data into memory.

4.

You can terminate this function by pressing [Cancel Command].

ATTENTION: When the address of an instruction whose data is to be changed duplicates the address of other instructions in the user program, this could cause unwanted machine motion. This could result in damage to the equipment and/or injury to personnel. The consequences of the change of each instruction should be thoroughly explored.

24-6

Page 380

Chapter 24 Program Editing

Important: When the memory write protect is activated, online data change is not be allowed for addresses above 177. If you attempt to change data above address 177, the industrial terminal displays the error message MEMORY PROTECT ENABLED.

Search Functions

You can use the 1770-T3 terminal to search your program for: specific instruction and specific word addresses first condition or output instruction in a rung single rung display incomplete rung first and last rung and user boundaries remote mode select See Table 24.B for a summary of search functions.

24-7

Page 381

Chapter 24 Program Editing

Table 24.B Search Functions Function

Key Sequence

Mode

Locate first rung of program

[SEARCH][↑]

Any

Positions cursor on the first instruction of the program.

Locate last rung of program area

[SEARCH][↓]

Any

Positions cursor on the temporary end instruction, subroutine area boundary, or the end statement depending on the cursor's location. Press key sequence again to move to the next boundary.

Locate first instruction of current rung

[SEARCH][←]

Remote Prog

Positions cursor on first instruction of the current rung.

Move cursor off screen

[SEARCH][←]

Remote Test Run/Program

Moves cursor off screen to left.

Locate output instruction of current rung

[SEARCH][→]

Any

Positions cursor on the output instruction of the current rung.

Locate rung without an output instruction

[SHIFT] [SEARCH]

Any

Locates any rung left incomplete due to an interruption in programming.

[SEARCH] [Instruction key] (Address)

Any

Locates instruction searched for. Press [SEARCH] to locate the next occurrence of instruction.

Locate specific word address

[SEARCH] (address)

Any

Locates this address in the program (excluding -| |- and -| / |- instructions and addresses in files). Press [SEARCH] to locate the next occurrence of this address. 1

Single rung display

[SEARCH] [DISPLAY]

Any

Displays the first rung of a multiple rung display by itself. Press key sequence again to view multiple rungs.

Print

[SEARCH] [4][3]

Any

Prints a single rung.

Print

[SEARCH] [4][4]

Any

Prints a ladder diagram dump.

Print

[SEARCH] [4][5]

Remote Prog

Prints a total memory dump.

Print

[SEARCH] [5][0]

Any

Prints the first 20 lines of data table configuration.

Print

[SEARCH] [5][3]

Any

Prints the first 20 lines of bit manipulation.

Print

[SEARCH] [5][4]

Any

Prints the first 20 lines of memory layout display.

Program controls outputs

[SEARCH] [5][9][0]

Run/Program

Places the processor in run/program mode.

Program executes outputs disabled

[SEARCH] [5][9][1]

Remote Test

Places the processor in remote test mode.

Processor awaits commands

[SEARCH] [5][9][2]

Remote Program

Locate specific instruction

1

24-8

Description

Places the processor in remote program mode.

Enter leading zeros when bit address exceeds 5 digits or word address exceeds 3 digits.

Page 382

Chapter 24 Program Editing

Searching for Specific Instructions and Specific Word Addresses You can locate any instruction in your program by using methods described in this section. You can search for a block instruction searching for the counter address or the first entered address in the block. You can locate any instruction in your program by performing the following steps. 1.

Press [Search].

2.

Insert <instruction>.

3.

insert <address>. Enter leading zeros before the address if necessary.

Keystrokes: You can locate any address (excluding those associated with Examine On and Examine Off instructions and those contained within files) by performing the following steps. 1.

Press [Search] 8.

2.

Enter <address>.

The address you enter is the word address for the output instructions. The industrial terminal locates all uses of the word addresses associated with the word address except for -] [- and -]/[-. Once either key sequence is pressed, this information and an EXECUTING SEARCH message is displayed near the bottom of the screen. The industrial terminal begins to search for the address and/or instruction from the cursor’s position. It looks past the temporary end and subroutine area boundaries to the END statement. Then it continues searching from the beginning of the program to the point where the search began. If found, the rung containing the first occurrence of the address and/or instruction is displayed as well as the rungs after it. If you press [Search] again, the next occurrence of the address and/or instruction is displayed. When it cannot be located or all addresses and/or instructions have been found, a NOT FOUND message is displayed. If the instruction is found in the subroutine area or past the temporary end instruction, the area in which it is found is displayed in the lower portion of the screen. This function can be terminated at any time by pressing [Cancel Command]. All other keys are ignored during the search.

24-9