NoPause/NoEmgAbort task example
The following example shows a program that monitors the error of the controller and switches the I/O On/Off when error occurs according to the error number.
Program examples of ErrOn, EStopOn, and SafetyOn are indicated in the SPEL+ Language Reference.
Function main
Xqt ErrorMonitor, NoEmgAbort
:
:
Fend
Function ErrorMonitor
Wait ErrorOn
If 4000 < SysErr And Syserr < 5999 Then
Print "Mortion Error = ", SysErr
Off 10, Forced
On 12, Forced
Else
Print "Other Error = ", SysErr
Off 11, Forced
On 13, Forced
EndIf
Fend