LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array of Objects and Array indexing

Hello,

I was hoping I can possibly get some assistance with this task. 

What I'm trying to achieve is such:

- Export an array objects (as seen attempted in the GetPosition Block diagram image). Essentially, the output array in the front panel of GetPosition (as attached) is being fed a two dimensional array (up to 2900 columns) (6 values, first 3 are position and second 3 are rotations) and I'm trying to export the same array in object form which I then can feed into a secondary loop where I can use an array index or array subset block that would run the robot to the the commanded positions as the array indexes throughout its motion path in the block diagram 'MovePosition'. 

 

I'm not sure if I'm approaching the situation correctly as per the images so any guidance would be much appreciated. 

What I've been getting so far is that the robot goes to the very first initial position in the array but never goes through the remaining 2899 commanded positions). I'm not sure if its even a possibility of having an array of objects that increment the same way just an typical 2D double array would.

 

also note: this process works if I were to replace the array of objects to a 2D double array so I know that the algorithm is somewhat sound but the process of implementation is just faulty. 

 

Thanks in advance for your help!

0 Kudos
Message 1 of 4
(593 Views)

You don't feed the hexapod an array of objects, you feed one object that is an array. Does it match with what's expected in input PositionTuple?

0 Kudos
Message 2 of 4
(548 Views)

Thank you for your reply.

I previously attempted to feed the hexapod one object file like you recommended though, it seems to only take the hexapod to its first commanded position and does not have it run through the remaining position columns as per the text file imported. 

 

The reason I attempted to feed it an array because the way I plan on running my code is as such:

I have the hexapod moving in parallel with some additional actuators. The text file I initially upload has all the commanded positions of the individual actuators and the hexapod separately. Once I upload the motion text file path, I then click one ‘Move to Start’ button that takes all the actuators and hexapod to the first commanded position only. After that, I then click a second

‘Move’ button which is supposed to feed the remaining motion path data points moving all actuators throughout their entire path including the hexapod. The way it works is that I just have an array subset that indexes each position. Now, the reason I was attempting to feed an array of objects is because the hexapod seems to successfully move to its initial position when commanded to but then doesn’t respond to the second move button command (even though the other actuators do). That’s why i figured it was some sort of error on my coding end where the hexapod thinks it’s only being fed on column of positions instead of an array.

 

Hopefully I explained this well enough. Happy to discuss it further if need be.

 

Thanks again!

0 Kudos
Message 3 of 4
(508 Views)

Hello mhaddara,

 

We cannot debug the images, if you can share the code please do share instead of images.

 it is difficult for us to understand different images and then to link with your issue.

 

If you can share the code it will be very easy to suggest you the proper solution and your problem seems to handling of array/loop which will be very easy for LabVIEW folks in the forum to support you.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 4
(476 Views)