Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about NI-DAQ startup

Hi,

I have written software to do data acquisition from 8 6031E
boards (4 boards in 2 PXI-1000B). The software is NI-DAQ 6.9,
with Delphi 5 under Windows NT. When the program starts, the
boards are initialized one at a time. This is a lengthy process
taking several seconds. I'd like to display a splash screen
telling the user what is going on, so he/she doesn't have to
look at a blank screen all this time. However, the boards start
initializing when I start the program, but before any of =my=
code can run - i.e. before the splash screen can be displayed.

I'd really like to know the order of events here, and whether
I can delay the NI-DAQ initialization until =after= my splash
screen is displayed. (I presume some NI-DAQ cod
e is getting run
when a DLL gets loaded?)

If it comes to the worst (and I suspect it will), I can always
use another program to spawn my existing program, but I'd prefer
to keep everything in one process/.EXE file if I can.

--
Dr Francis L Burton, | F.L.Burton@udcf.glasgow.ac.uk
West Medical Building, |
University of Glasgow, | Tel +44-141-330-6598
Glasgow, G12 8QQ, Scotland. | Fax +44-141-330-4612
0 Kudos
Message 1 of 5
(3,004 Views)
It is my understanding that the NI-DAQ cards are initialized whenever data acquisition code is present in a program. Therefore, when a program is run, if a DAQ VI is called, the NI-DAQ software is started immediately, even before the program starts.

Since I use LabVIEW, I can give you the solution that way (in text), and you can inplement it the way you want.

LabVIEW allows you to dynamically load a VI when you need to. Therefore, you can create your splash screen, and THEN call your VI which contains the DAQ calls. Therefore, the VI which contains the calls is not loaded into memory until AFTER your splash screen has been displayed, unlike just adding a splash screen to your current code.

In LabVIEW this would be called "using the VI Server to dynamically loa
d a VI".

Mark
0 Kudos
Message 2 of 5
(3,004 Views)
markwysong wrote:
> It is my understanding that the NI-DAQ cards are initialized whenever
> data acquisition code is present in a program. Therefore, when a
> program is run, if a DAQ VI is called, the NI-DAQ software is started
> immediately, even before the program starts.
>
> Since I use LabVIEW, I can give you the solution that way (in text),
> and you can inplement it the way you want.
>[...]

Mark - Thanks, that confirms my suspicions. I'd really
like to know how to do your "using the VI Server to
dynamically load a VI" trick with the vanilla NI-DAQ
libraries. Right now, it looks like I will have to go
with the two-separate-processes kludge.

Francis
0 Kudos
Message 3 of 5
(3,004 Views)
The VI server is a function inside LabVIEW. It allows a program to call a VI, but the VI is not loaded until it is needed, unlike traditional code where it would be loaded with the calling VI upon running it.

I'm not familiar enough with CVI to tell you if it has the VI server funcitonality as well. Your best bet is to check the NI website or your CVI manual.

I have actually used this VI server in exactly the manner you are, where I have a screen (it's not a splash screen, but a main screen) in which other screens can be selected, but they're not loaded into memory and run until the user presses the button. Then the VI is called dynamically (through the VI server), allowing any data acquisition VIs NOT to be loaded until then. Then I don
't have to wait for NI-DAQ to initialize until it's necessary.

Mark
0 Kudos
Message 4 of 5
(3,003 Views)
Whoops, just realized you're using Delphi 5. Sorry about that.
0 Kudos
Message 5 of 5
(3,003 Views)