8
2 INPUT/OUTPUT FB
2.2 M+FX5UCPU-IO_CompareRelayOnTimes
Error code
Timing chart of I/O signals [When the operation is completed successfully]
(In the case of "o_udOutputOnTotal (Integration value of number of relay ON times) > i_udCompareCount (Number of
comparisons)")
[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 the ladder, normal counting is disabled if the target relay device is turned ON
and OFF twice or more in 1 scan.
• This FB uses the latch label. If the latch label area capacity is insufficient for the contents of the program, a message is
displayed in GX Works3 while the program is converted. 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.
Item Description
i_bEN
o_bENO
o_bOK
Target relay device
o_bErr
o_uErrId
o_bFbResult
0H
N-1 N
N
N+1
i_udCompareCount
o_udOutputOnTotal
i_bEN
o_bENO
o_bOK
Target relay device
o_bErr
o_uErrId
o_bFbResult
Error code0H 0H
Do not change
Ni_udCompareCount
o_udOutputOnTotal