26
3 PROGRAM ORGANIZATION UNITS
3.3 Function Blocks (FB)
■Inherent property setting
The following items can be set when a program of a function block is created. ( GX Works3 Operating Manual)
*1 To select this item, select "Yes" for "Use EN/ENO". However, the item cannot be used depending on the versions of the CPU module
and GX Works3 used when "Subroutine Type" is selected for "FB Type". For the versions of the CPU module and the GX Works3, refer
to the following.
MELSEC iQ-F FX5 User's Manual (Application)
■Applicable devices and labels
The following table lists the devices and labels that can be used by function block programs.
: Applicable, : Applicable only in instructions (Cannot be used to indicate the program step.), : Not applicable
Number of steps (Macro type function blocks)
■Calling source
When calling a macro type function block, the calling source loads the call-target program during compilation.
■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)
Item Description
Use MC/MCR to Control EN
*1
For "Yes", the MC/MCR instructions are used to control EN. For "No", the CJ instruction is used to control EN.
Select "Yes" when instructions executed at the rising edge or falling edge are used in an FB. The operations of a
timer/counter and the OUT instruction used in an FB differ depending on the selected item. For details, refer to the
following.
Page 113 Operations of when the MC/MCR instructions are used to control EN
Use EN/ENO For "Yes", a function block with EN/ENO is created, and EN/ENO labels can be used in a program without
registering as local labels. For "No", a function block without EN/ENO is created.
For details on EN/ENO, refer to the following.
Page 25 EN and ENO
Type of device/label Availability
Label (other than the pointer type) Global label
Local label
Label (pointer type) Pointer type global label
Pointer type local label
Device Global device
Pointer Global pointer
(1) The program is loaded in two or more call locations.
FB1
FB1_a
FB1
FB1_b
(FB1_b)
(FB1_a)
(1)
Program block 1 (displayed)
FB1 program
FB1 program
Program file