LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using VB to call Labview DLL which uses HSDIO for generation and acquisition

Hi,
     I use VB to call Labview DLL which does the acquisition and generation using HSDIO card 6552.
For the generation and acquisition program, I run it successfully in Labview. I split the whole chain of generation and acquisition into two (to do downloading first for the first program A and program B is to activate the generation and acquisition).
In Labview it run well with the two program. I run A first and pass the parameters like the handler (for generation and for acquisition) and the error code over to B. 
I compile them into DLL and use VB to activate A with a single button 1 and to activate B with the single button 2.
Program A when click button 1 runs well. However, error occurs when button 2 is clicked. It says the handler is not valid. (Currently I use global variable to pass the handler). Is there any way to solve this?
Mickie
0 Kudos
Message 1 of 2
(2,267 Views)

Hi Mickie,

It sounds like you are taking two examples in LabVIEW, the HSDIO generate and HSDIO acquire examples, and putting them in sequence one after another.  I'm assuming that both tasks are running for the same instrument as well, and that you are building a DLL out of this LabVIEW code to call in your VB code. 

If this is the case, I'd suggest looking at the examples already written for simultaneous HSDIO Generate and Acquire.  These can be found in your example finder under Hardware I/O >> Modular Instruments >> HSDIO >> Dynamic Generate and Acquire.  Once you get that to work the way you want it to, build a DLL out of that.  In these examples, the two tasks are being executed in parallel. 

Let me know if that helps,

Daniel L.
Applications Engineer
National Instruments

0 Kudos
Message 2 of 2
(2,246 Views)