SafetyOn Function

Return the Safety Door open status.

Syntax
SafetyOn

Return Values
True if the Safety Door is Open, otherwise False.

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

See Also
ErrorOn, EstopOn, PauseOn, Wait, Xqt

SafetyOn Function Example
The following example shows a program that monitors the Safety Door open and switches the I/O On/Off when Safety Door open occurs.

Note


  • 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.


Function main

  Xqt SafetyOnOffMonitor, NoPause
  :
  :
Fend

Function SafetyOnOffMonitor
  Do
    Wait SafetyOn = True
    Print "Saftey Open"
    Off 10, Forced
    On 12, Forced

    Wait SafetyOn = False
    Print "Saftey Close"
    On 10, Forced
    Off 12, Forced
  Loop
Fend