01-10-2018 02:23 PM
Hello I am new to Lab View and I'm trying to figure out how to get a controlled time loop to work with a spectrum. I want to make it so that it will record the spectrum for a specific amount of time and I am not sure how to get the time loop to work with it. I'm going to attach what I have so far, any help will be appreciated.
01-10-2018 05:50 PM
There is no timed loop in the VI you have attached. Did you forget to attach the subVIs? Are you talking about a plain loop with timing?
I think all you need is a single loop and a state machine architecture. What's the point of the loop at the bottom? Seems to call the same functions in parallel.
01-11-2018 12:42 PM
Oh sorry, I did not realize that I needed to attach the sub Vi. I am not sure where the loop with timing would fit into the vi i have at the moment and I am not sure if that is what I'm looking for either. My goal is to be able to get the spectrum to run for a specific amount of time and save the data from that time interval.
01-11-2018 04:01 PM
a *.lvproj file does not contain any code, it just points to files on your HD
Just put the toplevel VI and all required subVIs in a folder and zip it up. Then attach the zip archive.
01-11-2018 04:36 PM
record the spectrum for a specific amount of time
What you are referring to here is an "Integration Time". A timed loop has nothing to do with this.
Lets talk hardware. How are you measuring a spectrum? Monochromator and detector? Off-the-shelf spectrometer?
What are the communication protocols? TCP/IP? RS-232?
01-12-2018 11:20 AM
I am using an ocean optics flame miniature spectrometer
01-12-2018 12:05 PM
We still haven't seen the subVIs. What do they do?
01-12-2018 12:10 PM
there were 3 subVi that I could not find a way to copy into a new folder. sorry I am really new to this
01-12-2018 12:12 PM
The ocean optics flame spectrometer communicates via RS232 or USB and has a configurable integration time. This doesn't sound like a LabVIEW problem. You just need to control your spectrometer.
Ask Ocean Optics for a set of LabVIEW drivers (they make them for most of their products). After that, it's a simple matter of configuring your data collection settings.
NOW... if you want to collect data longer than the allowable integration time, you simply need to acquire multiple spectra and add them together.
01-12-2018 12:18 PM
I know how to configure the integration time but i don't know how do get the program to record the data of the spectrum for a specified time, then stop and save it to a file