Example Program - Omron CPM1A Operation Manual

Sysmac series programmable controllers
Hide thumbs Also See for CPM1A:
Table of Contents

Advertisement

Programming Example

4-4-2 Example Program

Start input
00000
C000
00000
20000
20000
T002
00004
20000
T002
00007
20000
T001
00010
20000
20000
T001
00014
00017
114
The following ladder program will be used to demonstrate how to write a pro-
gram with the Programming Console. This program makes output IR 01000
flicker ON/OFF (one second ON, one second OFF) ten times after input
IR 00000 is turned ON.
Count input
Reset input
The mnemonic list for the example program is shown in the following table. The
steps required to enter this program from a Programming Console are described
in 4-4-3 Programming Procedures.
Address
Instruction
00000
LD
00001
OR
00002
AND NOT
00003
OUT
00004
LD
00005
AND NOT
00006
TIM
00007
LD
00008
AND NOT
00009
TIM
00010
LD
00011
AND
00012
LD NOT
00013
CNT
00014
LD
00015
AND NOT
00016
OUT
00017
END (01)
20000
Self-holding bit
TIM 001
1-second timer
#0010
TIM 002
2-second timer
#0020
CP
CNT 000
10-count counter
#0010
R
Flicker output (10 counts)
01000
ON
OFF
END(01)
Data
Programming Procedures
( )
(1) Self-holding bit
00000
20000
CNT
000
20000
20000
( )
(2) 1-second timer
TIM
002
001
#
0010
20000
( )
(3) 2-second timer
TIM
002
002
#
0020
( )
(4) 10-count counter
20000
TIM
001
20000
000
#
0010
( )
(5) Flicker output (10 counts)
20000
TIM
001
01000
---
(6) END(01) instruction
Section 4-4
1
S
Programming example
procedures in 4-4-3
g
p
(
)

Advertisement

Table of Contents
loading

Table of Contents