Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
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.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings
