Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
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
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 364 IRC5
- 82 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 854 RAPID Programming
- 37 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings
