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

The text of a manual · part 33 of 60

C200HX/C200HG/C200HE Programmable Controllers Operation Manual, pages 314 to 323

Pages 314 to 323 of 586

The original document is the PDF (3.4 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 C200HE-CPU42-E

Page 314

Section 5-24

Step Instructions

Execution of a step is completed either by execution of the next SNXT(09) or by turning OFF the control bit for the step (see example 3 below). When the step is completed, all of the IR and HR bits in the step are turned OFF. All timers in the step except TTIM(––) are reset to their SVs. TTIM(––), counters, shift registers, bits set or reset with SET or RSET, and bits used in KEEP(11) maintain status. Two simple steps are shown below.

00000 SNXT(09) LR 2000

Starts step execution

STEP(08) LR 2000

Step controlled by LR 2000

1st step

00001 SNXT(09) LR 2001

STEP(08) LR 2001

Step controlled by LR 2001

2nd step

00002 SNXT(09) LR 2002

STEP(08)

Address

Instruction

00000 00001 00002

LD SNXT(09) STEP(08)

Operands

LR LR

00000 2000 2000

Step controlled by LR 2000 00100 00101

LD SNXT(09)

LR

00001 2001

Ends step execution

Address

Instruction

Operands

00102

STEP(08)

LR

2001

Step controlled by LR 2001 00200 00201 00202

LD SNXT(09) STEP(08)

LR ---

00002 2002

Steps can be programmed in consecutively. Each step must start with STEP(08) and generally ends with SNXT(09) (see example 3, below, for an exception). When steps are programmed in series, three types of execution are possible: sequential, branching, or parallel. The execution conditions for, and the positioning of, SNXT(09) determine how the steps are executed. The three examples given below demonstrate these three types of step execution. Precautions

Interlocks, jumps, SBN(92), and END(01) cannot be used within step programs. Bits used as control bits must not be used anywhere else in the program unless they are being used to control the operation of the step (see example 3, below). All control bits must be in the same word and must be consecutive. If IR or LR bits are used for control bits, their status will be lost during any power interruption. If it is necessary to maintain status to resume execution at the same step, HR bits must be used.

296

Page 315

Section 5-24

Step Instructions Flags

25407: Step Start Flag; turns ON for one cycle when STEP(08) is executed and can be used to reset counters in steps as shown below if necessary.

00000 Start

SNXT(09) 01000 01000 STEP(08) 01000 00100

CP CNT 01 25407

25407

R

Address

Instruction

00000 00001 00002 00003

LD SNXT(09) STEP(08) LD

Operands 00000 01000 01000 00100

#0003

Address 00004 00005

1 cycle

Instruction

Operands

LD CNT #

25407 01 0003

Examples The following three examples demonstrate the three types of execution control possible with step programming. Example 1 demonstrates sequential execution; example 2, branching execution; and example 3, parallel execution. Example 1: Sequential Execution

The following process requires that three processes, loading, part installation, and inspection/discharge, be executed in sequence with each process being reset before continuing on the the next process. Various sensors (SW1, SW2, SW3, and SW4) are positioned to signal when processes are to start and end.

SW 1 SW 4

SW 2 SW 3

Loading

Part installation

Inspection/discharge

297

Page 316

Section 5-24

Step Instructions

The following diagram demonstrates the flow of processing and the switches that are used for execution control. SW1 Process A

Loading SW2

Process B

Part Installation SW3

Process C

Inspection/discharge SW4

298

Page 317

Section 5-24

Step Instructions

The program for this process, shown below, utilizes the most basic type of step programming: each step is completed by a unique SNXT(09) that starts the next step. Each step starts when the switch that indicates the previous step has been completed turns ON.

00001 (SW1) SNXT(09) 12800

Process A started.

STEP(08) 12800

Process A

00002 (SW2) SNXT(09) 12801

Process A reset. Process B started.

STEP(08) 12801

Process B

00003 (SW3) SNXT(09) 12802

Process B reset. Process C started.

STEP(08) 12802

Process C

00004 (SW4) SNXT(09) 12803

Process C reset.

STEP(08)

Address

Instruction

00000 00001 00002

LD SNXT(09) STEP(08)

Operands 00001 12800 12800

Process A 00100 00101 00102

LD SNXT(09) STEP(08)

00002 12801 12801

Address

Instruction

Operands

Process B 00100 00101 00102

LD SNXT(09) STEP(08)

00003 12802 12802

Process C 00200 00201 00202

LD SNXT(09) STEP(08)

00004 12803 ---

299

Page 318

Section 5-24

Step Instructions Example 2: Branching Execution

The following process requires that a product is processed in one of two ways, depending on its weight, before it is printed. The printing process is the same regardless of which of the first processes is used. Various sensors are positioned to signal when processes are to start and end. Printer

SW A2

SW A1

SW D

Process A Process B

SW B1

SW B2

Weight scale

Process C

The following diagram demonstrates the flow of processing and the switches that are used for execution control. Here, either process A or process B is used depending on the status of SW A1 and SW B1.

SW B1

SW A1 Process A SW A2 Process C SW D End

300

Process B SW B2

Page 319

Section 5-24

Step Instructions

The program for this process, shown below, starts with two SNXT(09) instructions that start processes A and B. Because of the way 00001 (SW A1) and 00002 (SB B1) are programmed, only one of these will be executed to start either process A or process B. Both of the steps for these processes end with a SNXT(09) that starts the step for process C.

00001 (SW A1) 00002 (SW B1) SNXT(09) HR 0000 00001 (SW A1) 00002 (SW B1) SNXT(09) HR 0001

STEP(08) HR 0000

Process A started.

SNXT(09) HR 0002

Process A reset. Process C started.

Process A

00003 (SW A2)

STEP(08) HR 0001

Process B

00004 (SW B2) SNXT(09) HR 0002

Process B reset. Process C started.

STEP(08) HR 0002

Process C

00005 (SW D) SNXT(09) HR 0003

Process C reset.

STEP(08)

Address

Instruction

00000 00001 00002 00003 00004 00005 00006

LD AND NOT SNXT(09) LD NOT AND SNXT(09) STEP(08)

Operands

HR

HR HR

00001 00002 0000 00001 00002 0001 0000

Address

Instruction

Operands

Process B 00100 00101 00102

LD SNXT(09) STEP(08)

HR HR

00004 0002 0002

Process C Process A 00100 00101 00102

LD SNXT(09) STEP(08)

HR HR

00003 0002 0001

00200 00201 00202

LD SNXT(09) STEP(08)

HR ---

00005 0003

301

Page 320

Step Instructions

Section 5-24

Example 3: Parallel Execution

The following process requires that two parts of a product pass simultaneously through two processes each before they are joined together in a fifth process. Various sensors are positioned to signal when processes are to start and end. SW1

Process A

SW5

SW3

SW7

Process B Process E Process D

Process C SW2

SW4

SW6

The following diagram demonstrates the flow of processing and the switches that are used for execution control. Here, process A and process C are started together. When process A finishes, process B starts; when process C finishes, process D starts. When both processes B and D have finished, process E starts.

SW 1 and SW2 both ON

Process A

Process C

SW4

SW3 Process B

Process D

SW5 and SW6 both ON Process E SW7

End

The program for this operation, shown below, starts with two SNXT(09) instructions that start processes A and C. These instructions branch from the same instruction line and are always executed together, starting steps for both A and C. When the steps for both A and C have finished, the steps for process B and D begin immediately. When both process B and process D have finished (i.e., when the status for both of them is “ON,” but SW5 and SW6 have turned ON), processes B and D are reset together by the SNXT(09) at the end of the programming for process B. Although there is no SNXT(09) at the end of process D, the control bit for it is turned OFF by executing SNXT(09) LR 0004. This is because the OUT for LR 0003 is in the step reset by SNXT(09) LR 0004, i.e., LR 003 is turned OFF when SNXT(09) LR 0004 is executed Process B is thus reset directly and process D is reset indirectly before executing the step for process E.

302

Page 321

Section 5-24

Step Instructions 00001 (SW1 and SW2)) SNXT(09) LR 0000

