ifm
System Manual
ecomat
mobile
PDM360NG (CR1080, CR1081, CR9042) Target V01
2011-07-28
Limitations and programming notes
Programming notes for CoDeSys projects
98
6.2
Programming notes for CoDeSys projects
FB, FUN, PRG in CoDeSys .........................................................................................................98
Libraries ......................................................................................................................................99
Operating sequence.................................................................................................................. 100
CoDeSys visualisation elements............................................................................................... 101
Texts ................................................................................................................................... 102
Movement of elements.............................................................................................................. 103
Save ................................................................................................................................... 103
7426
Here you receive tips how to program the device.
►
See the notes in the CoDeSys programming manual
ecomat
mobile
DVD "Software, tools and documentation".
6.2.1
FB, FUN, PRG in CoDeSys
8473
In CoDeSys we differentiate between the following types of units (POUs):
FB = function block
A FB may have several inputs and several outputs.
A FB may be called several times within a project.
For every call you must declare an instance.
Allowed: in a FB call of FB or FUN.
FUN = function
A function may have several inputs but only one output.
The output is of the same data type as the function itself.
PRG = program
A PRG may have several inputs and several outputs.
A PRG may be called only once within a project.
Allowed: in a PRG call of PRG, FB or FUN.
NOTE
Function blocks must NOT be called within a function.
Otherwise: During the executing the application program will crash.
POU-calls must not be recursive (POU must not call itself), also not indirectly.