Programming Example

Section 4-4

 

 

 

4-4-3 Programming Procedures

The example program will be written to the CPM1A according to the mnemonic list in 4-4-2 Example Program. The procedure is performed beginning with the initial display. (Clear the memory before entering a new program.)

Note If an error occurs while inputting the program, refer to 5-4 Programming Console Operation Errors for details on correcting the error. Refer to the relevant Support Software Operation Manual for details on errors that appear when operating the

SSSor SYSMAC-CPT Support Software.

(1)Inputting the Self-holding Bit

1, 2, 3... 1. Input the normally open condition IR 00000. (It isn’t necessary to input leading zeroes.)

LD 00000

 

LD

00000

00001READ

WRITE NOP (000)

2. Input the OR condition IR 20000.

OR

C

A

A

A

A

 

2

0

0

0

0

 

 

 

 

 

WRITE

00001

OR 20000

00002READ NOP (000)

3.Input the normally closed AND condition C000. (It isn’t necessary to input leading zeroes.)

AND

00002

NOT CNT AND NOT CNT 000

 

WRITE

00003READ NOP (000)

4. Input the OUT instruction IR 20000.

 

C

A

A

A

A

OUT

2

0

0

0

0

 

 

 

 

 

WRITE

00003

OUT 20000

00004READ NOP (000)

(2) Inputting the One-second Timer

1, 2, 3... 1. Input the normally open condition IR 20000.

LD

C

A

A

A

A

 

2

0

0

0

0

 

 

 

 

 

WRITE

00004

LD 20000

00005READ NOP (000)

2.Input the normally closed AND condition T002. (It isn’t necessary to input leading zeroes.)

AND

 

 

C

00005

NOT

TIM

2 AND NOT TIM 002

 

 

 

 

 

 

00006READ

WRITE NOP (000)

104

Page 116
Image 116
Omron CPM1A operation manual Programming Procedures, Inputting the Self-holding Bit, Write NOP, Not CNT and not CNT