Is code in a disable structure included in an executable?

I have a LabVIEW 8.6 VI that I would like to build into an executable.  This code includes several PXI drivers for motion control and power supply control.  I have a hardware simulation mode built into the code that will allow me to run the front panel regardless of whether the software is running with hardware or not.  There are case structures around each of the hardware driver VIs in the software.  If I am running the code normally, the cases with the hardware driver VIs will be called and they will operate the connected hardware.  If I am running the code in hardware simulation mode, the cases with VIs that fake hardware will be called.  All of this works as I intended.  The problem comes when I try to build the code into an executable and distribute it to people who I know don't have the hardware, and probably don't even have LabVIEW installed.  The problem is that these people will have to install the NI runtime support (which I am perfectly fine with) but they will also have to install the drivers for the hardware that they don't have.
I am wondering if I were to change the case structures to conditional disable structures and disable the drivers, would that code still be included in the executable and require someone to install unused drivers to run the simulated code?
Eric C
Systems Integrator, National Technical Systems
Certified LabVIEW Architect

Hi Eric C,
Good Morning and I hope your well today.
Thanks for your interesting post! 
I would like to highlight one aspect of the help file, " ..Has one or more subdiagrams, exactly one of which LabVIEW uses for the duration
of execution,..". To me, this suggests at run time only one case will be valid. Thus, I don't believe this will act as you wish. Secondly, I am under the impression that this can't be used in an executable (compiled form - I got an error 1 when trying to). This maybe because the exe can't decide what case to use. Due to the above, I feel we should look at this issue from a different angle. 
To make it clearer, once the code is deployed there is no longer the conditional structure OR the code in the other frames. (There are however if your making a source distribution). 
I am guessing your driver would be calling third party dlls, and the exe will load these at the beginning. So this is likely to generate the browse window is the driver isn't installed. In your documentation you could include that this means you need to install the driver. If your user was then to run the code you could use a case structure and test that the file has been created by the installer for the driver (I.e. no install directory no driver). This would then prevent the end user running the application without the driver.
Thus, if you feel its not ideal the customer sees the browse window then you could run the installer for the driver at the end of the NI installer, which you could include when you distribute your application.
Please let me know  your thoughts, 
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help!

