ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing Data in a State Machine

Solved!
Go to solution

Hello,

 

I am building a fluorescense measurement optical setup, and plan to control it using LabView.
I need to scan a range of wavelengths, and for each one aquire a measurement. I have come to realise the best way to do this is with a state machine, that will iterate two states (first Set Wavelength, second Aquire) until the final wavelength is reached.

 

I would like to plot the wavelength vs. aquired data (X vs Y, two arrays I guess) as the scan is performed.

And after many iterations, when the scan has ended, I want to save the entire data to file (say, as two columns, one of Wavelength, the second Aquired Data).

 

Therefore, for each iteration of the scan, I need to store the current wavelength and its corresponding measurement. This information will also need to pass between the states, as I want the plot to be real-time (as the scan progresses).

 

As a LabView novice, I am unsure what is the best way to do this (shift registers? AE? queues?), and would appreciate any assitance.

 

Thanks!

0 Kudos
Message 1 of 3
(3,413 Views)
Solution
Accepted by topic author cl0ck

Shift registers is the easiest and suggested way.

Just be a little bit careful so you wire it through all states, else you'll ditch the data halfway.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 3
(3,399 Views)

Shift register is the most natural choice for what you describe. The best thing is to pre-allocate all memory you need (you do know the length of scanning, don't you?) and the replace the appropriate package for each scan intervall.

This is what i recommend you to do.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 3
(3,397 Views)