Recording total operating time

Hello everyone!

I would like to ask if it is possible to have the Statistics behavior, record the total operating time of a specific component?

So far I have seen only “TotalStateTime”, “PartsTotalTime” and “TotalBusyPercentage” that would make sense in assisting me to calculate the total operating time of a component. However, I am unsure how to activate it.

For example, currently I have fitted a Generic Robot from Visual Components, which transports a box from start to end, and in the Statistics panel, I see “TotalBusyPercentage”, however it is remained at 0 throughout the simulation. “TotalStateTime” calculates the Simulation time however and “PartsTotalTime” calculates only the time the part is in contact with the robot, and not when the robot is in operation.

What I am looking for is to calculate the time the robot is at work, i.e moving to pick up part, place part, heading back to rest position.

Do I require to use a python script instead? If so, could someone give me a example/source code on how you created a python timer loop in Visual Components.

Thank you very much
Then

Hello @Thenolypus,

Maybe the easiest solution would be to utilize the ready-made cycle time calculator component. It’s in the statistics folder of eCatalog, and you can start and stop the timer with signals.
example_timer.vcmx (540.3 KB)

If you want to use statistics and are using Process Modeling or Works, you should use the statistics of the robot controller, instead of the robot itself.

-Este

2 Likes