LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

transferring waveform data from a current loop to an outside

I am relatively new to labview and was in need of some aid; i have already talked to NI engineers and we didn'e come up with an easy solution to this, so please lend your expertise if you can.

I currently have a functioning program inside a while loop that I am looking to modify.   I'm grabbing some waveform data and will perform some mathematical operations on it.

My question is what is the best way to grab that data in real-time and transfer it into another loop (which would do the operations on that data that i need).  We tried some queue functions but apparently there were some timing issues, etc. that apparently didn't work.  In case you are wondering why I am trying to grab this waveform data into a new loop, I will be taking averages of the maxes and mins of the waveform and calculating a new average every 4 seconds.  I believe i can come up with an algorithm to compute this; its just getting the data to feed in accurately from the original waveform.

Please let me know if you have a way to do this or have any words of wisdom; it would be very greatly appreciated.
0 Kudos
Message 1 of 4
(2,251 Views)
I'm probably just over simplifying this, but the main loop is running continuosly, and every 4 seconds, you want to compute some averages? Why not just have a timer running that executes a case structure then resets the timer?

Of course, anytime someone uses the word "real time" my eyes get all glassy and my brain stops because I never really know what that means. I assume I'm always writing programs that are "fake" time or something like that.




~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 4
(2,239 Views)

HI ksm,

are they too many data, that you don't work with local variables? I don't know how "real time" that is.

Smal working example attached.

0 Kudos
Message 3 of 4
(2,233 Views)
Queues should work. Look at the shipping examples of Producer/Consumer design pattern which use queues. If you have a very large dataset an Action Engine as described in Ben's recent Nugget might be useful in preventing unnecessary data copies.

Lynn
0 Kudos
Message 4 of 4
(2,224 Views)