Process A started. Process C started.

SNXT(09) LR 0002

STEP(08) LR 0000

Process A

00002 (SW3) SNXT(09) LR 0001

Process A reset. Process B started.

STEP(08) LR 0001

Process B

LR 0003 LR 0003

Used to turn off process D.

00004 (SW5 and SW6) SNXT(09) LR 0004

Process E started.

STEP(08) LR 0002

Process C

00003 (SW4) SNXT(09) LR 0003

Process C reset. Process D started.

STEP(08) LR 0003

Process D

STEP(08) LR 0004

Process E

00005 (SW7) SNXT(09) LR 0005

Process E reset.

STEP(08)

303

Page 322

Section 5-25

Special Instructions Address

Instruction

00000 00001 00002 00003

LD SNXT(09) SNXT(09) STEP(08)

Operands 00001 0000 0002 0000

LR LR LR

LD SNXT(09) STEP(08)

Instruction

00204

STEP(08)

00002 0001 0001

LR LR

Operands LR

0002

LR LR

00003 0003 0003

LR

0004

LR

00005 0005 ---

Process C 00300 00301 00302

Process A 00100 00101 00102

Address

LD SNXT(09) STEP(08) Process D

00400

STEP(08)

Process B Process E 00200 00201 00202 00203

LD OUT AND SNXT(09)

