Section 6 Program Code Issues Range Check
3BSE042835-600 103
Range Check
Table 14. Example, Function Block Type
Name
Data
type
Attributes Direction
Initial
value
Description
ParError bool Retain Out Indicates parameter range error.
Table 15. Example, Function Block Type
Name
Data
type
Attributes Direction
Initial
value
Description
AEConfig dint Retain In 1 Config (0=None, 1=Alarm,
2
=Event, 3=Event1,
4=Indication, Else Alarm +
ParError)
A real, integer, data type, or time input parameter may have a range. This means that
it may be required to have a relation (for example > or <) to one or several constants
or other parameters.
Generally, the object must have a predictable behavior for out-of-range input values.
One example can be to use the closest range border value for internal calculations.
What action that is most reasonable when out-of-range values are detected has to be
decided from case to case.
If any real, integer, or time input parameter is out-of-range a graphical indication
shall be visible in the faceplate and interaction window. In addition, a bool output
parameter ParError shall be set to true (see also sub-section ParError on page 37).
The parameter description shall state the range, the
action for valid input values, and
the action for out-of-range values.
Exception: A ParError parameter (or other parameters) shall not b
e added to types
where the parameter interface is defined by IEC 61131-3, for example TOn.