LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How To create a Buffer Application Program in LabVIEW?

Dear all:
Can someone advise me on how to implement a buffer application for LabVIEW.

Basically I have 2 application programs than run continously in paralell.

1) LabVIEW Data Logging & Plotting Program. It takes 90 ms to excute its code

2) C++ Data Acquisition Program. It Samples the data from a Reflective Memory Card (on the PCI bus of my PC)
at 1ms and creates a Buffer where it store one sample per channel every 1 ms.

I know LabVIEW have the Code Interface Node to call a C program but since both (The LabVIEW and the C) are runing (one slower than the other) in Parallel I need to somehow interrupt the C program from LabVIEW and get from it the data that it as collected so far.

Any suggestio
n will be highly appreciated. I attach txt file with a little more description of the problem.


Thank You very much.

Felix Beltran
ALSTOM Power Conversion.
U.K
0 Kudos
Message 1 of 3
(2,864 Views)
Hi Felix,

The best architecture for this application would be to have the C++ program divided into two threads. One thread is continuously acquiring data and placing it in a queue. The other "handling" thread will read data from the queue and serve it up to your LabVIEW application.

Much better than using the Code Interface Node, build the C++ application into a DLL. You can then call a function from your LabVIEW program to start the acquisition, and then calls to the handling thread function will return data to LabVIEW.

I hope this helps.

Regards,
Phil R
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 3
(2,864 Views)
Hi Phil:
Thank you for your advise I'll try this way.
I have considering the DLL as well.

Thanks.

Regards.

Felix Beltran
Control & Instrumentation engineer
ALSTOM Power Conversion
0 Kudos
Message 3 of 3
(2,864 Views)