GetCtrlErrors
Function - Get a list of the active errors and alarms on the controller.
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
En |
BOOL |
|
|
|
Enable |
ActiveError |
BOOL[100] |
|
|
|
Array of BOOL with the size equal to 100. |
ActiveAlarm |
BOOL[100] |
|
|
|
Array of BOOL with the size equal to 100. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
OK |
BOOL |
|
|
|
Q |
DINT |
|
|
Status of the execution. |
Remarks
- Returns active errors and alarms on the controller in two arrays of hundred Booleans.
- Every index in the array corresponds to the error and alarm numbers in the tables.
- See Controller Error and Alarm Descriptions for a list of possible generated errors and alarms.
Status Meaning
Bit |
Value |
Description |
---|---|---|
Bit 0 |
Value 0 |
No error, no alarm, no shut down. |
Bit 0 |
Value 1 |
There is an active error or an active alarm (i.e., there is something in the array ActiveError/ActiveAlarm). |
Bit 1 |
Value 0 |
No shut down. |
Bit 1 |
Value 1 |
The PLC processes is shut down. This starts 10 seconds after the error is triggered. |
Bit 2 to 15 |
Value 2 | 4 | 9 to 2147483648 |
Reserved. |
-
- See Check for existing EtherCAT Alarms and Errors in the Example: EtherCAT Communication Diagnosis Steps section for an example of implementing this function.
FBD Language Example
FFLD Language Example
IL Language Example
Not available.
ST Language Example
//Retrieve active controller level alarm and errors.
//Check status output to see if any error or alarm is active and if PLC is shutting down
ControllerErrorStatus:= GetCtrlErrors( ActiveControllerErrors, ActiveControllerAlarms);
ActiveError:= ControllerErrorStatus.0;
PLCShutDown:= ControllerErrorStatus.1;
E30Active:= ActiveControllerErrors[30];