[PC SDK] Writing RobTarget in Controller doesn't work as expected
HM
✭
Hi,
I´m developing an add-in which copies a robtarget to the controller and moves the robot to it. In depth, the program calculates some robtargets in simulation, the reachability is checked and, if the target is reachable, the robtarget is copied to the controller and the robot moves to it.
I have some problems with the execution. First problem, once the controller's robtarget is overwritten with the new value and the execution is played, the robot starts moving, but it moves near to the origin. I think that the problem is on units: simulation works with meters and controller is waiting milimeters, am I right?
Assuming this is true, I transform the translation units in milimeters, and run the program again. Then the robot doesn't move, and I can't imagine what is happening now. Fist I thought that the position is not reachable but this is checked as true in simulation.
I followed this discussion: http://forums.robotstudio.com/discussion/comment/23026#Comment_23026 and the PC SDK manual so I assume that the robtarget is correctly written (in fact the new value is written in the controller's robtarget).
Any ideas are welcome.
HM
if (rd.Value is ABB.Robotics.Controllers.RapidDomain.RobTarget) {
ABB.Robotics.Controllers.RapidDomain.RobTarget probTarget = (ABB.Robotics.Controllers.RapidDomain.RobTarget)rd.Value;
string newValue = GetString(rs);
probTarget.FillFromString2(newValue);
rd.Value = probTarget;
}
private System.String GetString(RsRobTarget rs) {
ExternalAxisValues v = rs.GetExternalAxes(true);
return System.String.Format("[[{0}, {1}, {2}], [{3}, {4}, {5}, {6}], [{7}, {8}, {9}, {10}], [{11}, {12}, {13}, {14}, {15}, {16}]]",
rs.Frame.Translation.x, rs.Frame.Translation.y, rs.Frame.Translation.z,
rs.Frame.GlobalMatrix.Quaternion.q1, rs.Frame.GlobalMatrix.Quaternion.q2, rs.Frame.GlobalMatrix.Quaternion.q3, rs.Frame.GlobalMatrix.Quaternion.q4,
rs.ConfigurationData.Cf1, rs.ConfigurationData.Cf4, rs.ConfigurationData.Cf6, rs.ConfigurationData.Cfx,
v.Eax_a, v.Eax_b, v.Eax_c, v.Eax_d, v.Eax_e, v.Eax_f);
}
0
Comments
-
Hi, I can confirm that the RobotStudio API is using SI units, so this one rs.Frame.GlobalMatrix is in meters, and the robtarget type in RAPID expects mm in xyz.
Have a look here:
http://developercenter.robotstudio.com/BlobProxy/manuals/RapidIFDTechRefManual/doc481.html
Maybe you can simply trace a few of the robtarget values to a text file and manually create robtargets in a small RAPID module. Then you can isolate whatever is going on in the application from the RAPID it creates.
0
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)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings