LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building applications that run without DAQmx installed

Solved!
Go to solution

We would like to develop executables that include optional calls to DAQmx connected hardware.  These will be used for both internal development purposes and customer distribution. We would like to include optional features such as temperature logging using the NI 9211/USB-9162 thermocouple input device.  If a customer wants to use our application with temperature logging, they can buy the hardware required from NI and install the DAQmx drivers.

 

The problem we are looking to solve is how to develop applications that also work for the case when a customer does not want to buy the hardware, and does not install the DAQmx drivers.  Ideally we can include a "disable temperature logging button" on relevant applications, which prevents all calls to the DAQmx drivers at run time.  For example by including the calls in a case structure controlled by that button.

 

The problem we seem to have is that the resulting executables still require that customers install DAQmx drivers, even if they do not require them.  There does not seem to be a way to make the installation optional, since the source VIs included calls to DAQmx drivers, even though they will not be used by the customer.

 

Clearly one solution is to develop two families of VIs and applications, one that include the DAQmx calls and one that doesn't.  However that will result in a horrid collection of code that will require parallel development and maintenance.

 

Another solution is to require all customers to install DAQmx drivers.  Sadly the size and complexity of the resulting downloads will be a significant deterrant.  It is already an embarassment that our distributed software is a 50Mb download when code size in C++ or VB would be less than a tenth of that.  Another factor of 10 increase in download is prohibitive.

 

We need to find a cleaner solution.  Any ideas, plase?

 

We are currently developing with LabVIEW 8.5.1 and DAQmx 8.9.

0 Kudos
Message 1 of 7
(3,116 Views)
Solution
Accepted by topic author InductiveChip

You can use the conditional disable structure and conditional disable symbols in the project to do this. You can, for example, have a symbol called "HAVEDAQMX" and, say, use a 1 or 0 (or whatever else you want) to indicate that you want to run the project with/without DAQmx. In the VI use the conditional disable structure. For the HAVEDAQMX = 0 case put in the code to run without DAQmx. For the HAVEDAQMX = 1 case put in the DAQmx code. When you build the application the appropriate case will get used, and the other will be thrown away.

 

Attached is a simple project that does this. You can look in the LabVIEW Help for more information on conditional disable structure.

Message 2 of 7
(3,091 Views)

 

0 Kudos
Message 3 of 7
(3,084 Views)

Another approach is to separate the driver-dependent code from your core application and use VI Server to load it only when needed.


Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 7
(3,049 Views)

Thanks Brad.  That looks like a good solution which avoids the need to build two different applications, one that needs DAQmx and one that doesn't.

 

We use LabVIEW Professional, and if I understand correctly we would need to switch to Full to use VI Server.  I'm afraid the convenience of a single application doesn't warrant the cost of upgrading, but we'll certainly bear it in mind for the future.

 

David

0 Kudos
Message 5 of 7
(3,045 Views)

Hi David,

 

LabVIEW Professional is a superset of LabVIEW Full, and the online help says that VI Server (e.g. Open VI Reference) is supported in LabVIEW Base too.

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 6 of 7
(3,040 Views)

Brad

 

Found it, thanks.  I'll have a play.  I don't have much of a non-LabVIEW programming background, so I'll need to do a bit of research...

 

David

0 Kudos
Message 7 of 7
(3,034 Views)