Errb Function

Returns the robot number which the error occurred.

Syntax
Errb

Return Values
Returns the robot number which the error occurred.

Description
Errb finds and returns the robot number where the error occurred. If the robot is not the cause of the error, “0” will be returned.

See Also
Era, Erl, Err, ErrMsg$, OnErr, Trap

Errb Function Example
The Following items are returned in the program example below.

  • In which task the error occurred (Ert function)
  • Where the error occurred (Erl function)
  • What error occurred (Err function)
  • On which joint the error occurred (Era function)
  • On which robot the error occurred (Errb function)
Function main
  OnErr Goto eHandler
  Do
    Call PickPlace
  Loop
  Exit Function
eHandler:
  Print "The Error code is ", Err
  Print "The Error Message is ", ErrMsg$(Err)
  errTask = Ert
  If errTask > 0 Then
    Print "Task number in which error occurred is ", errTask
    Print "The line where the error occurred is Line ", Erl(errTask)
    If Era(errTask) > 0 Then
      Print "Joint which caused the error is ", Era(errTask)
    EndIf
  Print "Robot number in which error occurred is ", errb
  EndIf
Fend