RobotStudio event

API: Active speed & zone information


Hello,

 

I would like to access the active speed and the active zone (shown at the picture below) using the RS-API.

 

image


 

I tried to get these information from the ActiveProcessTemplate, but this object only contains information about the motiontype.

 

[Code]


RsProcessTemplate
proctemp = station.ActiveTask.ActiveProcessDefinition.ActiveProcessTemplate;


[/Code]

 

How can i get the information about the currently selected speed and zone?

 

 
Johannes Wiesehöfer
ABB Robotics
Friedberg

Comments

  • Hi Johannes,
     

    you can use the active process  template to access the instruction template for the motion type you like.

     

    [CODE]
    public RsInstructionTemplate GetTemplate(
    MotionType motionType
    )
    [/CODE]

     

    If you pass in MotionType.Linear to GetTemplate() you can access the template arguments.

    There is an example in the API documentation for RsInstructionTemplate that shows how to access the arguments and their values.

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • Hi,
     

    thats the method I need.

     

    But I noticed an apparently wrong description of the GetTemplate() method.

    As shown in the following screenshot the description says:

    "Gets the RsProcessTemplate corresponding..."

    I think it should be:

    "Gets the RsInstructionTemplate corresponding..."

     

    image

     
    Johannes Wiesehöfer
    ABB Robotics
    Friedberg
  • Hi Johannes,
     

    you are right, there is a type in the documentation. It will be fixed in RobotStudio 5.13.01.

    Thanks.

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog