LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to collect data from LabView and VC++ programs at the same time?

Solved!
Go to solution

Hi,

 

There are two programs and one is in LabVIEW and another is in VC++. Both programs collect data from hardware.

So, for experiment it is necessary to start collecting data at the same time and the time difference should be

less than millisecond (It is critical for the experiment). How this can be achieved? BTW, I'm new to LabView.

I'm thinking about using network socket to pass message to both apps.

 

I was wondering if there is any better way.

 

Thanks.

 

 

Using LabVIEW 2010, Visual C#, Visual C++ (2005, 2008, 2010)
0 Kudos
Message 1 of 2
(2,030 Views)
Solution
Accepted by topic author MARK002-MAB

 


@MARK002-MAB wrote:

Hi,

 

There are two programs and one is in LabVIEW and another is in VC++. Both programs collect data from hardware.

So, for experiment it is necessary to start collecting data at the same time and the time difference should be

less than millisecond (It is critical for the experiment). How this can be achieved? BTW, I'm new to LabView.

I'm thinking about using network socket to pass message to both apps.

 

I was wondering if there is any better way.

 

Thanks.

 

 


You don't say if the two programs access the same hardware but I assume not. Because if they did you likely get contention issues when both programs try to access the same hardware at the same time.

 

In the other case, the only really reliable way to guarantee your requirements of < 1ms would be hardware triggering. One hardware unit is programmed to provide a hardware trigger, typically a digital signal and the other is programmed previous to the desired start point, to wait for that trigger and start automatically when it is received. If both hardware units are NI DAQ cards you can do that fairly easily using the RTSI bus or in case of PXI the PXI trigger lines. If they are different hardware then it can get more complicated to impossible.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(2,011 Views)