Change tool data
Hi, so I'm doing a project at school, and I want to change the tool data (only the X-value) by a value that is the difference between two robot targets.
One of the targets is fixed, the other one will change, depending on the length of my tool. I want to use SearchL to get the second/variable target. I want to calculate the difference in X fore the two targets, and adjust the tooldata by this walue.
Anybody who got some pointers or good tips for a noob?
One of the targets is fixed, the other one will change, depending on the length of my tool. I want to use SearchL to get the second/variable target. I want to calculate the difference in X fore the two targets, and adjust the tooldata by this walue.
Anybody who got some pointers or good tips for a noob?
0
Comments
-
Hi SolidFloyd,the easy way to calculate the distance between two points is with the distance function. Distance is used to
calculate the distance between two points in the space, in all three directions!second option is to calculate only the X differentiation.! Example first optionVar robtaget pfixpos := [....] ;Var robtarget pfoundpos :=[......];Var toodata tTool := [....] ;Var num nDistance :=0;! calculate distancenDistance := Distance(pfixpos.pos,pfoundpos.pos);! Add distance to X value of toolframe;tTool.tframe.x := tTool.tframe.x + nDistance;! Example second optionVar robtaget pfixpos := [....] ;Var robtarget pfoundpos :=[......];Var toodata tTool := [....] ;Var num nDistance :=0;! calculate distancenDistance := pfixpos.pos.x - pfoundpos.pos.x;! Add distance to X value of toolframe;tTool.tframe.x := tTool.tframe.x + nDistance;0 -
Sweet, tnx...
Just had to add .trans and I got it working
0 -
how would this work if I want to change the orientation of the tool ?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