![ABB AC500-S Safety User Manual Download Page 217](http://html.mh-extra.com/html/abb/ac500-s/ac500-s_safety-user-manual_2916217.webp)
4.4.3.8
Libraries
External libraries approved by the manufacturer of the control system (i.e. implemented in the firmware of the
control system) may be used for safety-oriented applications.
Of the standard CoDeSys libraries only the following are approved:
Library
Description
Version (date)
Safety_Standard.lib (former
Standard.lib)
Standard IEC 61131-3 functions:
n
Timer
n
Counter
n
Trigger
n
Flip-flops
n
String processing
2.3 (04.10.2005) or higher
User libraries, created by the manufacturer of the control system or the end user, may be used. On insert of
a library, it has to be checked whether the selected library was actually inserted. The respective information
is shown when the library is inserted.
4.4.3.9
Expressions
4.4.3.9.1 General
The following general rules must be followed for programming of expressions in safety-oriented applications:
n
Mixing of different data types in an expression should be avoided. If mixing is unavoidable explicit type
conversion should be used instead.
n
The complexity of expressions should be minimised through the following measures:
–
Limitation of nesting depth (e.g., no more than 3 nesting levels) per expression
–
No more than 10 operators and 10 operands per expression
–
No application of expressions or array access in array indices
–
No application of expressions in function parameters, function block parameters or program parame-
ters.
4.4.3.9.2 Constants
In the interest of more transparent semantics constants should either be declared explicitly or associated
with explicit typification.
Bad:
VAR
size: REAL;
diameter: REAL;
END_VAR
size:= diameter * 3.14;
Good:
VAR CONSTANT
PI: REAL := 3.14;
END_VAR
VAR
Configuration and programming
CoDeSys Safety programming guidelines > Language-specific programming guidelines
30.03.2017
AC500-S
217