PauseOn Function

Returns the pause status.

Syntax
PauseOn

Return Values
True if the status is pause, otherwise False.

Description
PuseOn function is used only for NoPause, NoEmgAbort task (special task using NoPause or NoEmgAbort at Xqt), and background tasks.

See Also
ErrorOn, EstopOn, SafetyOn, Wait, Xqt

PauseOn Function Example
The following example shows a program that monitors the controller pause and switches the I/O On/Off when pause occurs. However, when the status changes to pause by Safety Door open, the I/O does not turn On/Off.

Function main

  Xqt PauseMonitor, NoPause
  :
  :
Fend

Function PauseMonitor
  Boolean IsPause
  IsPause = False
  Do
    Wait 0.1
    If SafetyOn = True Then
      If IsPause = False Then
        Print "Safety On"
        IsPause = True
      EndIf
    ElseIf PauseOn = True Then
      If IsPause = False Then
        Print "InPause"
        If SafetyOn = False Then
          Off 10
          On 12
        EndIf
      IsPause = True
      EndIf
    Else
      If IsPause = True Then
        Print "OutPause"
        On 10
        Off 12
        IsPause = False
      EndIf
    EndIf
  Loop
Fend