RobotStudio event

How to set Axis Limits in the Controller Object

How to set the axis limits in the Controller Configuration Motion Domain
image
public static Station _currentStation = Project.ActiveProject as Station;
_mech = _currentStation.ActiveTask.Mechanism;

//Get the joint limits
_mech.GetJointLimits(out _actArmMinLimit_Rad, out _actArmMaxLimit_Rad);

//Set the joint limits
for (int j = 0; j < 6; j++)
{
        _mech.SetJointLimits(j, _setArmMinLimit_Rad[j], _setArmMaxLimit_Rad[j]);
}

The joint limit values I can get or set from the station object.
How can I set the limits to the controller object?

Thank you in advance.
Lingaa

Comments



  • Hi Lin,
     
    There are two different objects in effect here.
    On one hand the mechanism and on the other the virtual controller.
     
    Your code is RobotStudio SDK code and looks only at the mechanism, ie the representation of the physical part. So changing the values there does not update the limitations for the controller. Rather it would be the same as having physical restrains on the manipulator arm.
    So instead what you need to do is use the PC SDK - ABB.Robotics.Controllers.ConfigurationDomain. to change the configuration domain of the controller system. ie what is in the MOC file etc.
     
    But before that you need to use the PC SDK to scan, connect and logon to the controller system.
    To do that you need to go through the basics of PC SDK programming.
     
    That is what they are doing inside RobotStudio when you change the contoller parameters, both online versus real controllers and offline versus virtual controllers.
     
    You might also be interested in this related topic: