![background image](http://html1.mh-extra.com/html/ifm/ac1401/ac1401_programming-manual_3896314033.webp)
33
ifm
Programming Manual AS-i Gateway AC14 (4.2.x)
12/2017
Programming
Use functions of the ifm package
>
7.4
Use functions of the ifm package
18489
The CODESYS package "CODESYS for ifm SmartPLC StandardLine" offers different functions for the
programming of the device-internal CODESYS controller. In the following sections, these functions will
be briefly described. To make orientation easier, the functions are grouped according to corresponding
subjects and provided with a cross-reference to a detailed explanation in the document's appendix.
>
7.4.1
Control interface of the ifm function blocks
17660
All function blocks (FB) of the libraries ACnnnn_Utils.library and ACnnnn_SYS_CMD.library have
inputs and outputs for control signals. The inputs activate the execution of the function block. The
outputs provide information about the internal condition of the function block. Thanks to the signals,
the programmer can create a control structure for a targeted processing of the FB and react to
possible errors.
Number and designation of the FB control signals provide information about the type of FB execution:
>
FB with one-time execution
17140
These function blocks perform their function exactly once after activation. To execute the function
once again, the FB needs to be reactivated. FBs of this kind feature a control interface with the
following inputs and outputs:
Designation
Type
Data type
Description
Possible values
xExecute
Input
BOOL
Control FB execution
FALSE
Stop FB execution
TRUE
Start FB execution
xReady
Output
BOOL
Indication of whether execution of
the FB has been completed
FALSE
FB execution not yet completed
TRUE
FB execution completed
xBusy
Output
BOOL
Indication of whether FB is active FALSE
Function block is inactive
TRUE
FB is active
xError
Output
BOOL
Indication of whether faults have
occurred during execution of the
FB
FALSE
FB executed correctly
TRUE
Error occurred during execution of
the FB
wDiagnostic
Output
WORD
Error code
FB specific
The following figure shows the relation between the connections of the control signals: