Is it possible to copy Rapid Move Instructions between Modules using PC SDK ?
I would like to extract Move Instructions (alone) from one module and write it to other module ?
Is there any possiblity to do this using PC SDK ?
I could not find any in Rapid Domain.
Thanks in advance.
Is there any possiblity to do this using PC SDK ?
I could not find any in Rapid Domain.
Thanks in advance.
Tagged:
0
Answers
-
vikram6892 said:I would like to extract Move Instructions (alone) from one module and write it to other module ?
Is there any possiblity to do this using PC SDK ?
I could not find any in Rapid Domain.
Thanks in advance.private void button1_Click(object sender, EventArgs e) { Station station = Project.ActiveProject as Station; List<SyncLogMessage> SyncLog = new List<SyncLogMessage>(); // Create a station controller object RsIrc5Controller rsIrc5Controller = new RsIrc5Controller(@"C:\Users\your.username\Documents\RobotStudio\Systems\TargetSystem"); // You can use this to automate the sync from RAPID to station... Not sure whats passed in the dataId string? I guess data name! // Assumption is that task index 1 is your rapid motion task! rsIrc5Controller.Tasks[1].SyncData("YourData", SyncDirection.ToStation, SyncLog); // Gets all objects in your station.... Remember to sync from RAPID to station! ProjectObject[] _projectObject = station.GetAllObjects(); // Indexs through all objects for (int i = 0; i < _projectObject.Length; i++) { // If object is a robtarget copy and add to target controller if (_projectObject.GetType().Name == "RsTarget") { // Cast project object to RsTarget RsTarget _newTarget = (RsTarget)_projectObject[i]; // Assumption is that task index 1 is your rapid motion task! rsIrc5Controller.Tasks[1].Targets.Add(_newTarget); // Sync back to controller rsIrc5Controller.Tasks[1].SyncData(_newTarget.UniqueId, SyncDirection.ToController, SyncLog); } } }
0 -
Hello @scottMHAI already did it. By the way thank you very much for your code snippet.1
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