
Diagnostics
FC2001 and FC2002
26
Version: 2.0
Output variables
BUSY
When activated, the FB sets the output
BUSY.
The output remains set as long as the FB is
active.
ERR
If an ADS error occurs during the transfer of the command, the function block resets the
BUSY
output and sets the
ERR
output.
ERRID
In the event of an error, the
ERRID
output returns the ADS error number.
BREAK
This flag is set if a break location is detected in the optical fiber ring.
BOXNO
The module number before the receiver input in front of which the break location has been
detected.
Further information for the use of this function block can be found in the Beckhoff Information System.
IOF_GetBoxCount
The function block
IOF_GetBoxCount
can be used to determine the number of configured and active I/O
boxes (modules) of an I/O device (fieldbus card).
Fig. 21: Function block IOF_GetBox_Count
Input variables
NETID
This can be used to transfer the AmsNetId of the computer on which the FB is to be executed. If
an empty string is transferred, the FB is executed on the local computer.
DEVICEID This device ID specifies the device (e.g. the fieldbus card) on which the function is to be
executed. The device Ids are specified by the TwinCAT System Manager during the hardware
configuration.
START
A rising edge at the
START
input activates the FB.
TMOUT
Used to specify the length of the timeout that may not be exceeded during execution of the ADS
command.
Output variables
BUSY
When activated, the FB sets the output
BUSY.
The output remains set as long as the FB is
active.
ERR
If an ADS error occurs during the transfer of the command, the function block resets the
BUSY
output and sets the
ERR
output.
ERRID
In the event of an error, the
ERRID
output returns the ADS error number.
BOXCOUN
T
After successful execution of the function block, the output
BOXCOUNT
returns the number of
I/O modules (boxes) found.
Further information for the use of this function block can be found in the Beckhoff Information System.