RobotStudio event

SetProgramPointer

Options

Hello, i try to  set the program pointer,  but  I got  an  exception:

Specified argument was out of the range of valid values. Parameter name: Specified Url is invalid

The code is  exactly the same as the  manual:


Dim allTasks As ABB.Robotics.Controllers.RapidDomain.Task() = MyController.Rapid.GetTasks()
Dim firstTask As ABB.Robotics.Controllers.RapidDomain.Task = allTasks(0)
firstTask.SetProgramPointer(
"TESTM", 9)

and


Dim allTasks As ABB.Robotics.Controllers.RapidDomain.Task() = MyController.Rapid.GetTasks()
Dim firstTask As ABB.Robotics.Controllers.RapidDomain.Task = allTasks(0)
firstTask.SetProgramPointer(
"TESTM", "TestR")

BR

Oscar

 

Here there are also the full  error  description:

System.ArgumentOutOfRangeException was unhandled by user code
  Message="Specified argument was out of the range of valid values. Parameter name: Specified Url is invalid"
  ParamName="Specified Url is invalid"
  Source="Dcl.Base"
  StackTrace:
       at ABB.Robotics.Dcl.ExceptionHelp.ReThrowException(String objStr, String method, Exception exception, String additionalinfo)    at ABB.Robotics.Dcl.ExceptionHelp.GenerateException(String objStr, String method, Exception exception, String additionalinfo)    at ABB.Robotics.Dcl.ExceptionHelp.GenerateException(Object obj, String method, Exception exception, String additionalinfo)    at ABB.Robotics.Dcl.ExceptionHelp.GenerateException(Object obj, String method, Exception exception)    at ABB.Robotics.Controllers.RapidDomain.Task.SetProgramPointer( String module, Int32 n)    at TpsViewManualGuidance.TpsViewManualGuidance.Btn_StartABBProg ram_Click(Object sender, EventArgs e)    at System.Windows.Forms.Control.OnClick(EventArgs e)    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)    at System.Windows.Forms.Control.WndProc(Message& m)    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)    at System.Windows.Forms.ContainerControl.WndProc(Message& m)    at System.Windows.Forms.UserControl.WndProc(Message& m)    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(M essage& m)    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Mes sage& m)    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  InnerException:

BR
Oscar Ferrrato

Comments

  • Hello Oscar,

    Is the routine declared 'LOCAL'? If so, see if it makes any difference if it is not.

    Are you using FP SDK 5.10?

     

    Best regards,

    Ingela Brorsson
    Software Engineer
    ABB Robotics, Sweden