Mitsubishi Electric MELSEC iQ-F Series Programming Manual page 29

Hide thumbs Also See for MELSEC iQ-F Series:
Table of Contents

Advertisement

Number of steps (Subroutine type function blocks)
■Calling source
When calling a subroutine type function block, the calling source generates the processing that passes the argument before
and after the call processing.
Program block 1
(displayed)
FB1_a
M0
Y20
FB1
D0
FB1_b
M10
FB1
Y40
D10
The call-target program is
replaced with the instruction
for calling a function block.
• Passing the argument
The instruction used to pass the argument differs depending on the class and data type of the argument. The following table
summarizes the instructions that can be used to pass the argument.
Argument class
Data type
VAR_INPUT
Bit
VAR_IN_OUT
VAR_OUTPUT
Word [unsigned]/bit string [16 bits]
Double word [unsigned]/bit string [32 bits]
Word [signed]
Double word [signed]
Single-precision real number
Time
String (32)
Array, Structure
• Calling the program
The following table lists the number of steps required to call the program of the function block.
Item
Number of steps
With EN
10
Without EN
12
• EN/ENO
The following table lists the number of steps required for EN/ENO.
Item
Number of steps
EN
4 to 7
(The number of steps differs depending on the details of the program such as the type and number of the device specified as the
input source of EN.)
ENO
6 to 10
(The number of steps differs depending on the details of the program such as the type and number of the device specified as the
output destination of ENO.)
■Program
The number of steps required for a function block program is the total number of instruction steps, like usual programs.
For the number of steps required for each instruction, refer to the following.
 MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks)
Program file
MOV D0 XX
M0
FBCall FB1_a
Y20
FB file
FB1 program
Instruction used
LD+OUT
LD+MOVB
(Either of the instruction sets is used
depending on the combination of
programming language, function, and input
argument used.)
LD+MOV
LD+DMOV
LD+EMOV
LD+DMOV
LD+$MOV
LD+BMOV
(1) Passing the argument (input argument, input/output
argument)
(2) Calling the FB1 program
(3) Passing the argument (output argument, input/output
argument)
(1)
(2)
(3)
Calling the
function block
3 PROGRAM ORGANIZATION UNITS
Number of steps
For the number of steps required for
each instruction, refer to the following.
 MELSEC iQ-F FX5 Programming
Manual (Instructions, Standard
Functions/Function Blocks)
3.3 Function Blocks (FB)
3
27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-f fx5

Table of Contents