2 INPUT/OUTPUT FB
2.1 M+FX5UCPU-IO_OutputOnTimes
5
2
FB details
Error code
Item Description
Available device CPU module FX5U CPU, FX5UC CPU
Engineering tool GX Works3 Version 1.007H or later
Language Ladder diagram
Number of basic steps 102 steps
The number of steps of the FB in a program depends on the CPU module used and input and output definition.
Processing • This FB starts counting when i_bEN (Execution command) turns ON.
• If the setting value of i_uRaNo (Target relay device number) is out of the setting range, o_bErr (Error completion) turns ON
and the processing of this FB is aborted. o_uErrId (Error code) stores the error code "100 (hexadecimal)". For the error code,
refer to Page 5 Error code.
FB compilation method Macro type
FB operation Always executed
Timing chart of I/O signals [When the operation is completed successfully]
[When the operation is completed with an error]
(When the target relay device number is outside the setting range)
Restrictions or precautions • This FB does not include the error recovery processing. Program the error recovery processing separately in accordance
with the required system operation.
• This FB cannot be used in an interrupt program.
• Do not use this FB in programs that are executed only once, such as a subroutine program or FOR-NEXT loop, because
i_bEN (Execution command) cannot be turned off and the normal operation cannot be acquired. Always use this FB in
programs that can turn off i_bEN (Execution command).
• When this FB is used twice or more, precaution must be taken to avoid duplication of the relay device number.
• This FB uses the index register Z9. When using an interrupt program, do not use this index register in the interrupt program.
• Every input must be provided with a value for proper FB operation.
• When clearing current value of o_udOutputOnTotal (Integration value of No. of relay ON times), write K0 to "Instance name
.o_udOutputOnTotal (Integration value of No. of relay ON times)" by DMOV instruction.
• Because the target relay device is counted in ladder, the FB cannot count correctly if the target relay device is turned ON and
OFF twice or more in 1 scan.
• This FB uses latch labels. If the latch label area capacity is insufficient for the contents of the program, a message is
displayed in GX Works3 when the program is compiled. In such a case, correct the program in accordance with the contents
of the message.
• Set the module parameters in GX Works3 in accordance with the connected equipment and system. For the module
parameters, refer to the MELSEC iQ-F FX5 User's Manual (Application).
Error code (hexadecimal) Description Action
100H The set value of i_uRaNo (target relay device number) is out of the
range.
The target relay device number is not within the range of 0 to the
value in Y device size.
Try again after checking the setting.
i_bEN
o_bENO
o_bOK
Target relay device
o_udOutputOnTotal
o_bErr
o_uErrId
0H
01 2
i_bEN
o_bENO
o_bOK
Target relay device
o_bErr
o_uErrId
Error code0H
Do not change
0H
o_udOutputOnTotal