Omron CJ2 CPU UNIT SOFTWARE User Manual page 138

Cj2 cpu unit software
Hide thumbs Also See for CJ2 CPU UNIT SOFTWARE:
Table of Contents

Advertisement

5 Understanding Programming
Calculating the Number of Steps Used by Function Blocks
Use the following formula as a guide to the number of steps used by function blocks.
Number of steps used
= Number of instances × (Call part size m + I/O parameter transfer part size n × Number of parameters) + Num-
ber of instruction steps in the function block definition p (See note.)
Note Memory will not be used for the number of instruction steps in the function block definition (p) in the second
and later instances when the same function block definition is created in multiple locations (i.e., for multiple
instances). Therefore, in the above equation, the number of instruction steps in the function block definition
(p) is not multiplied by the number of instances.
m
Call part
n
I/O parameter transfer
part
The data types are
indicated in parenthe-
ses.
p
Number of instruction
steps in function block
definition
Example
Five input symbols with a 1-word (INT) data type, five output symbols with a 1-word (INT) data type, and
a function block definition with 100 steps:
Number of steps for 1 instance = 57 + (5 + 5) × 6 steps + 100 steps + 27 steps = 244 steps
If the function block is written in the standard text language, the actual number of steps cannot be cal-
culated. The number of instruction steps in a function block definition can be checked in the properties
of the function block definition.
Additional Information
For function block specifications, notation methods, and input procedures, refer to the CX-Pro-
grammer Operation Manual: Function Blocks and Structured Text (Cat. No. W447).
5-46
Items
1-bit (BOOL) input symbol or output symbol
1-word (INT, UINT, WORD) input symbol or output sym-
bol
2-word (DINT, UDINT, DWORD, REAL) input symbol or
output symbol
4-word (LINT, ULINT, LWORD, LREAL) input symbol or
output symbol
I/O symbols
The total number of instruction steps (same as standard user program) + 27
steps.
Number of steps
57 steps
6 steps
6 steps
6 steps
12 steps
18 steps
CJ2 CPU Unit Software User's Manual

Advertisement

Table of Contents
loading

Table of Contents