Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What support files need to be added with the Application Builder & Installer if there are DAQ boards?

Hello - I have an vi which uses DAQs. Because I do most of the programming on a computer without DAQs, I have written the vi to include a DAQ/No DAQ switch, so that I can run the vi on my computer with the switch set to NO DAQ (all the DAQ references are in case structures). To build an application with installer, I first move the program to a computer with DAQs and then use the Application Builder on that computer. The installer seems to successfully install the executable on another machine with DAQs but it fails to install properly on a DAQ-less computer with the message "NIDAQ32.dll not found". The executable has a broken arrow, so that I cannot even set the state of the DAQ/No DAQ switch.
Are there support files that I should be adding when creating the application and installer so that this executable could be installed on non-DAQ computers and the application run with the switch in the No DAQ position?
Thanks for your help,
Peg
0 Kudos
Message 1 of 4
(2,656 Views)
You have a couple of options. One is to simply install NI-DAQ on all computers. The other way is to change the way you are calling the subVIs. Instead of statically linking to the subVIs, call them dynamically. This way, LabVIEW would not load the subVIs into memory until they are called and you wouldn't get a broken arrow. You could also check for the presence of NI-DAQ software and make the DAQ/No DAQ determination automatic.
Message 2 of 4
(2,652 Views)
Dear Dennis,
Thanks for your response. I am attempting to use the Call By Reference but am getting bogged down trying to figure out what the path is to my vi. For example, I want to call AO Update Channels.vi. I know where this is on my computer. But where is it once the application is built and installed on another computer? The installer allows the user to specify the location of the application. I'm not sure where it is relative to the top-level vi, since the whole thing is combined into an executable file.
Also, is this a reasonable approach for vis that are frequently called? The application runs an electron gun power supply by continually sending values to an AO board (to control the power supply) and reading values from an AI board (to monitor the power supply's meters). This is to be distributed to customers who purchase the electron gun system. Maybe your suggestion to install Ni-DAQ on the customer's computer is better but is there a way to bundle that with the application, or have the installer automatically install the needed Ni-DAQ files? Normally a customer would already have the Ni-DAQ files in order to use the boards to run the power supply but there may be instances in which the LabView application is installed prior to board installeation, or is installed on another computer in order to try it out in the absence of the power supply - just like I do on my computer without DAQ boards (but I do have NIDAQ installed).
Thanks,
Peg
0 Kudos
Message 3 of 4
(2,640 Views)
If you want to get an idea of where subVIs are located with an exe, do a save with options and select Development Distribution and also check the include vi.lib files box. A LabVIEW exe file is the same thing. You can get the path by using the Current VI's Path and then doing two Strip Path functions. The first strip path will return the path to the llb (or exe) and the second one will return the path to the vi. Whether this is a reasonble approach or not depends on how you've designed your app. If it's such that you would need to load and unload numerous VIs constantly, tat might impose too much overhead. However, if you load one subVI that contains all the daq functions when the app starts and it remains in memory until you quit, then it's probably worth it.

Yes, it's posible to include NI-DAQ with your app though it's something I've never had to do. I believe it involves including the NI-DAQ installation files as support files. On the app builder's Installer Settings>Advanced page, you have the option then to run an executable after installation.
Message 4 of 4
(2,632 Views)