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

The text of a manual · part 17 of 27

SYSMAC C20P/C28P/C40P/C60P P-type Programmable Controllers Operation Manual: SECTION 7, pages 132 to 141

Pages 132 to 141 of 211, from SYSMAC C20P/C28P/C40P/C60P P-type Programmable Controllers Operation Manual

The original document is the PDF (2.2 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 Omron C28P

Page 132

Section 7–4

Preparation for Operation 1, 2, 3... 1. 2. 3.

4. 5. 6. 7.

Confirm that all wiring for the PC has been installed and checked properly. Confirm that a RAM Unit is mounted as the Memory Unit and that the write-protect switch is OFF. Connect the Programming Console to the PC (referring to the Programming Console Operation Guide). Make sure that the Programming Console is securely connected or mounted to the CPU; improper connection may inhibit operation. Set the mode switch to PROGRAM mode. Turn on PC power. Enter the password. Clear memory.

Each of these operations from entering the password on is described in detail in the following subsections. All operations should be done in PROGRAM mode unless otherwise noted.

7–4–1

Entering the Password To gain access to the PC’s programming functions, you must first enter the password. The password prevents unauthorized access to the program. The PC prompts you for a password when PC power is turned on or, if PC power is already on, after the Programming Console has been connected to the PC. To gain access to the system when the ”Password!” message appears, press CLR and then MONTR. Then press CLR to clear the display. If the Programming Console is connected to the PC when PC power is already on, the first display below will indicate the mode the PC was in before the Programming Console was connected. When the password is entered, the PC will shift to the mode set on the mode switch, causing PC operation to begin if the mode is set to RUN or MONITOR. You can change the mode to RUN or MONITOR with the mode switch after entering the password.

Indicates the mode set by the mode selector switch.

! WARNING Never change the PC operating mode or enter the password without first confirming that it is safe to do so. Changing the mode or entering the password can create dangerous or fatal situations when the controlled system starts or stops as a result of changing the PC operating mode. Beeper

Immediately after the password is input or anytime immediately after the mode has been changed, SHIFT and then the 1 key can be pressed to turn ON and OFF the beeper that sounds when Programming Console keys are pressed. If BZ is displayed in the upper right corner, the beeper is operative. If BZ is not displayed, the beeper is not operative.

125

Page 133

Section 7–4

Preparation for Operation

The beeper will also sound whenever an error occurs during PC operation. Beeper operation for errors is not affected by the above setting.

7–4–2

Clearing Memory Using the Memory Clear operation it is possible to clear all or part of the Program Memory, and the IR, HR, DM and TC areas. Unless otherwise specified, the clear operation will clear all memory areas above provided that the Memory Unit attached to the PC is a RAM Unit or an EEPROM Unit and the write-protect switch is OFF. If the write-protect switch is ON, or the Memory Unit is an EPROM Unit, Program Memory cannot be cleared. Before beginning to program for the first time or when installing a new program, clear all areas. To clear all memory areas, press CLR until all zeros are displayed and then the top line of the following sequence. The branch lines in the sequence are used when clearing only part of the memory areas, which is described below. Memory can be cleared in PROGRAM mode only.

Key Sequence

All Clear

126

The following procedure is used to clear memory completely.

Page 134

Preparation for Operation Partial Clear

Section 7–4 It is possible to retain the data in specified areas and/or part of the Program Memory. To retain the data in the HR and TC, and/or DM areas, press the appropriate key after entering REC/RESET. The CNT key is used for the entire TC area. The display will show those areas that will be cleared. It is also possible to retain a portion of the Program Memory from the beginning to a specified address. After designating the data areas to be retained, specify the first Program Memory address to be cleared. For example, to leave addresses 0000 to 0122 untouched, but to clear addresses from 0123 to the end of Program Memory, input 0123. For example, to leave the TC area uncleared and retaining Program Memory addresses 0000 through 0122, input as follows:

127

Page 135

Section 7–5

Inputting, Modifying, and Checking the Program

7–5

Inputting, Modifying, and Checking the Program Once a program has been converted to mnemonic code, it is ready to be input into the PC and checked. Mnemonic code is keyed into Program Memory addresses from the Programming Console. Checking the program involves a syntax check to see that the program has been written according to syntax rules before trial execution and finally correction under actual conditions can begin. The operations required to input a program are explained below. Operations to modify programs that already exist in memory are also provided in this section, as well as the procedure to obtain the current scan time.

7–5–1

Setting and Reading from Program Memory Address When inputting a program for the first time, it is generally input from Program Memory address 0000. As this address appears when the display is cleared, it is not necessary to input it. When inputting a program starting from other than 0000 or to read or modify a program that already exists in memory, the desired address must be designated. To designate an address, press CLR and then input the desired address. Leading zeros of the address need not be input, i.e., when specifying an address such as 0053 you need to enter only 53. The contents of the designated address will not be displayed until the down key is pressed. Once the down key has been pressed to display the contents of the designated address, the up and down keys can be used to scroll through Program Memory. Each time one of these keys is pressed, the next or previous word in Program Memory will be displayed. If Program Memory is read in RUN or MONITOR mode, the ON/OFF status of any bit displayed will also be shown.

Key Sequence

Example

If the following mnemonic code has already been input into Program Memory, the key inputs below would produce the displays shown.

Address

Instruction

Data

0200

LD

0000

0201

AND

0001

0202

TIM

00 #0123

0203

128

LD

0100

Page 136

Inputting, Modifying, and Checking the Program

7–5–2

Section 7–5

Inputting or Overwriting Programs Programs can be input or overwritten only in PROGRAM mode. The same procedure is used to either input a program for the first time or to overwrite a program that already exists. In either case, the current contents of Program Memory are overwritten, i.e., if there is no previous program, the NOP(00) instruction, which will be written at every address, will be overwritten. To input a program, just follow the mnemonic code that was produced from the ladder diagram, making sure that the proper address is set before starting. Once the proper address is displayed, input the first instruction word, press WRITE, and then input any operands required, pressing WRITE after each, i.e., WRITE is pressed at the end of each line of the mnemonic code. When WRITE is pressed, the designated instruction will be input and the next display will appear. If the instruction requires two or more words, the next display will indicate the next operand required and provide a default value for it. If the instruction requires only one word, the next address will be displayed. Continue inputting each line of the mnemonic code until the entire program has been input. When inputting numeric values for operands, it is not necessary to input leading zeros. Leading zeros are required only when inputting function codes (see below). When designating operands, be sure to designate the data area for all but IR and SR addresses by pressing the corresponding data area key or to designate a constant by pressing CONT/# . CONT/# is not required for counter or timer SV (see below). TC numbers as bit operands (i.e., completion flags) are designated by pressing either TIM or CNT before the address, depending on whether the TC number has been used to define a timer or a counter.

Inputting SV for Counters and Timers

The SV (set value) for a timer or counter is generally input as a constant, although inputting the address of a word that holds the SV is also possible.

129

Page 137

Section 7–5

Inputting, Modifying, and Checking the Program

When inputting an SV as a constant, CONT/# is not required; just input the numeric value and press WRITE. To designate a word, press CLR and then input the word address as described above. Designating Instructions

The most basic instructions are input using the Programming Console keys provided for them. All other instructions are input using function codes. These function codes are always written after the instruction’s mnemonic. If no function code is given, there should be a Programming Console key for that instruction. To input an instruction word using a function code, set the address, press FUN, input the function code including any leading zero, input any bit operands or definers required on the instruction line, and then press WRITE.

Note Enter function codes with care. Example

The following ladder diagram can be input using the key inputs shown below. Displays will appear as indicated.

Address

Instruction

Data

0200

LD

0002

0201

TIM

00 #0123

0202

TIMH(15)

01 #0500

130

Page 138

Inputting, Modifying, and Checking the Program

Error Messages

Section 7–5

The following error messages may appear when inputting a program. Correct the error as indicated and continue with the input operation. The asterisks in the displays shown below will be replaced with numeric data, normally an address, in the actual display.

131

Page 139

Inputting, Modifying, and Checking the Program

7–5–3

Section 7–5

Message

Cause and correction

****REPL ROM

An attempt was made to write to ROM or to write-protected RAM. Be sure a RAM Unit is mounted and that its write-protect switch is set to OFF.

****PROG OVER

The instruction at the last address in memory is not NOP(00). Erase all unnecessary instructions at the end of the program or use a larger Memory Unit.

****ADDR OVER

An address was set that is larger than the highest memory in Program Memory. Input a smaller address

****SETDATA ERR

Data has been input in the wrong format or beyond defined limits, e.g., a hexadecimal value has been input for BCD. Reinput the data.

****I/O NO. ERR

A data area address has been designated that exceeds the limit of the data area, e.g., an address is too large. Confirm the requirements for the instruction and reinput the address.

Checking the Program Once a program has been input, it should be checked for syntax to be sure that no programming rules have been violated. This check should also be performed if the program has been changed in any way that might create a syntax error. To check the program, input the key sequence shown below. If an error is discovered, the check will stop and a display indicating the error will appear. Press SRCH to continue the check. If an error is not found, the program will be checked through the first END(01), with a display indicating when each 64 instructions have been checked (e.g., display #1 below). CLR can be pressed to cancel the check after it has been started, and a display like display #2, in the example, will appear. When the check has reached the first END, a display like display #3 will appear. A syntax check can be performed on a program only in PROGRAM mode.

Key Sequence

Error Messages

132

The following table provides the error types, displays, and explanations of all syntax errors. The address where the error was generated will also be displayed. Message

Meaning and appropriate response

?????

The program has been destroyed. Reinput the program.

NO END INSTR

There is no END(01) in the program. Write END(01) at the final address in the program.

CIRCUIT ERR

The number of logic blocks and logic block instructions does not agree, i.e., either LD or LD NOT has been used to start a logic block whose execution condition has not been used by another instruction or a logic block instruction has been used that does not have the required number of logic blocks (i.e., unused execution conditions). Check your program.

IL–ILC ERR

IL(02) and ILC(03) are not used in pairs. Correct the program so that each IL(02) has a unique ILC(03). Although this error message will appear if more than one IL(02) is used with the same ILC(03), the program will be executed as written. Make sure your program is written as desired before proceeding.

Page 140

Section 7–5

Inputting, Modifying, and Checking the Program

Example

Message

Meaning and appropriate response

JMP–JME ERR

JMP(04) and JME(05) are not used in pairs. Match each JMP(04) to a JME(05).

COIL DUPL

The same bit is being controlled (i.e., turned ON and/or OFF) by more than one instruction (e.g., OUT, OUT NOT, DIFU(13), DIFD(14), KEEP(11), SFT(10)). Although this is allowed for certain instructions, check instruction requirements to confirm that the program is correct or rewrite the program so that each bit is controlled by only one instruction.

DIF OVER

More than 48 DIFU(14) and DIFD(14) are used in the program. Reduce the number of DIFU(13) and DIFD(14) used to 48 or less.

JMP OVER

More than either jumps are used in the program. Reduce the number of JMP(04) and JME(05) pairs.

The following examples shows some of the displays that can appear as a result of a program check.

Display #1

Halts program check Display #2

Check continues until END(01) Display #3

When errors are found

7–5–4

Displaying the Scan Time Once the program has been cleared of syntax errors, the scan time should be checked. This is possible only in RUN or MONITOR mode while the pro-

133

Page 141

Inputting, Modifying, and Checking the Program

Section 7–5 gram is being executed. See Section 6 Program Execution Timing for details on the scan time. To display the current average scan time, press CLR then MONTR. The time displayed by this operation is an average scan time. The differences in displayed values depend on the execution conditions that exist when MONTR is pressed. Example

7–5–5

Program Searches The program can be searched for occurrences of any designated instruction or data area bit address used in an instruction. Searches can be performed from any currently displayed address or from a cleared display. To designate a bit address, press SHIFT, press CONT/#, then input the address, including any data area designation required, and press SRCH. To designate an instruction, input the instruction just as when inputting the program and press SRCH. Once an occurrence of an instruction or bit address has been found, any additional occurrences of the same instruction or bit can be found by pressing SRCH again. SRCHG will be displayed while a search is in progress. When the first word of a multiword instruction is displayed for a search operation, the other words of the instruction can be displayed by pressing the down key before continuing the search. If Program Memory is read in RUN or MONITOR mode, the ON/OFF status of any bit displayed will also be shown.

Key Sequence

134