<4. Control Application Creation>
Variable 'V008' is never used.
Variable 'V009' is never used.
Variable 'V011' is never used.
:
Among these warnings, the warning “Instance 'R_TRIG_1' is used more than once.”
indicates a real problem.
From the warning, we know that function block “R_TRIG” for detecting a rising edge
is used in multiple places with the same name “R_TRIG_1”.
Problem
Consider the following scenario.
Variable “a,” which is connected to input parameter CLK of R_TRIG_1 in one
location becomes ON and remains ON after R_TRIG_1 detects the rising edge and
performs output.
Variable “b,” which is connected to input parameter CLK of R_TRIG_1 in another
location now becomes ON. As variable “a” connected to input parameter CLK of
R_TRIG_1 in the first location remains ON after the first rising edge is detected,
R_TRIG_1 fails to detect the rising edge in variable “b” and thus performs no output.
In other words, the rising edge in variable “b” goes undetected.
This is an example where leaving an unresolved warning affects normal control.
● Recommendation: Fix All Compile Warnings
In the above example, one out of 34 warnings indicates a real problem.
When there are not so many warnings (say 30 or less), it may be easier to spot a
problematic warning among all displayed warnings.
However, when there are many warnings, it is possible that a problematic warning in
the midst may be ignored.
As such, fixing all compile warnings is recommended, even if they are non-
problematic, to avoid missing out a problematic warning.