22
3 SPECIFICATION
3.1 Details of the FB Library
■External public label
■Global label (using latch label)
Refer to Page 26 Global Labels.
Function overview
No. Name Variable name Data type Default value Description
(10) Rotation speed pbo_uRevolvingSpeed Word [Unsigned]/
Bit string [16-bit]
0 Stores the calculation result of rotation speed.
(Unit: rpm)
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,555 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.34 K point [WORD]
■Latch label
0 K point [WORD]
The used label amount integrated in the program varies depending on the device specified as a parameter and the option settings
of GX Works3. For the option settings of GX Works3, refer to the GX Works3 Operating Manual.
Function description (1) By turning on i_bEN (Execution command), o_bOK (Normal completion) is turned on when the specified input label is in the
setting range.
(2) When i_bEN (Execution command) is turned off, o_b48CamOutput (Cam output) is all off and the FB stops.
(3) The cam output data at the position of i_dCounterValue (Current value) is output to the specified o_b48CamOutput (Cam
output) as follows.
• Only the number that is set to ON in i_b48CamOutputNo (Cam output number) is the cam output control target. (When this label
is off, the cam output is always off.)
• The speed
*1
is calculated from the difference between the previous current value and present current value. The cam output
data after ON angle advance amount / OFF angle advance amount that is set in st4AngleAdvFunc (Angle advance function
setting) from i_dCounterValue (Current value) is output to o_b48CamOutput (Cam output).
o_b48CamOutput (Cam output) of each i_uCh (Channel number) is independent.
(4) The calculated speed is stored in pbo_uRevolvingSpeed (Rotation speed).
(5) 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 25 Error code.
(6) When the input value of i_uCounterValue (Current value) is out of range, o_bErr (Error completion) turns on, the error code 101
(hexadecimal) is stored in o_uErrId (Error code), and FB processing stops.
For details of the error code, refer to Page 25 Error code.
FB compiling method Macro type
FB operation type Real-time execution
Application example Refer to Page 33 Program Example.