Discussion:
Using VB to control HSDIO via Labview DLL
(too old to reply)
Mickie
2006-10-12 10:40:10 UTC
Permalink
Hi,
    I use VB to control HSDIO card by means of Labview (8.0) DLL.
I've broken the labview programme into two portions into corresponding labview DLLs
The first command button on VB will load a waveform on labview by passing parameters from VB to labview DLL calling the DLL function.
The second command button on VB is to start the desired waveform (generation and acquisition) using the labview DLL function (I called 'Start')
I pass the IVI instrument handle via global variables.
The waveform that I generate takes 3 minutes to complete
On the second labview DLL (the one used in the second command VB button), I start both the generation and acquisition using the HSDIO initiate VI. What I found out is that the function 'Start' will not return until the acquisition (3 min) is completed.
Is there a way to cause the function 'Start' (labview DLL) to return to VB earlier (to the next line on VB) so that I can have the freedom to reset the generation and acquisition while the waveform is outputing on the HSDIO 6552 card ? (for purposes of correcting the parameters in cases of error).
 
The second question is if I want to acquire more than 100 000 samples (which is the max number of samples that the VI configure acquisition size vi can take), how can I do so?
 
Thanks
Mick
Ryan M
2006-10-12 14:10:11 UTC
Permalink
Mick,

It sounds like you have a DLL for generation and a DLL for
acquisition.  Global variables, however, are only "global" within
the DLL which uses them.  If you need to share data between DLLs
you could create functions that are accessible using the call library
function node that's a "read/write" global.  Alternately, you
could use a datasocket connection to a localhost to store the data for
both DLLs to access.  Using datasocket is like using a global
that's on a network instead of within the execution space of an
application/dll.

you can launch the datasocket server from:
Start»Programs»National Instruments»DataSocket»DataSocket Server

I hope that helps.
Mickie
2006-10-13 01:40:11 UTC
Permalink
Hi,
    thanks for the reply. My generation and acquisition is concurrent. I only separate the execution part of both of them to the second Labview DLL (meaning the HSDIO initiate for both generation and acquisition). The global variable is used only to pass the IVI instrument handle over to the second Labview for execution of both generation and acquisition. The problem I faced was how to get the second DLL to return to the next line while in the midst of execution in order for me to be able to reset if there is a mistake in the parameters I had inputed.
Thanks
 

Loading...