Example Program - Omron SYSMAC CPM2B Operation Manual

Hide thumbs Also See for SYSMAC CPM2B:
Table of Contents

Advertisement

Programming Example
7-3-2

Example Program

Start input
00000
C000
00000
20000
20000
T002
00004
20000
T002
00007
20000
T001
00010
20000
20000
T001
00014
00017
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
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 7-3-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 example procedures in
7-3-3 Programming Procedures
00000
(1) Self-holding bit
20000
C
000
20000
20000
(2) 1-second timer
T
002
001
#
0010
20000
(3) 2-second timer
T
002
002
#
0020
20000
(4) 10-count counter
T
001
20000
000
#
0010
20000
(5) Flicker output (10 counts)
T
001
01000
---
(6) END(01) instruction
Section 7-3
1
S
155

Advertisement

Table of Contents
loading

Table of Contents