LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize two waveforms with different time

Hi All,

     Thank you again in advance for you help on this. I am trying to create a setup where a spectrum is generated over time (millisecond time range, this function works properly), and a maximum for a peak that I select (this also works correctly) plots over time (minute time scale). However, when I try to run this, the fast plot is operating at about 40 Hz, and I have a calculation to allow a resolution feature for the minute time graph (the fast experiment is averaged a given number of times to produce a spectrum which is then analyzed for the maximum peak, so for example, at 40 Hz, and a resolution of 0.5 seconds, it should need to average 20 spectra for each point), but in operation, the time does not work correctly. At 20 spectra averaged per point, I only get about one point per second, not 2. So, in an attempt to correct this, I cut the averages in half, and was able to get it to work at very nearly 2 spectra per second. However, the time is not exact when compared to an external clock, and I need to know then exact time. Thus, is there any way to have the minute time frame graph count time on its own, and just plot a Y value whenever it recieves one? I need to have it plot in real time, as is currently achieved in the attached vi. In th attached VI, I am working with the "chromatography mode" tab, the other tabs already work correctly. However, I am somewhat new at this, and my code is a bit messy, so I apologize for that in advance. Thank you,

<>< Eric

0 Kudos
Message 1 of 6
(4,218 Views)

Hello Eric,

 

As a couple of subVIs are missing and I do not have the external triggering setup here, I cannot run your VI. I do not think I have understood what exactly you are trying to do. Do you want to plot the values obtained against actual time data (such as hh:mm:ss)? In the 'Chromatography' tab, what are you expecting to see? It would be great if you could make a simple example VI to demonstrate the problem that you are having at the moment. 

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 2 of 6
(4,194 Views)
I want to plot the values obtained against actual time value in the chromatography plot (hh:mm:ss). The values are retrieved from a maximum function in the "ims" plot, and I want them plotted verses time in the chromatography plot. However, the IMS does not operate at exactly the frequency I input, so the time values from this are not perfect. I hope this helps, I will work on a sample vi to demonstrate the problem. Thank you, <>< Eric
0 Kudos
Message 3 of 6
(4,187 Views)

Hello Eric,

 

I see that you are creating a waveform using the Build Waveform VI and then wiring it to the outputs in the Chromatography Mode tab - namely 'Waveform Graph' and 'Waveform Graph 3'. Is the 'dt' value constant for every iteration of the while loop? If so, your output should have constant time spacing between plotted values in the waveform graph.

So, again I am not completely sure what you mean by the IMS not operating at the frequency you input :-(. Are you seeing the problem in 'Waveform Graph' or 'Waveform Graph 3' or both? An simple example VI would be great to describe your issue.

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 4 of 6
(4,166 Views)

Vivek_N wrote:

.... Is the 'dt' value constant for every iteration of the while loop? If so, your output should have constant time spacing between plotted values in the waveform graph....


If this is true, you could use a waveform CHART, and just scale the x-axis accordingly

Cory K
0 Kudos
Message 5 of 6
(4,157 Views)

Hi all,

    I think it is more a software limitation due to the amount I am calling it to perform. It looks like if I do not have background processes, the system operates correctly, but if anything slows the system down, my time axis changes (when compared to an external clock or stopwatch). However, it seems to be working for what I need. Thank you for your help,

<>< Eric

0 Kudos
Message 6 of 6
(4,152 Views)