LR 0003 LR 0003 00004 0004

LR

00500 00501 00502

LD SNXT(09) STEP(08)

5-25 Special Instructions The instructions in this section are used for various operations, including programming user error codes and messages, counting ON bits, setting the watchdog timer, and refreshing I/O during program execution.

5-25-1 FAILURE ALARM – FAL(06) and SEVERE FAILURE ALARM – FALS(07) Ladder Symbols

Definer Data Areas

@FAL(06) N

FAL(06) N

N: FAL number # (00 to 99)

N: FAL number

FALS(07) N

# (01 to 99)

Limitations

FAL(06) and FALS(07) share the same FAL numbers. Be sure to use a number in either FAL(06) or FALS(07), not both.

Description

FAL(06) and FALS(07) are provided so that the programmer can output error numbers for use in operation, maintenance, and debugging. When executed with an ON execution condition, either of these instructions will output a FAL number to bits 00 to 07 of SR 253. The FAL number that is output can be between 01 and 99 and is input as the definer for FAL(06) or FALS(07). FAL(06) with a definer of 00 is used to reset this area (see below). FAL Area 25307

25300

X101

304

X100

Page 323

Section 5-25

Special Instructions

FAL(06) produces a non-fatal error and FAL(07) produces a fatal error. When FAL(06) is executed with an ON execution condition, the ALARM/ERROR indicator on the front of the CPU Unit will flash, but PC operation will continue. When FALS(07) is executed with an ON execution condition, the ALARM/ERROR indicator will light and PC operation will stop. The system also generates error codes to the FAL area. Resetting Errors

All FAL error codes will be retained in memory, although only one of these is available in the FAL area. To access the other FAL codes, reset the FAL area by executing FAL(06) 00. Each time FAL(06) 00 is executed, another FAL error will be moved to the FAL area, clearing the one that is already there. FAL error codes are recorded and will be recalled in the following order: First code generated, lowest FAL number greater than the first code, lowest FAL number lower than the first code.

Clearing Messages

FAL(06) 00 is also used to clear message programmed with the instruction, MSG(46). If the FAL area cannot be cleared, as is generally the case when FALS(07) is executed, first remove the cause of the error and then clear the FAL area through the Programming Console (see 4-6-5 Clearing Error Messages).

5-25-2 CYCLE TIME – SCAN(18) Operand Data Areas Mi: Multiplier (BCD)

Ladder Symbols

IR, SR, AR, DM, HR, TC, LR, # SCAN(18)

@SCAN(18)

Mi

Mi

000

000

000

000

000: Not used.

000: Not used.

Limitations

Mi must be BCD. Only the rightmost three digits of Mi are used.

Description

SCAN(18) is used to set a minimum cycle time. Mi is the minimum cycle time that will be set in tenths of milliseconds, e.g., if Mi is 1200, the minimum cycle time will be 120.0 ms. The possible setting range is from 000.0 to 999.0 ms. If the actual cycle time is less than the cycle time set with SCAN(18) the CPU Unit will wait until the designated time has elapsed before starting the next cycle. If the actual cycle time is greater than the set time, the set time will be ignored and the program will be executed to completion.

Flags

ER:

Indirectly addressed DM word is non-existent. (Content of word is not BCD, or the DM area boundary has been exceeded.) Mi is not BCD.

305