取消
显示结果 
搜索替代 
您的意思是: 

Prevent DAQmxBase loading

Can I programmatically prevent labview from loading the DAQmxBase routines when I don't have the hardware available.
0 项奖励
1 条消息(共 6 条)
3,273 次查看

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 项奖励
2 条消息(共 6 条)
3,257 次查看
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 项奖励
3 条消息(共 6 条)
3,255 次查看

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 项奖励
4 条消息(共 6 条)
3,244 次查看

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 项奖励
5 条消息(共 6 条)
3,234 次查看

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 项奖励
6 条消息(共 6 条)
3,226 次查看