Similar Messages

  • Amusing disable structure bug

    When I say amusing I mean I took a few hours to find it and then laughed...
    If you have a diagram disable structure without an 'enabled' case LabVIEW throws and error and won't run, flags the structure and tellins you to add an 'enabled' case.  This happens even if the structure is empty.  Fair enough.
    If you a a diagram disable structure without an 'enabled' case in a disabled case of another diagram disable structure (with an enable case) then Labview won't run the vi but will only say : 'Labview needs more memory to compile vi', and won't flag the structure.  It will then often crash...
    This seems odd for several reasons:
    1)  I don't think this used to be the case - I found the bug importing an old .vi which used to work.
    2)  Logically an enable case isn't necessary - suppose I want to disable all the cases?
    3)  Why is code in a disabled case making any difference anyway?
    Anyway - hope this saves somebody a few hours
    Luke

    Jester_v01 wrote:
    When I say amusing I mean I took a few hours to find it and then laughed...
    3)  Why is code in a disabled case making any difference anyway?
    Anyway - hope this saves somebody a few hours
    Luke
    Whay answer require somebodt sitting in that conference room when the decision were made but...
    WHen the Disable structure was introduced a bug entered whenre "Source Distributions" would fail to take into concideration code in the disabled structure. Since the disabled structure was (?) intended (?) to affect if code got compiled or not but was not (?) intended (?) to influence if code was part of the Source Distribution this was called ab ug and I think fixed. Others have since realized the bugging behaviour was actually a bug and what they thought was a feature was really a bug.
    So I suspect you have found another corner case not concidered in that conference room years ago.
    Just my guess. If you have a better one please share.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Program won't build if a broken vi is included in a diagram disable structure

    I develop code that can run on both PXI and Compact RIO devices.
    To allow for the different DAq methods I have a target specific child object that I tried putting in a conditional disable diagram.
    I found that even if it was disable, the build would still fail.
    When you build rio code on a pxi target, you et problems But I didn't expect them if the class was diagram disabled
    In fact it won't build if it is in the project at all.
    Posted as a bitter lesson for others to avoid.
    iTm - Senior Systems Engineer
    uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RT

    I just made a test built with a diagram disable structure containing an odd subVI in the disabled case and cannot reproduce this error. Are you sure that the relevant case is set to disabled?
    Can you attach a simple VI that shows the problem?
    LabVIEW Champion . Do more with less code and in less time .

  • LabVIEW Mac prompting me for dll's in conditional disable structure

    I'm using LabVIEW 2014 Mac and I have several conditional disable structures which call user32.dll but only in the Default case whereas they do nothing in the TARGET_TYPE=Mac case.  When loading my source code in LV Mac I get prompted to find "user32" and I have to Ignore All.  Afterwords the code is open with no errors.
    It seems to be a bug that this prompt is occuring?  Is there a way to supress it?
    Solved!
    Go to Solution.

    Hello Thomas,
    It sounds like the user32.dll is being loaded along with your LabVIEW code on launch instead of being loaded when called. What you can do is encapsulate the function that is making the user32.dll call in a subVI (if you haven't already done this), right-click the subVI and go to Call Setup. From this window, choose Load and Retain on First Call. This should make sure the user32.dll is only loaded when you reach the Default case in your Conditional Disable structure, and not search for it every time the code is loaded into LabVIEW.
    Hope this helps,
    Siana A.
    Application Engineering
    National Instruments

  • Diagram Disable Structure doesn't remove all objects it contains after deleting the structure.

    I have programmed in side of a while loop a Stop from "Application Control", later I used disable structure around that "Stop". It was working fine, but after removing disabled structure containing the disabled "Stop" my application stops even there was no reason to stop. Later I have experienced that removing the disabled structure leaves hidden object in the code and some how they get executed and it is no way debugging due the objects are invisible.
    I am worried that this is a bug in Labview !
    (Edi)
    Solved!
    Go to Solution.

    The Stop was in the disabled case in a frame and after removing the complete "disable structure" the software stopped randomly at the location where the disabled structure containing the Stop was already removed. Unfortunatally the code is to complex to post. I am working on a demo, but sofar doesn't prove my point yet. But I realized Labview was pointing on left over items from the disabled structure after its removal. The compiler was high lighten the hidden objects in the same shape of the object but without any visible object in the high lighted position in the graph. 
    (Edi)

  • LV8: Diagram Disable Structure

    I am converting my test code from the use of traditional DAQ to DAQmx. In a couple of my test VIs I have the Traditional DAQ VI for Port Config. if I put those in a disable structure marked as disabled will it cause any issues when running using DAQmx drivers? I don't think it should since it does not get executed but I wanted to confirm.
    Once I verify my DAQmx changes work, I will remove it.
    Thanks
    Jeff D.
    OS: Win 7 Ultimate
    LabVIEW Version: 2011,2010,2009 installed
    Certified LabVIEW Architect

    Hi Jeff,
    That's right, any code in the disabled state of a Diagram Disable Structure does not get compiled or linked to by the owning VI.  You should be safe.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Another use for the disable structure (Bug or Feature?)

    Hi,
    I always use a lot of dynamic VI's in my projects, and sometimes I need to
    pass parameters to them. I use Set Value methods.
    One problem is that when you build an executable, the application builder
    (AB) removes the panels by default, and the Set Value method will fail... I
    know you can change the AB settings, but I was getting tired of that (and
    had some free time). I also know you can change the VI properties so AB
    won't remove the front panel...
    But I started looking for things that tells the AB not to remove the front
    panel.
    I found out that the FP won't be removed when the VI has an event structure.
    And it turns out that this works even if you put the event structure in a
    disable case!
    I'm pretty sure this isn't supposed to happen. I'm not so sure if it's
    usefull since it might change over versions (I use 8.5.1), but I thought I'd
    share it anyway...
    Regards,
    Wiebe.

    Just today I had a problem with a VI with a diagram disable structure that would compile but the FP of the executable was mallformed and cause the whole app to crash.
    So I stay away from diagram disable structures in execution code.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Changin the code of this form to include current month + the next 8 months

    Hi All,
    please i need to change the code of this BW ABAP routine to filter the data between the current month + the next 8 months
    example:
    if i execute my BW DTP (data transfer process) with this 0calmonth date 201007 i want to extract data between 201007 and 201103
    actually the code is:
    form compute_
    tables l_t_range structure rssdlrange
    changing p_subrc like sy-subrc.
    Insert source code to current selection field
    $$ begin of routine - insert your code only below this line -
    data: l_idx like sy-tabix.
    read table l_t_range with key
    fieldname = ' '.
    l_idx = sy-tabix.
    if l_idx 0.
    modify l_t_range index l_idx.
    else.
    append l_t_range.
    endif.
    p_subrc = 0.
    $$ end of routine - insert your code only before this line
    can you help me please on how should be the ABAP code.
    thanks
    Bilal

    Hi All,
    this is the right code for this routine BW:
    *&  Include           RSBC_SEL_ROUTINE_TPL
    program conversion_routine.
    Type pools used by conversion program
    type-pools: rsarc, rsarr, rssm.
    tables: rssdlrange.
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
        Fieldname       = CALMONTH
        data type       = NUMC
        length          = 000006
    form compute_CALMONTH
      tables l_t_range structure rssdlrange
      changing p_subrc like sy-subrc.
          Insert source code to current selection field
    $$ begin of routine - insert your code only below this line        -
    data: l_idx like sy-tabix.
    data : v_date like sy-datum.
    data : v_new_date like sy-datum.
    v_date = sy-datum.
    read table l_t_range with key
    fieldname = 'CALMONTH'.
    l_idx = sy-tabix.
    l_t_range-iobjnm = '0CALMONTH'.
    l_t_range-FIELDNAME = 'CALMONTH'.
    l_t_range-sign = 'I'.
    L_T_RANGE-OPTION = 'BT'.
    l_t_range-low = v_date+0(6).
        CALL FUNCTION 'DATE_CREATE'
        EXPORTING
          anzahl_monate = 8
          datum_ein = v_date
        IMPORTING
          datum_aus = v_new_date.
    l_t_range-high = v_new_date+0(6).
    if l_idx <> 0.
    modify l_t_range index l_idx.
    else.
    append l_t_range.
    endif.
    p_subrc = 0.
    $$ end of routine - insert your code only before this line         -
    endform.

  • Diagram Disable Structure and Asynchronous SubVI Bug?

    In this diagram, the boolean value won't arrive at the Boolean 2 indicator until ASYNC has completed running.
    Without the Diagram Disable Structure, it does not wait for ASYNC to complete.
    I always believed the Diagram Disable structure would compile the Enabled case as if the structure weren't there, but that is clearly not the case.
    Is this a bug?
    Solved!
    Go to Solution.

    I don't think I agree with you here. The flat sequence structure would behave exactly the same, no matter if it is internally implemented as a node or not. This is how LabVIEW dataflow has worked since the inception of LabVIEW and I see no reason why it should change.
    The border of a structure is a border that has well defined behaviour. The structure will not start before all its inputs are satisfied and the output tunnels will not be passed on until everything inside the structure has finished execution. If you want to have Boolean2 update while Async VI is still executing you have to place its terminal inside the DSS (or (Flat) Sequence Structure). This has been so since I first started to work in LabVIEW in version 2.2.1 and better stays so as long as LabVIEW wants to stay dataflow driven.
    All text code programming I know of wouldn't behave differently although there you don't have dataflow anyhow so the point is really mute as the sequential flow of the code is all that matters there.
    Inlined code is a special case. If they wouldn't do that you could get all kinds of very difficult to debug issues, because your code executes different depending on the inline status and may cause side effects that cause different results because of that.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Replace Diagram Disable Structure by Case structure?

    I may be missing something but at least in LV 2010, it appears only possible to replace a "Diagram Disable Structure" by a "Conditional Diagram Disable Structure".
    I don't see why it is not possible to replace it by a case structure... The content is very similar and I have faced occurences where I would toy around between different versions of my code and eventually decided that I wanted to offer the user the possibility to choose between them using an enumerated control (or Boolean). Currently you have to rewrite the code in a newly dropped case structure, which is a waste of time. I guess I could stop using Diagram Disable structures altogether, but I most of the time use them for their intended use, so that would be a step backward in functionality if I forced myself to use case structures "in case" I would later want to offer these different cases to the user (which is something that I can't always predict).
    Solved!
    Go to Solution.

    You are not alone.
    http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-the-ability-to-replace-a-disable-structure-with-a-...

  • Diagram disable structure not really disabling?

    I have a VI in which I had put a diagram disable structure (not the conditional one) around a section of code containing the Time Delay VI (this is the only place where I have the Time Delay VI). I built an executable containing this VI. When I start the executable I get an error that esssentially says it can't find the Time Delay VI. I removed the diagram disable structure (and the code inside it) and I no longer get the error. I thought the code inside the diagram disable structure wasn't supposed to get compiled. Right?
    George

    I just made a test built with a diagram disable structure containing an odd subVI in the disabled case and cannot reproduce this error. Are you sure that the relevant case is set to disabled?
    Can you attach a simple VI that shows the problem?
    LabVIEW Champion . Do more with less code and in less time .

  • What are the valid values for CPU in conditional disable structure config?

    After diggin' around for some time (but to no avail)...
    Does somebody know the valid values for the CPU (symbol) in the conditional disable structure configuration or where I can find this information?
    Best regards,
    Horst

    Not sure but you can try this:
    http://zone.ni.com/reference/en-XX/help/371361E-01/lvprop/app_apptarget_cpu/
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • JSP generates error - thread.java:481 - Source code viewing is disabled

    I run IBM WebSphere 3.5.3 on a WinNT platform. When I try to run my JSP testpage (which is a normal HTML page with jsp extension) I get the error message:
    thread.java:481 - Source code viewing is disabled.
    What is this? What can I do to get it running?
    I have made the webapplication and application server and it seems to run fine.
    Thanks in advance.

    I thought I had done it correctly, but I must have missed out on something. I tried my jsp code in the "examples" folder and it worked there. I am now using the "examples" folder instead. Thanks for your reply :)

  • My iPad is disabled. i connected it to the iTunes, but the iTunes couldn't access it; because the iPad has a pass code. i can't enter the pass code in the disabled iPad! do you have any suggestions?

    my iPad is disabled.
    i connected it to the iTunes, but the iTunes couldn't access it; because the iPad has a pass code.
    i can't enter the pass code in the disabled iPad!
    do you have any suggestions?

    You can unlock it on another computer though the content will be wiped and I think that you need to put it into DFU mode e.g. see post https://discussions.apple.com/message/15385719#15385719 in thread https://discussions.apple.com/message/15385641#15385641 .
    From http://support.apple.com/kb/HT1212 :
    If you restore on a different computer that was never synced with the device, you will be able to unlock the device for use and remove the passcode, but your data will not be present.

  • HT4113 Can't figure out pass code and keeps disabling?  How do I reset this?

    Can't figure out pass code and keeps disabling?  How do I reset this?

    If you can't figure it out, you'll have to force recovery mode and restore the device.
    Follow the steps in this article:
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/HT1212

Maybe you are looking for

  • I can no longer view my Army Enterprise Email, after some recent updates. I am using Ubuntu 12.10, with firefox 25.0(?) any ideas? My email is [removed]

    I used to be able to access my Army Email with my CAC card. Recently I lost that ability. Are there any known issues regarding this with your recent updates? Would that reset button be the solution? I haven't tried it because I don't know what I woul

  • Saving a pdf with seperate colors

    Hello guys, I'm new in here, so i hope my thread is on the right place. If not, please correct it. I need to know, if it is possible to save a .pdf file (with some printing documents on it: with CMYK colors and PANTONE colors) with seperate colors. I

  • Dynamic webdynpro context mapping in GP

    Hi Experts, I have created a webdynpro coponent which contains a Dynamic node as a Gp context Output parameter. This Dynamic node is mapped to another WD callable object's GP context input parameter. Will i be able to transfer data using this dynamic

  • 3dmark05 score too low!!!

    my 3dmark05 score is too low. i have a msi 9800 pro(green pcb version.) and i only got 1200 points please help. Also i used to get 6400 points in 3dmark03 but they also dropped to 5000. I also installed the latest chipset drivers and also have cataly

  • Can Function Return more than One Values ??

    Hi Experts, I would like to ask you Can Function Return more than one values. I Used Function with Out and In out parameter and its working Fine.. 1. what is harm using Out and In out parameter in function 2. if we can use Out and In out parameter in