<9. Advanced Engineering >
9.1.14 Avoidance of the Error during Execution
The control task stops when division by zero (integer variables) or access exceeding
the range of the array occurs.
It is recommended to insert a code to avoid a careless stop.
Avoidance of Division by Zero (integer variables)
IF I_COUNT > 0 THEN
V_AVE := V_SUM/I_COUNT;
END_IF;
● Avoidance of Access Exceeding the Range of the Array
IF I_REPORT_M > 0 AND I_REPORT_M < 13 THEN
BUFFER_M [I_REPORT_M] := 10;
END_IF