Create new wobjdata
Laro88
✭
in RobotStudio
I need to create a new wobjdata with an offset and a rotiation. Is there any convenient way to do this in Rapid?
Basically I have a wobjdata (wobjC ) coming from a calibration session, that I need to create a new wobjdata from ( to make the program simpler to understand) I need to move the wobjC a bit in the X and Y direction and rotate it 180 degrees around Z.
Is there any convenient way to do this?
Basically I have a wobjdata (wobjC ) coming from a calibration session, that I need to create a new wobjdata from ( to make the program simpler to understand) I need to move the wobjC a bit in the X and Y direction and rotate it 180 degrees around Z.
Is there any convenient way to do this?
0
Comments
-
copy the wobjdata you have.Use the copied wobjdatamodify the components of the copied wobjdata.and execute your commands or instructions as per the edited "copied wobjdata".Lingaa0
-
This works fine in RobotStudio, however I needed to do so in generated RAPID code:
Please note that this just copies a a wobjdata and modifies the oframe stuff. Ideally I would like to compute a "fresh" wobjdata as the sum of the old wobjdata and the oframe stuff. However this requires a proper 3D Vector Api ( I will use Microsofts Media3D namespace to do this at some point in time )
However, In C# the construction of a new wobjdata looks like this.
//Create tobjdata variable for the rap polishing program
RapidData rd_woCalibLathe = controller.Rapid.GetRapidData("T_ROB1","MSystemVars","woCalibLathe");
WobjData woCalibLathe = (WobjData)rd_woCalibLathe.Value;
//System.Windows.Media.Media3D.Vector3D v3d = new System.Windows.Media.Media3D.Vector3D(woCalibLathe.Uframe.Trans.X
WobjRapProgram = woCalibLathe;
WobjRapProgram.Oframe.Trans.Z = (float)DistToLathe;
Orient o = new Orient();
o.Q1=0.5;
o.Q2=0.5;
o.Q3=0.5;
o.Q4=-0.5;
WobjRapProgram.Oframe.Rot = o;
this.WriteToModule("PERS wobjdata wobjRapProgram:="+WobjRapProgram.ToString()+";");
0 -
Hi,Perhaps the posting inmay provide some inspiration.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