ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Up VI Multithreading

How do I set up a VI to run in a multithreaded function in Visual C++?

I've used LabVIEW 6i to create a dll that has a function that, when
called, creates a file and then writes the time and a random number to
that file. I can call the function from Visual C++ 6.0 fine: it
creates the file and writes the data. However, that's only in a
straight call.

Due to the nature of this project, I need to include this call in a
multithreaded portion of the program. However, when I make the LabVIEW
dll call part of the multithreaded portion of the Visual C++ program,
the LabVIEW function no longer runs. In fact, the thread ends at the
call to the LabVIEW dll; any statements beyond that call are not
executed.

I use the following to
call the function that contains the LabVIEW dll
call:

pLVSendThreads = AfxBeginThread(SendToLabView, &DataToSend);
//MFC multithreading start

However, if I do just a straight call like this:

SendToLabView(&DataToSend);

....I don't have any problems.

Ideas, thoughts, suggestions?

Thanks,

Scott
0 Kudos
Message 1 of 1
(2,655 Views)