Sync to station using API
neil
✭
in RobotStudio
I have an automatically generated RAPID file, which I need to test for collisions using RobotStudio. I can load and run the program file on the virtual controller using the RAB API. The problem is that the program runs on the virtual controller in real time - because I have many RAPID files to test, running in real time significantly increases simulation time of my application.
For this reason I would like to synchronize to the station and run the simulation in RS.
The way I was going to try this is as follows:
Thanks for the help,
Neil
For this reason I would like to synchronize to the station and run the simulation in RS.
The way I was going to try this is as follows:
- read RAPID file (StreamReader)
- extract jointtarget values/names and path name from file
- create RSJointTargets and MoveAbsJ objects, with extracted values/names
- Add objects to Station.ActiveTask
- Call Start() method in Simulator class
Thanks for the help,
Neil
0
Comments
-
None of the methods in the ABB.Robotics.RobotStudio.Stations.Simulator class are available (start, stop, pause etc.) after creating an instance. When I try to build, I get the error:
"The type 'ABB.Robotics.RobotStudio.Stations.Simulator' has no constructors defined"
Is this class available?
Are there any methods within the RS API to synchronize to station?
Are there any methods within the RS API to play the simulation in RS (not Robotics.Controllers.RapidDomain.Task.Start())?
Thanks again,
Neil
neil2008-8-27 13:1:170 -
Hi Neil,
The virtual controller is the core technology that is driving the simulation in RobotStudio. Running the simulation from RobotStudio will not be faster than running the virtual controller outside RobotStudio. There may be a minor difference in execution time if you use the "Free Run" mode of RS, but only marginally.
Henrik Berlin
ABB0 -
The Simulator methods are static, so you just call them like this:
Simulator.Start();
Johannes Weiman
Software Engineer
ABB Robotics0 -
Hi Henrik and Johannes,
The static Simulator.Start() method works as you said.
I've also tried 2 different ways of running the robot program in RS:- RS API:
2. RAB API
Task[] tasks = null;
//controller object created from Scan() method
tasks = controller.Rapid.GetTasks();
using (Mastership m = Mastership.Request(controller.Rapid))
{
tasks[0].ResetProgramPointer();
tasks[0].Start(RegainMode.Continue, ExecutionMode.Continuous, ExecutionCycle.Once);
}
1. The program is executed much faster than real time (total execution time is approximately 2s)
2. The program appears to execute in real time (total execution time is approximately 12s)
Both methods are running the same RAPID program on the same virtual controller, but the Simulator.Start() will significantly decrease the execution time of my application.
Thanks for the help!
Neil
0 -
Hi Neil,
Thank you for the input. I am surprised to find such a big difference, that pleases me.
Henrik Berlin
ABB0
Categories
- All Categories
- 5.5K RobotStudio
- 396 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)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings