LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Palletization Function

Solved!
Go to solution

Hi All,

 

i would like to recreate what is known as palletizing.  This is essentially the ability to create a 2d array of points in 3d space given 3-4 points in 3d space as well as inputs for the array size. In the image attached P1-P4 are the 4 corners of the pallet area in 3d space, they are used to create a plane that has an array of points on it.


Does labview have anything like this built in or does anyone have any advice for this? 



-Matt
0 Kudos
Message 1 of 9
(4,570 Views)

Nothing built into LabVIEW that I know of.  That is a very specialized request, but also one that doesn't seem complicated to make with some basic programming and basic math.

 

First question I have is how good are your data points?  How closely do P1 -P4 represent a rectangle?  If they don't, do you need to force them to be rectangles or do you just fit the grid  to what you have?

 

Get past that, the rest is just math.  Distance from P1 to P2.  P1 to P3.

 

Look at 2D interpolation.  You basically need to interpolate between the points in the X direction and the Y direction to get the centers of the grids.

0 Kudos
Message 2 of 9
(4,563 Views)

Im rebuilding the function in labview because that function is left out of their labview library.  In almost all cases i dont foresee anything but i rectangle and i was planning to force it to that.  I was hoping someone might have done something like this before ha Smiley Very Happy

It is a plane in 3d space, so wouldnt that be 3d interplation? Most of the these planes are never planner with the base coordinate system.



-Matt
0 Kudos
Message 3 of 9
(4,558 Views)

Whose LabVIEW library are you talking about?

 

Yes I guess it would be come a 3D interpolation if the Z coordinate is not the same.  You could possibly do a transformation of coordinates to rotate the plane and locate it at z=0.  The rotate back when you are done.  But there are probably algorithms out there for 3D interpolation as well.  You might only have to google it to find some.

 

The problem you are trying to solve reminds me of one that is common in finite element analysis.  You have stress values at 4 points at various coordinates.  Those values need to be interpolated so that a color graphic can be shown across the plane of that element.  Basically, you weight the stress value of each point based on the percentage of the distance it is towards each point.  You are trying to do something similar, but you don't need to interpolate the stress value.  You just need to interpolate the coordinates at specific steps.

 

 

Message 4 of 9
(4,550 Views)
Solution
Accepted by Wolleee

Three points (not all on the same line or coincident) determine a plane.  Once you "know" the plane (which generally means that you have a set of constraints that, say, determine Z if you are given X and Y, or Y given X and Z, etc.), it is fairly easy to generate an array of points that lie on the plane.  Again, you need to decide how you want them organized (for example, you could make a lattice of points in the X, Y plane and use that to compute the Z values, or "stand at the origin and fire a bullet" that intersects the plane at some "random" point (you'd need to be "facing" the plane, of course).

 

Bob Schor

Message 5 of 9
(4,548 Views)

Raven,

Im using Denso Robotics bCAP libarary.  The function exists on their controller, but bCAP has no access to that one i guess.  I checked with their support. I googled it and found a few things, but not sure its what im looking for exactly. I like the idea of rotating the array back and fourth t do the calculation.  I do know what youre talking about when it comes to FEA though, I am ME by degree so i saw plenty of that in school HA.

 

Bob,

I am planning to do a simple lattice structure, like the image shows.  I can create the plane and give it an origin, but the 3d interpolation is getting me a bit.

 

Here is the 3d interpolation i found on line.



-Matt
0 Kudos
Message 6 of 9
(4,542 Views)
Solution
Accepted by Wolleee

I think I would define P1 to P2 as a 3D vector.  And P1 to P3 as a 3D vector.  Get the lengths of both of them.

 

Now decide how many boxes fill each direction.  If P1 to P2 is 3.  Subtract 1.  If P1 to P3 if 10, subtract 1.  Now you have 2 and 9.  Create a For loop inside a for loop going from 0 to 2 divided by 2.  And 0 to 9 divided by.  Now in the inner most For Loop you can take the two vectors, multiply by the respective fraction of their length, and add them to each other.  Build them into arrays and you should have the coordinates of all 3 x 10 locations.

 

This goes back to assuming P1 P2 P3 P4 all define the coordinates of a rectangle.  If it was some trapezoidal shape or other irregular shape, then the math would probably get more complicated because the "Y" vector would either grow or shrink, or possibly no longer be perpendicular to the "X" vector as you proceed along the base of the trapezoid.  If this was an FEA problem, that would be very likely.  For palletizing rectangular boxes in a rectangular array, I doubt you'd have to wrorry about that.

Message 7 of 9
(4,508 Views)

I think your approach is very close to what i need, but this array im building is somewhere in 3d space relative to a known base coordinate system.  I think what i might do is take your approach, set my p1 as my origin for this array and then rotate that array around the origin using ueler angles  so that it is coplanner with the new plane. I know their build in function has the capability to pallatize trapezoids, but i have no use for that.



-Matt
0 Kudos
Message 8 of 9
(4,462 Views)

Hi raven,

 

I found a simple solution to this, similar to what you were suggesting. I attached an image of the calculation, though it is slightly messy to follow.

 

Thanks for all the help.



-Matt
0 Kudos
Message 9 of 9
(4,367 Views)