How to measure the Motion Time inVB/ API?
Hi, I got a question. How we can measure Motion Time or Cycle Time in RobotStudio API? I tried to use "events" of "simulation" to measure the time at start of stop of simualtion. but I couldn't use these events (how should these events be written in VB/API?) and I wonder if you know...
Best regards
Comments
-
Something like this should solve it...
The way to get events in VBA is to declare an object "WithEvents", then you will find these events (procedures) in the drop-down list above the code window. In the code below we have declared sim WithEvets, thereafter we select the "Stop" procedure and added the code needed. Before you start the simulation, run the Init method from "ToolMacroMacros..." and browse to your Init method. After the simulation stops the motion time will be logged in a new log called "MotionTime"
Dim WithEvents sim As Simulation
Dim ctrl As ABBS4ControllerSub Init()
Set sim = ActiveStation.Simulations(1)
Set ctrl = ActiveStation.ActiveMechanism.Controller
End SubPrivate Sub sim_Stop()
Call ActiveStation.PrintLog("MotionTime", ctrl.MotionTime)
End Submagu0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings