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: 

conditional disable no longer works

   We have a large application that calls modules dynamically.  It has been working in LV 8.2.  We compile the main program and use "Source Distributions" to distribute modules for individual installations.  Thus these modules are LV source code in directories that the .exe calls dynamically.

 

   Two of our modules use DAQMX, so the distributions get understandably large.  Since the DAQMX is an option that most customers don't use, we incorportated a Conditional Disable structure around them and used a custom Conditional Disable key.  We set this key's value in the project before creating the source distribution, so that we can choose whether or not the DAQMX sub-vis are included in the distribution.  This all worked fine in LV 8.2.

 

   We recently upgraded to 8.6.  Now the distribution includes the DAQMX sub-vis regardless of the conditional key.  I thought that maybe the condition got "disconnected" in the upgrade process, so I created a new key, deleted and replaced the conditional disable structure, but to no avail.

 

   Worse than just having the sub-vi's included in the distribution, even though they have been supposedly removed, the fact is that if the DAQMX drivers are not loaded on the target machine, the VI is broken and won't run.  Even though the VIs aren't using the DAQMX sub-vi's, they are broken because the associated dll's are missing.

 

   I looked through the forums, and though I found a number of messages about the Conditional Disable, I couldn't find anything specific about this issue.  Is this a known issue?  Is there a work around?

DaveT

-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
Message 1 of 41
(5,293 Views)
   I've created a test project that demonstrates the issue.  It works as expected in 8.2 and 8.5, fails in 8.6.  You'll probably need to change the Source Distribution destination in the project before you Build, or you can just use the Preview function to see what the build would do.  I've played a bit with the "Additional Exclusions" options, to no avail.  Note that we DO need to include sub-vis from vi.lib in order for our system to work, and that this is still OK in 8.2 and 8.5.  The DAQMX sub-vi's are only included when the conditional disable key is set appropriately.  In 8.6, they are included regardless of the Conditional Disable key, AND their inclusion results in a broken calling VI when the DAQMX driver hasn't been installed.
-------------------------------------------------------------
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
Certified Embedded Systems Developer
-------------------------------------------------------------
There are 10 kinds of people: those who understand binary, and those who don't.
Message 2 of 41
(5,267 Views)

David,

 

Just to confirm, I see this problem also when using your attached vis.

Reading the NI Help for LabVIEW 8.6 I can see that the behaviour of the Conditional Disable Structure should do exactly as you prescribed, and that disabled cases ought not be compiled. Could this be a bug in 8.6? I think we might need an NI rep to step in here and confirm this for you...

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 3 of 41
(5,252 Views)

Hi Dave,

 

This was reported to R&D (# 159192) for further investigation. Thanks for the feedback!

 

Regards,

Stephen S

National Instruments
Applications Engineering
0 Kudos
Message 4 of 41
(5,209 Views)

Hello,

 

LabVIEW 2009 SP1 seems to be still affected by the problem, however it looks like it is not reported in the known issues. Any update for this bug? It is pain for us too!

 

Best

Charles

0 Kudos
Message 5 of 41
(4,776 Views)

Hi everyone,

 

The behavior of the VIs being included in the project is expected. What isn't expected is that it would cause the execution to fail. I will have to try it out myself and may file a different CAR.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 6 of 41
(4,732 Views)

Jeff,

See if it is related to CAR ID# 212974


Paul
0 Kudos
Message 7 of 41
(4,715 Views)

Hi Jeff,

 

I don't get your message; if the VI is marked as "include if referenced" in the build spec and that the subVI call is in a diagram disable structure, I think it is expected to be excluded from the build 

 

Charles 

0 Kudos
Message 8 of 41
(4,687 Views)

If you build a source distribution with conditional disable around VIs, the VIs will be pulled into the source distribution. That is what is expected.

 

When you get to your machine without the DAQmx driver installed (thus breaking the included VIs), as long as they're still inside the conditional disable it should still run (and be able to be built into an EXE). If it's not letting you, then that is unexpected. I will confirm the error is occuring.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 9 of 41
(4,667 Views)
PJS, it might be related. It looks like a similar issue. Thanks for the pointer. I will post an update once I have something more.
Jeff | LabVIEW Software Engineer
0 Kudos
Message 10 of 41
(4,666 Views)