Array using robtarget

jakobfranzzon
Sweden ✭
Hello! Been stuck with doing an array with 6 different robtargets. It is possible to do it this way:
PERS num nPartCount := 0;
PERS num nPartCount := 0;
PERS robtarget LeavePos{6} :=
[[[620,1200,-86.402252976],[0.001544941,-0.70381839,-0.710369702,-0.003489157],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],
[[220,1200,-86.402252976],[0.001544941,-0.70381839,-0.710369702,-0.003489157],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],
[[-220,1200,-86.402252976],[0.001544941,-0.70381839,-0.710369702,-0.003489157],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],
[[620,875,-86.402252976],[0.001544941,-0.70381839,-0.710369702,-0.003489157],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],
[[220,875,-86.402252976],[0.001544941,-0.70381839,-0.710369702,-0.003489157],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],
[[-220,875,-86.402252976],[0.001544941,-0.70381839,-0.710369702,-0.003489157],[-2,0,1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]]];
And in my main I would write something like this:
nPartCount := nPartcount+1;
LeavePos{nPartCount};
The last line is where I get the error message. I think it's an easy fix but I can't figure it out. Thanks in advance!
And in my main I would write something like this:
nPartCount := nPartcount+1;
LeavePos{nPartCount};
The last line is where I get the error message. I think it's an easy fix but I can't figure it out. Thanks in advance!
Tagged:
0
Comments
-
Sure, this works. Last line just needs a movement order.
MoveJ LeavePos{nPartCount},v100,z200,tool0;
1 -
Thanks! Didn't think about that at all. Very helpful!0
-
Please do not do this: nPartCount := nPartcount+1;. Simply written is expressed: Incr nPartCount;Lee Justice1
-
Didn't know you could do that, thanks. Will change it right away.0
-
Just a pet peeve of mine, Incr and Decr are mathematical instructions.
It will help make your code look smarter.
Lee Justice2
Categories
- 10.3K All Categories
- 5.2K RobotStudio
- 341 UpFeed
- 13 Tutorials
- 281 PowerPacs
- 404 RobotStudio S4
- 1.7K Developer Tools
- 236 ScreenMaker
- 2.6K Robot Controller
- 239 IRC5
- 31 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 663 RAPID Programming
- 14 Wizard Easy Programming
- 100 Collaborative Robots
- 3 Job listings