-
Open one of the IEC application code editors.
-
Type the device's name as it is written in the device tree, followed by a dot (".").
-
Select the method
GetDeviceStatefrom the context menu or type the name of the method on yourself. -
Assign the function’s parameters.
|
Scope |
Name |
Type |
Comment |
|---|---|---|---|
|
Return |
GetDeviceState |
DEVICE_STATE⮫ Further information |
Current device state |
|
Output |
xDiagnosisInfoAvailable |
BOOL |
If TRUE, diagnosis messages are available regarding the concerning device (= node). |
|
Output |
eError |
Type of the return values of all methods and functions of library CAA Device Diagnosis |
|
Name |
Type |
Initial |
Icon in AB |
Comment |
|---|---|---|---|---|
|
UNKNOWN |
INT |
0 |
The device is in state unknown. Example: No supervision mechanism active |
|
|
STOPPED |
INT |
1 |
The device is stopped. |
|
|
RUNNING |
INT |
2 |
![]() ![]() ![]() |
The device is running. |
|
ERROR |
INT |
3 |
The device is in error state. |
|
|
DISABLED |
INT |
4 |
The device is disabled in device tree. |
|
|
NOT_CONFIGURED |
INT |
5 |
The device has not been yet configured by the stack. Example: Configuration phase not yet started |
|
|
CONFIGURED |
INT |
6 |
The device has been configured by the stack. Example: Configuration phase finished but the device is not in running state |
|
|
NOT_FOUND |
INT |
7 |
![]() |
The device was not found on bus. |
|
Name |
Type |
Initial |
Comment |
|---|---|---|---|
|
NO_ERROR |
INT |
0 |
No error |
|
FIRST_ERROR |
INT |
1300 |
First library-specific error |
|
TIME_OUT |
INT |
1301 |
Timeout occured. |
|
ABORT |
INT |
1302 |
Operation was aborted. |
|
REF_INVALID |
INT |
1303 |
The interface reference was invalid. |
|
NOT_SUPPORTED |
INT |
1304 |
The function is not supported. |
|
ERROR_IO |
INT |
1305 |
A general I/O configuration error occured. |
|
PARAM_INVALID |
INT |
1306 |
Invalid parameter |
|
NODE_NOT_EXISTING |
INT |
1307 |
The specified node does not exist. |
|
NO_MEMORY |
INT |
1308 |
Dynamic memory allocation is disabled, or system is out of memory. |
|
ADR_NOT_FOUND |
INT |
1309 |
The specified I/O address is not valid. |
|
INST_NOT_FOUND |
INT |
1310 |
There is no associated [Device] instance for the specific I/O address. |
|
NO_DATA |
INT |
1311 |
There is no data available. |
|
OPERATION_INVALID |
INT |
1312 |
Operation not possible due to the current state |
|
FIRST_MF |
INT |
1350 |
First manufacturer-specific error |
|
LAST_ERROR |
INT |
1399 |
Last error |





