Addressing a single value in an array
in RobotStudio
Hello all,
I'm trying to retrieve each individual joint angle from a jointtarget data, which is off the form:
jpos:=[[-10, 80,-30, 20, 0, 0] , [9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
How do I address these values to a variable? For instance I want to assign each of the joint angle data to different variables like;
q1=-10;
q2=80;
q3=-30;
q4=20;
q5=0;
q6=0.
Thank you,
Gianluigi
I'm trying to retrieve each individual joint angle from a jointtarget data, which is off the form:
jpos:=[[-10, 80,-30, 20, 0, 0] , [9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
How do I address these values to a variable? For instance I want to assign each of the joint angle data to different variables like;
q1=-10;
q2=80;
q3=-30;
q4=20;
q5=0;
q6=0.
Thank you,
Gianluigi
0
Comments
-
Hi Gianluigi,To retrieve the elements from the jointtarget is not hard at all.We know the structure of a jointtarget is of the form;< dataobject of jointtarget >< robax of robjoint ><rax_1 of num ><rax_2 of num ><rax_3 of num ><rax_4 of num ><rax_5 of num ><rax_6 of num >< extax of extjoint >< eax_a of num >< eax_b of num >< eax_c of num >< eax_d of num >< eax_e of num >< eax_f of num >Thus, to get the angles of robot axes from jPosCurrent...PERS jointtarget jPosCurrent;PERS num J1;PERS num J2;PERS num J3;PERS num J4;PERS num J5;PERS num J6;J1:=jPosCurrent.robax.rax_1;J2:=jPosCurrent.robax.rax_2;J3:=jPosCurrent.robax.rax_3;J4:=jPosCurrent.robax.rax_4;J5:=jPosCurrent.robax.rax_5;J6:=jPosCurrent.robax.rax_6;Regards,BigM0
-
I remark.If you use PERS remember to initilise value in declerationPERS Num PERSNume := Value;BR KlausBest Regards
Klaus Soenderhegn
www.cadalysator.dk0 -
Well, it was like rocket science to me :P
Thank you so much BigM and Klaus!
gianluigi2009-05-13 17:06:440
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings