LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scanning Circumference Only

Hi all,

 

I'm currently attempting to design a scanning system based on an XY Gantry frame run by two servo motors. The system will scan/gather data from a round object to detect variances in the surface. It will then use this data to create a contour plot of the objects surface. The issue that I'm currently having is that I'm unsure of how to:

 

  1. Create a "back & forth" motion while staying within only the circumference in order greatly reduce scan time. (Example image attached)
  2. Organize the data in the correct order to be modeled.
  3. (Not essential) Display the area that has been scanned in real time.

 

I believe that I've found a VI to help design the third feature but I'm unsure about the scanning motion and haven't been able to find any examples. If anyone knows of any examples or could help me with where to start it would be greatly appreciated.

 

Thank you.

0 Kudos
Message 1 of 7
(855 Views)

It seems you want to scan the circular area, not the circumference? For any point in the plane, you can calculate if it is closer to the center than the radius and thus "inside". Do you have problems with the math or with programming?

 

What is the "correct order"? What is modeling? Do you scan in a rectangular grid?

 

Typically you would initialize a 2D array with sufficient size to have one element per scan location, keep it in a shift register, and replace elements corresponding to the current scan location with a reading as data is acquired.

 

0 Kudos
Message 2 of 7
(845 Views)

 


@altenbach wrote:

It seems you want to scan the circular area, not the circumference? For any point in the plane, you can calculate if it is closer to the center than the radius and thus "inside". Do you have problems with the math or with programming?


That's correct, I'd like to scan the area inside of the circle - I just meant that I don't want the scanner to venture outside of the circumference of the circle. My initial issue is with the programming of the 'back & forth' motion.

 


What is the "correct order"?


The correct order would be the data recreated in the same way it was scanned.

 


What is modeling? 

The modeling would be the contour plot that I'm trying to use the data to create (or possibly another kind of plot - the goal is to be able to visualize the height differentiation over the entire area).

 


Do you scan in a rectangular grid?

My previous iteration of the system used only one single servo motor and only created a line profile (consisting of height vs. time). So... Not currently. I do believe that will be required for this application.

 

 

 

0 Kudos
Message 3 of 7
(832 Views)

See if this can give you some ideas....

(Note that you can avoid a lot of trigonometry when using complex datatypes for the xy positions. The absolute value of the difference of two complex numbers is the distance in the complex plane)

 

altenbach_0-1648748354646.png

 

Message 4 of 7
(825 Views)

Of course it might be cleaner to generate the trajectory first, then just play it back in one loop.

 

(It would be easy to extend flexibility to include e.g. center shift, and non-square canvas, other shapes, etc. etc. Not shown 😄 )

 

altenbach_0-1648756413982.png

 

 

 

Message 5 of 7
(808 Views)

Thank you @altenbach! I was trying to figure out how to incorporate the two motors and the sensor into your original program before replying again, but this will definately save me some time! I really appreciate it!

0 Kudos
Message 6 of 7
(765 Views)

Ok, so I'm still a little stuck with how to incorporate dual motor motion into the initialize array funtion. I'm attempting to have four different settings:

  1. A single line scan down the center of a 6 inch circle. ('Profile')
  2. A scan of the area of a 6 inch circle.('Full')
  3. A single line scan down the center of an 8 inch circle.('Profile')
  4. A scan of the area of an 8 inch circle.('Full')

 

Previously, my program only conducted a single line scan down the center and, since there was no movement in the Y-direction, there was no need for an array. A single motor would move in a single direction. Now, I'm at a bit of a loss as to:

  1. How to move into the correct position to begin the process (I'll obviously have to sort out where exactly that position is once I get the physical unit here/assembled).
  2. How to differentiate between the four settings in terms of the intensity graph.

I realize that what I've bungled together is probably not the most eloquent or efficient design so any input would be greatly appreciated.

Download All
0 Kudos
Message 7 of 7
(719 Views)