LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with data aquisition from a 2D Raster Scanner

Hi, total LabVIEW noob here

I need help with a program. The idea is to do a 2D raster scan of a sample and measure the light spectrum in each coordinate with a Thorlabs CCS100 Spectrometer. The light beam is moved with a pair of galvo mirrors. I copied programs that I saw in this forum and managed to make the beam move in the intended way, however I don't know how to make the spectrometer to measure and save the data along with the coordinates.
The guy I'm working with gave me a sample program, apparently from a Thorlabs library, and told me to use it.

Sample Program: 

Thundr_0-1745957761431.png

Thing I tried:

Thundr_1-1745957786747.png

 

 

 

Download All
0 Kudos
Message 1 of 3
(672 Views)

Hi Thundr,

 


@Thundr wrote:

Thing I tried:

Thundr_1-1745957786747.png


As a noob you need to learn to "THINK DATAFLOW!"…

 

Right now there is a data dependency between the FOR loop used to follow the Ramp arrays and the sequence handling the DAQmx functions!

Those DAQmx functions will only execute AFTER the FOR loop has finished…

When you want to measure while the scanning is done then you need to implement your algorithm in this very way. I recommend to build up a simple state machine where you implement the states of "init", "set position", "get DAQ data", and "finish". The "set position" and "get DAQ data" will be called for each position you want to measure…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(628 Views)

I'm not sure if I understood your answer, sorry haha. I tried to build the state machine using the Thorlabs VIs, but it wouldn't run, so I put the raster code into the sample VI like in the images. My goal was to modify the single scan case into the scanner that I wanted. But I think it just scans in a single point of the raster instead of every one. Honestly I'm stuck, is there any tutorial that you recommend? 

Screenshot from 2025-05-30 15-31-54.png

singlescan.png

Status.png

GetScanData.png

Clear.png

     

0 Kudos
Message 3 of 3
(495 Views)