Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
How to solve the problem of reading robot data and new time? For example, get the 6-axis Angle value
XiaoEr
✭
How to solve the problem of reading robot data and new time?
For example, get the 6-axis Angle value synchronously.
Timer control card
0
Comments
-
Hi XiaoEr
You want to log the axis values at a given pace.
I propose creating an RobotStudio add-in.
Here is a dirty function I've created to read the values on joint value change, I hope at least it's a start for you
Good luck!
/Oskarpublic static void ReadJoints() { if (recording) return; mech = Station.ActiveStation.ActiveTask.Mechanism; td.delta_t *= Simulator.SimulationSpeed; mech.GetJointLimits(out td.jointLowerLimits, out td.jointUpperLimits); td.axisTranslations = new double[mech.Children.Count()][]; foreach (var child2 in mech.Children) { var child = child2 as IMechanismLink; Matrix4 ct = child.CorrectionTransform; if (child2.Name.StartsWith("Link") && child2.Name.Length == 5){ //TODO: less crappy link identification int linkId = child2.Name.ElementAt(4) - 49; td.axisTranslations[linkId] = ct.Translation.ToArray(); } } double[] jValues = mech.GetJointValues(); String jValues_text = String.Join(" | ", jValues.Select(j => Math.Round(j,2).ToString())); Logger.AddMessage("rs-addin: " +jValues_text); mech.JointValuesChanged += JointValuesHandler; recording = true; } private static void JointValuesHandler(object sender, EventArgs e) { double[] jValues = mech.GetJointValues(); if(DateTime.Now.Subtract(LastTimeStamp) > TimeSpan.FromSeconds(td.delta_t)) { jointList.Push(jValues); LastTimeStamp = DateTime.Now; } }
0
Categories
- All Categories
- 5.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings
