Array using robtarget
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 Justice2
-
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
-
Hello,
In a similar way, I am using a dynamic assigment to the robot targets in a loop like herebelow:
FOR i FROM 1 to n
MoveJ LeavePos{i}, v100, z200, tool0;
ENDFOR
And I am wondering if the execution of this code will result in the same trajectory as:
MoveJ LeavePos{1}, v100, z200, tool0
MoveJ LeavePos{2}, v100, z200, tool0
MoveJ LeavePos{3}, v100, z200, tool0
MoveJ LeavePos{4}, v100, z200, tool0
...
MoveJ LeavePo{n}, v100, z200, tool0
in terms of controller internal path planning. Will it ?
As far as I understood, the robot reads one line of movement ahead to generate a smooth trajectory (depending on the zone size) but in the case of the loop, it kind of can't read in advance, can it ?
Will the resulting trajectory be less smooth in comparison to the MoveJ sequence ?
Or is there absolutely no difference, and the robot directly interpretates the next freshly built moveJ ? @lemster68
Thank you very much in advance
0 -
It will work just fine. As a matter of fact, some of our programs do pretty much the same thing as in your FOR loop.Lee Justice0
-
Thank you for your quick reply !
Good to know that ABB does kind of the same thing.
And also, what if another instruction is added within the FOR loop like:
FOR i FROM 1 to n
One motionless instruction;
MoveJ LeavePos{i}, v100, z200, tool0;
ENDFOR
Will the trajectory planner still remain unaffected either if the instruction is a priori not computationnaly intense ?
0 -
It will not be a problem. By the way, the motion planner reads ahead more than one move instruction.Lee Justice0
-
Thank you for the reactive support. Really appreciate0
-
Be advised that ANY non-motion instruction that causes a wait will break up the fluidity.Lee Justice0
-
Hi,
I would like to use a pretty large array of robtargets thereof values are written by a C# program thanks to REST API commands.
I initialized my array as: PERS robtagret TgtArray{200};
But I didn't work. I reduced the array size down to 31 and it worked. (32 and more didn't).
Is RAPID expert aware of such a limit? Is there a maximal amount specified somewhere ?
When I look into the virtual flexpendant system info -> software resources -> RAPID -> RAPID memory, I can see that the current free RAPID Memory = 31.78 MB and Total RAPID memory 39.02 MB.
Even with 200 robtargets, I feel like I am far below 31.78 MB of data...
0 -
I made one with 200 in RS and it had no errorsLee Justice0
-
Ok thanks good to know... I assume it was with IRC5, was it ?0
-
Yes, IRC5.Lee Justice0
-
Hi...See if this helps...Good work.
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)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings