From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent DAQmxBase loading

Can I programmatically prevent labview from loading the DAQmxBase routines when I don't have the hardware available.
0 Kudos
Message 1 of 6
(2,335 Views)

Ben_01880,

 

Which routines are you specifically wanting to stop?  What operating system are you on?  Are you wanting to check for what hardware you have connected to your system and if the specific hardware is not found then do not try to acquire from the hardware?  Thanks for the additional information.

Zach C.
Field Engineer
Greater Los Angeles

0 Kudos
Message 2 of 6
(2,319 Views)
Hi, I run on both Mac & PC. Only a small population of them use the USB6501 for I/O. It seems that if Labview sees that the code might need the DAQmxBase routines it starts looking for them. I would like to only have the DAQmxBase libs on just the machines that need it (2 maybe 3) , otherwise I would have to version track more offsite software. Thanks
0 Kudos
Message 3 of 6
(2,317 Views)

Are you trying to run or develop parts of a program which contains DAQmx Base VIs on the computers without the hardware?  The Diagram Disable structure or the Conditional Disable structure may be of some value to you, but you will still have versions of the program which are different on the various computers.  Please tell us what you will be doing on these other computers.

 

Lynn

0 Kudos
Message 4 of 6
(2,306 Views)

I tried placing the code with the DAQmxBase calls in disable structures and

they still get loaded at program startup. If I were to move the calls into

a sub vi, would this prevent their loading until needed?

 

0 Kudos
Message 5 of 6
(2,296 Views)

I had not thought about it carefully.  They will be loaded because you could change the case from Disabled to Enabled.  They do not get compiled when in the Disabled case.

 

So it appears that the only way to not load them is to not put them in.  That means either two different VIs or putting all the DAQmx Base VIs in a subVI which is dynamically called (via VI Server).  I have not checked but I think dynamically called VIs do not load until called and they are not part of the VI hierarchy.  I do not use dynamically called VIs much so I am not sure on this point.  DAQmx Base can be slow to load because of the number of subVIs involved, so if you go to dynamically calling them, allow enough time between the call and the time you need the first DAQ action for the loading to complete.

 

Lynn

0 Kudos
Message 6 of 6
(2,288 Views)