EasyManuals Logo
Home>Omron>Controller>CPM1

Omron CPM1 Programming Manual

Omron CPM1
541 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #344 background imageLoading...
Page #344 background image
323
Special Instructions Section 5-26
5-25-2 SUBROUTINE DEFINE and RETURN – SBN(92)/RET(93)
Limitations The CQM1-CPU11/21-E support only subroutine numbers 000 through 127.
The CPM1/CPM1A/SRM1 PCs support only subroutine numbers 000 through
049.
Each subroutine number can be used in SBN(92) once only.
Description SBN(92) is used to mark the beginning of a subroutine program; RET(93) is
used to mark the end. Each subroutine is identified with a subroutine number,
N, that is programmed as a definer for SBN(92). This same subroutine num-
ber is used in any SBS(91) that calls the subroutine (see 5-25-1 SUBROU-
TINE ENTER – SBS(91)). No subroutine number is required with RET(93).
All subroutines must be programmed at the end of the main program. When
one or more subroutines have been programmed, the main program will be
executed up to the first SBN(92) before returning to address 00000 for the
next cycle. Subroutines will not be executed unless called by SBS(91).
END(01) must be placed at the end of the last subroutine program, i.e., after
the last RET(93). It is not required at any other point in the program.
Precautions If SBN(92) is mistakenly placed in the main program, it will inhibit program
execution past that point, i.e., program execution will return to the beginning
when SBN(92) is encountered.
If either DIFU(13) or DIFU(14) is placed within a subroutine, the operand bit
will not be turned OFF until the next time the subroutine is executed, i.e., the
operand bit may stay ON longer than one cycle.
Flags There are no flags directly affected by these instructions.
5-26 Special Instructions
5-26-1 TRACE MEMORY SAMPLING – TRSM(45)
!Caution This instruction is not supported by CQM1-CPU11-E/21-E, the CPM1/
CPM1A/SRM1 PCs.
Data tracing can be used to facilitate debugging programs. To set up and use
data tracing it is necessary to have a host computer running SSS; no data
tracing is possible from a Programming Console. Data tracing is described in
detail in the SSS Operation Manual: C-series PCs. This section shows the
ladder symbol for TRSM(45) and gives an example program.
Description TRSM(45) is used in the program to mark locations where specified data is to
be stored in Trace Memory. Up to 12 bits and up to 3 words may be desig-
N: Subroutine number
000 to 255
SBN(92) N
Ladder Symbols Definer Data Areas
RET(93)
Ladder Symbol
TRSM(45)

Table of Contents

Other manuals for Omron CPM1

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CPM1 and is the answer not in the manual?

Omron CPM1 Specifications

General IconGeneral
BrandOmron
ModelCPM1
CategoryController
LanguageEnglish

Related product manuals