18
3 SPECIFICATION
3.1 Details of the FB Library
■Output label
■External public label
■Global label
Refer to Page 26 Global Labels.
Function overview
No. Name Variable name Data type Default
value
Description
(7) Execution status o_bENO Bit OFF ON: The execution command is on.
OFF: The execution command is off.
(8) Normal
completion
o_bOK Bit OFF When this label is on, it indicates that the angle advance
setting is completed normally.
(9) Error completion o_bErr Bit OFF When this label is on, it indicates that an error has occurred in
the FB.
(10) Error code o_uErrId Word [Unsigned]/Bit
string [16-bit]
0 The error code that occurred in the FB is stored.
No. Name Variable name Data type Default
value
Description
None None None None None None
Item Description
Applicable hardware and
software
Target CPU FX5U CPU, FX5UC CPU
Applicable engineering tool GX Works3 Version 1.050C or later
Programming language Ladder
Number of basic steps 1,559 step
The number of FB steps integrated in the program varies depending on the CPU module used, the input/output definition, and the
setting options of GX Works3. For the option settings of GX Works3, refer to the GX Works3 Operating Manual.
Used label amount ■Label
2.15 K point [WORD]
■Latch label
0 K point [WORD]
The number of the label used amount integrated in the program varies depending on the device specified as a parameter and the
setting options of GX Works3. For the option settings of GX Works3, refer to GX Works3 Operating Manual.
Function description (1) The following operations are performed by turning on i_bEN (Execution command).
• i_u21AngleAdvFuncSet (Angle advance function setting) is stored in st4CamAngleAdvFunc (Angle advance function setting) of
M+Global_FX5CPU_CamCtrLatch (Setting data of 3CH (Latch data)). After the processing is complete, o_bOK (Normal
completion) turns on.
(2) By turning off i_bEN (Execution command), the FB is stopped and the processing is not performed.
(3) When the setting value of i_uCh (Channel number) is out of range, o_bErr (Error completion) turns on, the error code 100
(hexadecimal) is stored in o_uErrId (Error code), and FB processing stops.
For details of the error code, refer to Page 20 Error code.
(4) When the setting value of i_uCamNo (Cam output number) is out of range, o_bErr (Error completion) turns on, the error code
102 (hexadecimal) is stored in o_uErrId (Error code), and FB processing stops.
For details of the error code, refer to Page 20 Error code.
(5) When the setting value of i_u21AngleAdvFuncSet (Advance angle function setting) is not S0 < S1 < ... < S6, or the setting is
"resolution/2" or more, o_bErr (Error completion) turns on, the error code 105 (hexadecimal) is stored in o_uErrId (Error code),
and FB processing stops.
For details of the error code, refer to Page 20 Error code.
FB compiling method Macro type
FB operation type Pulsed execution (1 scan execution type)
Application example Refer to Page 33 Program Example.