77
Number of Function Block Program Steps and Instance Execution Time
Section 2-9
Example:
Input variables with a 1-word data type (INT): 5
Output variables with a 1-word data type (INT): 5
Function block definition section: 100 steps
Number of steps for 1 instance = 57 + (5 + 5) × 6 steps + 100 steps + 27 steps
= 244 steps
When the program is written in ST language, the actual number of steps can-
not be calculated. The number of instruction steps in each function block defi-
nition can be found in the function block definition’s properties.
2-9-2 Function Block Instance Execution Time
This section applies only to CP-series CPU Units with unit version Ver. 1.0 or
later and CS/CJ-series CPU Units with unit version Ver. 3.0 or later, NSJ Con-
trollers, and FQM1 Flexible Motion Controllers.
Use the following equation to calculate the effect of instance execution on the
cycle time when function block definitions have been created and the
instances copied into the CPU Unit’s user program.
Contents Number of steps
m Call part --- 57 steps
n I/O parameter
transfer part
The data type is
shown in parenthe-
ses.
1-bit (BOOL) input vari-
able or output variable
6 steps
1-word (INT, UINT, or
WORD) input variable or
output variable
6 steps
2-word (DINT, UDINT,
DWORD, or REAL) input
variable or output variable
6 steps
4-word (LINT, ULINT,
LWORD, or LREAL) input
variable or output variable
12 steps
Input-output variables 18 steps
p Number of instruc-
tion steps in func-
tion block definition
The total number of instruction steps (same as standard
user program) + 27 steps.
Effect of Instance Execution on Cycle Time
= Startup time (A)
+ I/O parameter transfer processing time (B)
+ Execution time of instructions in function block definition (C)