How to control the axes of mechanical units with SDK?
Hello everyone, I am trying to control a mechanical unit, like a robot, via an add-in. I tried the following code, but without success. The code works fine, but I cannot use the
SetJointValues
function to move the axes of my mechanical units. Does anyone have an example or any ideas, please? Station station = Station.ActiveStation;
List<ProjectObject> objets = new List<ProjectObject>(station.GetGraphicComponents());
foreach (ProjectObject objet in objets)
{
if (objet is Mechanism mecha1)
{
Logger.AddMessage("Flag 0");
double[] jointValues = new double[] { 30.00, 30.00, 30.00, 30.00 };
Logger.AddMessage(mecha1.Name);
Logger.AddMessage(mecha1.NumActiveJoints.ToString());
Logger.AddMessage("Flag 1");
mecha1.SetJointValues(jointValues, false);
Logger.AddMessage("Flag 2");
}
}
0
Answers
-
Request for the mastership before setting the values?0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 339 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 832 RAPID Programming
- 14 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings