ErrorOn Function

Returns the error status of the controller.

Syntax
ErrorOn

Return Values
True if the controller is in error status, otherwise False.

Description
ErrorOn function is used only for NoEmgAbort task (special task using NoEmgAbort at Xqt) and background task.

See Also
ErrorOn, SafetyOn, SysErr, Wait, Xqt

ErrorOn Function Example
The following example shows a program that monitors the controller error and switches the I/O On/Off according to the error number when error occurs.

Notes


  • Forced Flag

    This program example uses Forced flag for On/Off command.

    Be sure that the I/O outputs change during error, or at Emergency Stop or Safety Door Open when designing the system.

  • Error Handling

    As this program, finish the task promptly after completing the error handling.


Function main

Xqt ErrorMonitor, NoEmgAbort
:
:
Fend

Function ErrorMonitor
  Wait ErrorOn
  If 4000 < SysErr Then
    Print "Motion Error = ", SysErr
    Off 10, Forced
    On 12, Forced
  Else
    Print "Other Error = ", SysErr
    Off 11, Forced
    On 13, Forced
  EndIf

Fend