TeachOn Function

Returns the Teach mode status.

Syntax
TeachOn

Return Values
True if it is in the Teach mode, False if not.

Description
TeachOn function is only used in the background task.

See Also
ErrorOn, EstopOn, SafetyOn, Xqt

TeachOn Function Example
The following example monitors the controller as it starts in Teach mode, and turns On/Off the I/O.

Function BGMain
  Do
    Wait 0.1
    If TeachOn = True Then
      On teachBit
    Else
      Off teachBit
    EndIf
    If SafetyOn = True Then
      On safetyBit
    Else
      Off safetyBit
    EndIf
    If PauseOn = True Then
      On PauseBit
    Else
      Off PauseBit
    EndIf
  Loop

Fend