Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How would I write a code to scan an intensity graph for information?

Hi LabView comunity,

 

I am new to LabView and I need a little help to come up with a code that communicates with an Aerotech motion controller.

1. Talk to controller

2. Start moving to target position. 

3. Use a camera to mesure intensity of light.

 

I CAN DO THE FIRST THREE STEP BUT AM STUCK ON THE NEXT STEPS. 

 

4. Use data from position and intensity to create an XY graph that has intensity as a function of position. (One way I though of doing this is to store all the values of position into an array and get values of intensity as well into an array. Then input these two arrays into an XY graph)

 

5. Scan the intensity graph from camera. I need to define a range around target position, choose a number of divisions of the range. Then scan the stage to position 1, store the data and repeat for every position. Then I want to store all data points into an array and use labview max function. 

 

Sorry for being wordy or if am not clear. I have put a sample of what am doing in part 4 to guide you. 

0 Kudos
Message 1 of 4
(4,251 Views)

Your example is probably not sufficient without seeing some data and the missing subVIs.

 

(Also, please use "unbundle by name" instead of these unbundle monsters (see picture)!)

 

 

0 Kudos
Message 2 of 4
(4,241 Views)

Here is the main program where I am supposed to do all the steps. 

The first attachment (Delay_Stage_Control) is the main VI with the movement SUBVIs (those work), and intensity tracker (that works too) 

The seconde attachment is the camera that tracks the intensity

The last/third attachment is my attempt at Part 4/5 from earlier post

 

 

0 Kudos
Message 3 of 4
(4,216 Views)

Hi there, 

 

I recommend you that follow altenbach's recomendation, also for step 4 I think is the best way to plot your data, using XY graph.

 

For doing the arrays you can either a foor loop or a while loop, depend on how you acquire the data.

 

Regards

0 Kudos
Message 4 of 4
(4,123 Views)