FunctionGetCtrlErrorsPLCopen motion iconPipe Network motion icon

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 PDMM and PCMM Errors and Alarms for a list of errors and alarms that may be generated.

Arguments

Input

EN BOOL Enable
ActiveError BOOL[100] Array of bool with the size equal to 100
ActiveAlarm BOOL[100] Array of bool with size equal to 100

Output

OK BOOL  
Q DINT Status of the execution

Status meaning: 

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 PLCClosed "Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events processes will be shut down. This will start 10 seconds after the error is triggered
Bit 2-15 Value 2 | 4 | 9 to 2147483648 reserved

Examples

FBD

FFLD

ST

//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];