EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-F FX5 - Page 17

Mitsubishi Electric MELSEC iQ-F FX5
64 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
Loading...
3 PROGRAM ORGANIZATION UNIT (POU)
3.1 Function (FUN)
15
3
Calling source
When calling a function, the calling source generates the processing that passes the argument and return value before and
after the call processing.
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.
Calling the program
At least 16 steps are required to call the program of a function.
Passing the return value
The instruction and the number of steps used for passing the return value are identical to those for passing the argument.
EN/ENO
The following table lists the number of steps required for EN/ENO.
Precautions
Global pointer/local pointer/pointer type global labels
Global pointer, local pointer, and pointer type global labels cannot be used as labels indicating program steps in the function
program.
(1) Passing the argument
(2) Calling the FUN1 program
(3) Passing the return value
Argument class Data type Instruction used Number of steps
VAR_INPUT Bit LD+OUT
LD+MOVB
(Which of the above instructions is used is
determined by the combination of the
programming language, type of function, and
type of input argument.)
For the number of steps required for
each instruction, refer to the
following.
Programming manual
(Instructions, Standard Functions/
Function Blocks)
Word [Unsigned]/Bit String [16-bit]
Double Word [Unsigned]/Bit String [32-bit]
Word [Signed]
Double Word [Signed]
LD+MOV
LD+DMOV
FLOAT [Single Precision] LD+EMOV
Time LD+DMOV
String(32) LD+$MOV
Array, Structure LD+BMOV
Argument class Data type Instruction used Number of steps
VAR_OUTPUT Same as for passing the argument Same as for passing the argument Same as for passing the argument
Item Number of steps
EN 6
ENO 4
FUN1
M0
M0
MOV D0 XX
(1)
(2)
(3)
Calling the function
FUNCall FUN1
Y20
Y20
D0
FUN2
M10 Y40
D10
Program block 1
(displayed)
Program file
FB file
FUN1 program
The call-target program
is replaced with the call
instruction.

Other manuals for Mitsubishi Electric MELSEC iQ-F FX5

Related product manuals