LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

thread and synchronisation

Hi,
I have developped a DLL under VC++ with two threads : acquire data (producer), and data processing (consumer). I would like to add in data processing, displaying result in LV6. How can I do that ? How can I synchronise LV and VC++ ?
Thanks.
0 Kudos
Message 1 of 2
(2,138 Views)
> I have developped a DLL under VC++ with two threads : acquire data
> (producer), and data processing (consumer). I would like to add in
> data processing, displaying result in LV6. How can I do that ? How can
> I synchronise LV and VC++ ?


There are many ways depending on what you need. Simplest is to have
your LV diagram can periodically call into the DLL returning the amount
of available of data, a subset of the data, etc.

More complex is to pass an occurrence refnum into the DLL. The DLL can
set the occurrence using several mechanisms to awaken any LV code
waiting on it. For details, view the article on developer zone by
searching for something like LabVIEW occurrences.

If you want to build any other sychronization objects such as queues or
sema
phores, build them on top of the function calls into the DLL and
occurrences.

Greg McKaskle
0 Kudos
Message 2 of 2
(2,138 Views)