Stopwatch "Average Time" API code: RobotStudio add-in
seuv
✭
Hi there,
I am working on a RobotStudio add-in as a part of my thesis project. It involves simulating a given path by some other software and calculating the time taken by the robot to follow the path. This calculated time shall be sent back to the other software. I managed to generate the path given by the other software, simulate it and make a stopwatch that calculates the correct time that I need using C# API codes. (Visual Studio)
The thing is I can see the value that I need when launching the functions I created. I now need to save the "Total Time" or "Average Time" of the stopwatch in a variable inside my add-in to be able to send it to some other software.
So basically I constructed a SimulationStopwatch called stopwatch, configured it how I want it to be and I need something like double time = stopwatch.GetTotalTime(); to store this value when the simulation is finished. (I will read this value when a simulation stopped event is triggered)
Does anyone know the API code to call/get this variable ("Total Time" or "Average Time")?
Seppe
I am working on a RobotStudio add-in as a part of my thesis project. It involves simulating a given path by some other software and calculating the time taken by the robot to follow the path. This calculated time shall be sent back to the other software. I managed to generate the path given by the other software, simulate it and make a stopwatch that calculates the correct time that I need using C# API codes. (Visual Studio)
The thing is I can see the value that I need when launching the functions I created. I now need to save the "Total Time" or "Average Time" of the stopwatch in a variable inside my add-in to be able to send it to some other software.
So basically I constructed a SimulationStopwatch called stopwatch, configured it how I want it to be and I need something like double time = stopwatch.GetTotalTime(); to store this value when the simulation is finished. (I will read this value when a simulation stopped event is triggered)
Does anyone know the API code to call/get this variable ("Total Time" or "Average Time")?
(Other solutions to calculate the time of a path are well appreciated too)
Thank you in advance,
Thank you in advance,
Seppe
0
Comments
-
Hi there,
I have the very same problem, but I didn't get as far as you did. Can you explain how to set up a stoppwatch from the api?
As far as I understand, one can instantiate the class SimulationConfiguration and then add a SimulationStopwatch to the collection. But How do I parametrize the stopwatch trigger?
Beside the stopwatch I would like to measure other data from the signal analyzer. Can someone provide any help?
Best regards0 -
Hi,
I take over the project from seuv (Seppe). You can see the SimulationStoppwatch code in the txt.file below. I hope it will help you.But I don't find a solution to call/get the variable ("Total Time" or "Average Time") yet.
Have anybody an idea or example for an API code to get this time?
Best regards
Thore
0 -
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings