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.
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”);