04-29-2025 03:17 PM
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:
Thing I tried:
04-30-2025 02:17 AM
Hi Thundr,
@Thundr wrote:
Thing I tried:
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…
06-04-2025 03:55 PM
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?