LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating work done per cycle

Hi there,
 
I am running a machine continuously through a cycle and I need to calculate some "cycle performance figures" (work done, mean air speed etc) for each cycle in real time.
 
I am collecting data from a USB 6009 DAQ device using 4 input analog channels (pressure 1, pressure 2, pulse trigger, air speed) and sampling at 2kHz.  I am running the machine about 4 revolutions (cycles) a second.
 
The rising edge of the pulse trigger indicates bottom dead centre (BDC) in the cycle and is the point where I need to start doing calculations from.  I have attached the spreadsheet that I use to post process this data and a pdf of the maths I need to use.  I have also attached a jpg of the relevant loop in my LabView (8 Full) program.
 
I know the maths and the principle of what I need to do but I can't put it all together.
 
Many thanks
 
Daniel
Download All
0 Kudos
Message 1 of 3
(4,497 Views)
What problem are you having?

Processing the data is taking too long and slowing the data acquisition?
Can't figure out how to implement the data processing?

I think we need a few more details to point you in the right direction.

If the processing is taking too long, you might want to look into using two aprallel loops. One to do the DAQ and one to do the processing and displaying fo the data. A good example of this is included with LabVIEW as a template. Go to "File>New..." and expand the "Frameworks" tree, then the "Design Patterns" tree and select and open the "Producer/Comsumer Design Pattern (data)" template. I think this is what you should be using.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 3
(4,487 Views)

Hi Daniel

 

Just a quick point you might be better off using the PFI line (pin 29) on the 600X for your triggering if you are using a TTL signal.

 

You mention you want to read the data in “real time “  Using the 6008/09 you can’t strictly perform any real time operation, I guess you are running on a windows OS which if it wants has priority over your processor and the USB interface is all interrupt driven.

 

As Ed said could you be a bit more specific on what the problems you are having and if you are getting any error codes please note them in as well.

 

Regarding your formulas have you thought of using formula nodes? I have written you a little example, you know what your formulas mean but what I have done will hopefully give you some idea of how to use them in LabVIEW. If you use the context help and click on the formula node it will give you lots of help and any syntax information you might need.

 

Regards

 

Tim

 

NI AE UK and Ireland   

 

0 Kudos
Message 3 of 3
(4,449 Views)