LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting amplitude of one spectral peak over time

Solved!
Go to solution

Hi,

    I am trying to create a VI where the DAQ continually aquires, plots and saves a waveform in millisecond timeframe (which is already done in this instance), then takes that waveform, finds a specific peak (most likely the first one), and plots the amplitude of that peak over time (30+ minutes, one point every scan that is obtained). Essentially, I have a very fast detector attached to a Gas Chromatograph, and I want to select a single ion and monitor the amplitude of that ion. I can plot the waveforms over time and do this in post processing, but what I would like to do is have the "slow" plot continuously update and display as it moves through time. Attached is the VI this will go into, using IMS Software V1.3.vi,  the subsection is the "GC Mode" it seems like I should be using the "peak detect.vi.", but I am unfamiliar with how this works, and so I do not know how to show a continuously updating graph or pull the amplitudes out and plot them. Thank you for your help,

<>< Eric

0 Kudos
Message 1 of 5
(2,804 Views)

Hi Eric,

 

I took a quick look at your code and I don't think it should be too difficult to implement what you want.  You can add a Waveform Chart on your front panel to display the peaks over time.  In order to grab the data for the chart, you must feed the amplitudes output through three VIs: an Index Array, an Unbundle, and an Index Array.  Once you've done this, the output will be the amplitude of your first peak as a double.  You can wire this into the Waveform Chart.  The Waveform Chart will remember prior values as you step through the while loop.  Hopefully this solves your issue!  Thanks!

Stephen Meserve
National Instruments
Message 2 of 5
(2,774 Views)

Hi,

    I tried wiring it as you suggested, and it gave me no signal. By changing where it was wired, as seen in the new version I have attached, i get an amplitude over time plot, but it does not appear until after all of the iterations have stopped. In addition, it is not picking up the amplitude of the signal I am inputting. Currently using a SCB-68 series connection box attached to a PCI-MIO-16XE-10 NI card, and I attach the pulse output to the analogue input (just a quick way to get a signal when i dont have the actual instrument handy). With this, I should have a constant 5 V amplitude in the first peak, but I get nothing. Also, would there be any way to choose which peak to monitor, I would like to this be a user control. Thanks,

<>< Eric

0 Kudos
Message 3 of 5
(2,763 Views)

Here is the VI - use IMS Software V1.4.

<>< Eric

0 Kudos
Message 4 of 5
(2,762 Views)
Solution
Accepted by topic author Eric-APU

Eric-WSU wrote:

i get an amplitude over time plot, but it does not appear until after all of the iterations have stopped


I have not looked at your VI (because I am in a previous version of LabVIEW), but this is probably because your graph is outside of the loop.

Here is how you can get a graph of the peaks (all of the peaks, per iteration):

Or if you only wanted a certain peak (and how that peak changes over many iterations):

Message Edited by Cory K on 01-21-2009 05:51 PM
Cory K
Download All
Message 5 of 5
(2,750 Views)