Passing checkboxes to sub VIs

I'm passing checkboxes (i've tried switching to toggle switches) to a sub-vi.  When the sub-vi front panel is open, the values pass correctly but when the sub-vi front panel is closed they do not.  I first tried passing a cluster of booleans and then separate booleans and I'm seeing the same effect.  Any ideas why this might happen?

The values are passed in whether the front panel is open or closed. Are you opening the front panel after you've run the VI? If so, you won't see the subVI's front panel reflect what values were passed in. This is normal, and the way LabVIEW works. Check the User Manual on this. Or, are you saying that in the subVI you check the values and see that you're not getting the same values as on your main VI?

Similar Messages

  • Using Open VI Reference to run a VI, on an RT target, with sub-VIs not loaded

    I've been using Open VI Reference and Call By Reference Node to remotely run VIs on my RT controller.  I
    usually wire string data to the vi path input, but this
    requires the VI to be in memory.  I understand (from LabVIEW help) that I can wire a path to this terminal and specify a VI that is
    not in memory, but is on the disk.  NI has an example that
    confirms my understanding.  I get errors when I attempt to do the same
    with VIs that have sub-VIs; I suspect that the problem is that
    the sub-VIs aren't in memory and that the top-level vi doesn't know where to
    look for them (because the paths aren't specified).  All of the sub-VIs are on the RT system (in the same directory), they're just not in memory.
    Is there a way to get LabVIEW to look for sub-VIs on the disk?  I don't want to rely on using a startup application and rebooting to get my VIs into memory.
    Thank you,
    Jim Carmody
    Software Engineer
    G2 Technologies
    www.g2tek.com
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

    Hi Jim,
    It sounds like you are going about calling VIs remotely the correct way.  It would be very helpful if you could post the errors you are receiving.  I also wanted to know if you saw the note at the bottom of the article that says your VI library must contain everything your top level VI calls.
    Eric A.
    National Instruments
    Distributed I/O Product Support Engineer

  • I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    I would like to know how i can create a bell graph with out using sub VIs, the data that i created consists in 500 readings with values of 0 to 100, i calculated the mean value and standard diviation. I hope some one can help me

    Here's a quick example I threw together that generates a sort-of-bell-curve shaped data distribution, then performs the binning and plotting.
    -Kevin P.
    Message Edited by Kevin Price on 12-01-2006 02:42 PM
    Attachments:
    Binning example.vi ‏51 KB
    Binning example.png ‏12 KB

  • Creating sub vis and projects

    Hi, 
    I am currently working on a project which involves a large chunk of Labview programming. I am new to Labview but am relatively experienced with C. I have designed an algorithm for C that I am currently trying to "translate" into Labview. The algorithm I have designed is a very modular piece of code, I have used a lot of smaller functions and called them in main rather than writing the entirety of the code in main. 
    My problem is that I don't really understand the difference between Labview projects and using one main VI to call other subVIs. I am unaware of whether I would be better off using sub VIs held together in one main VI or would I be better to use a Labview project. I am on a very tight schedule as it is a rather large project so I don't have a lot of time to experiment with my code-writing. 
    Does anyone have any advice on which approach is better/easier for an inexperienced user or if they are both pretty much the same?
    Gillian

    Projects and subVIs are completely unrelated concepts.
    The project is a means of organizing all the parts of the system you need to develop a program and build it into an executable.
    A subVI is just any VI which is used as a part of another VI.
    You need both.  When you open LabVIEW to start writing your code, create a new project and then keep your main VI and all subVIs and other parts like customized controls in the project.  Since you are an experienced programmer and have a modular design for the implementation of your algorithm, you can move those concepts directly to LV.
    SubVIs should be logical groupings of code such as the smaller functions in your algorithm.  The entire algorithm could be contained in a subVI which has those functions as subVis in the algorithm VI.
    Lynn

  • How to pass checkbox multiple value in URL as parameter?

    Hello,
    I have a checkbox in two page. The checkbox is based on a LOV and user can check more than one value at a time. The return value of the checkbox is like "ID1:ID2".
    I want to call another page with the same checkbox item and want to pass the checked value via the URL.
    This cause problem because checked value are separated with : that not work in URL.
    So, how can I pass checkbox multiple value in parameter via an URL?
    Thanks
    Jean

    Jean,
    Why pass it in a URL instead of just using what's in session state? On your second page, set the Source Type of the check box item to ITEM and enter the name of the check box item on the first page.
    Sergio

  • Pass Checkbox Parameters from HTML Form to a stored procedure

    I'm still looking for a solution to my forms problem. FYI, I'm not using Applications Express to build my application--I'm using straight PL/SQL. I need to know how to pass checkbox parameters from my Web form. I'm allowing folks to select one or more checkboxes on a form that will call a delete function to delete the selected records. What I read in Oracle's "Database Application Developer's Guide - Fundamentals" isn't helpful to me. If someone would point me to some examples, maybe I could see what I'm doing wrong. Here's what was written in "Database Application Developer's Guide - Fundamentals":
    All the checkboxes with the same NAME attribute make up a checkbox group. If none of the checkboxes in a group is checked, the stored procedure receives a null value for the corresponding parameter.
    If one checkbox in a group is checked, the stored procedure receives a single VARCHAR2 parameter.
    If more than one checkbox in a group is checked, the stored procedure receives a parameter with the PL/SQL type TABLE OF VARCHAR2. You must declare a type like this, or use a predefined one like OWA_UTIL.IDENT_ARR. To retrieve the values, use a loop:
    CREATE OR REPLACE PROCEDURE handle_checkboxes ( checkboxes owa_util.ident_arr )
    AS
    BEGIN
    FOR i IN 1..checkboxes.count
    LOOP
    htp.print('<p>Checkbox value: ' || checkboxes(i));
    END LOOP;
    END;
    SHOW ERRORS;

    I'm not sure I understand what your issue is.
    If your web form has the following checkboxes defined all with the same name:
    <input type="checkbox" name="attrib" value="1">one</input>
    <input type="checkbox" name="attrib" value="2">two</input>
    <input type="checkbox" name="attrib" value="3">three</input>Then you would create and register a procedure to handle the form submission that has a parameter with the name attrib of type owa_util.ident_arr e.g.:
    create or replace procedure handle_form(attrib owa_util.ident_arr) as
      iter number;
    begin
      for iter in attrib.first .. attrib.last loop
        -- do something with attrib(iter)
      end loop;
    end;
    /Now the one problem with this handler (or any form handler for that matter) is that if the user selects none of the check boxes, or no value for any of the expected parameters, the handler would be called with some parameters missing or with out any parameters passed to it, and the call will error out.
    To get around that you need to provide default values for all the parameters passed to your handler including the ident_arr parameters, however with ident_arr parameters that's difficult to do with standalone procedures. If you place your procedure in a package you can define package level variables of the appropriate types that can be used as default values:
    create or replace package my_web as
      empty_arr owa_util.ident_arr;
      procedure handle_form(attrib owa_util.ident_arr := empty_arr);
    end my_web;
    create or replace package body my_web as
      procedure handle_form(attrib owa_util.ident_arr := empty_arr) as
        iter number;
      begin
        for iter in attrib.first .. attrib.last loop
          -- do something with attrib(iter)
        end loop;
      end;
    end my_web;
    /now when you hit the situation where the user doesn't select any check boxes, the call to handle_form won't err out due to missing parameters, and the empty_arr won't have any elements to iterate over so the loop in the procedure body will be fine and you will be able to retrieve each selected check box value from the attrib array when you iterate over it.

  • How should I share a cluster across several sub .vis? Best practices? Current problems...

    I'm trying to share a cluster across several sub .vis.  I've written a save / load settings function that basically stores these settings in a static variable (full .vi attached):
    Questions: 
      1. Is this an appropriate practice?  (using a sub vi to share data)
      2. My program settings appear to be lost occasionally and reset to their default values.  This bug is rare, and it's hard to see what's causing it.  Could this be caused by my "save / load settings"?  Would this .vi result in race conditions or something weird if I use it in many places (and sub vis)?  I've disabled reentrant execution.  
    The "save / load settings" vi above uses a sub vi to initially read the settings from a binary file and save them each time they are changed (saved).  I initialize the "save / load settings" by loading the settings from text the first time this function is called.  
    Thanks!
    Attachments:
    Save and Load Settings.vi ‏82 KB
    Save and Load Binary File.vi ‏62 KB

    What you are doing is generally called a LabVIEW 2 Style Global or an Action Engine. It is a valid way to store data for use across subVIs. Rather than use first call why not have a specific action to initialize the data? The code is a bit more readable. Though you can use first call as you have.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Running two sub vis in parallel

    I need to run two sub vis of a main vi simultaneously in parallel.
    one sub vi is to run a demo and the other subvi is an application.The demo should run as a small window and the application should run in background

    As i said
    "If you have the demo vi as floating and the other vi as Default (not floating), the demo vi will allways stay on top"
    If you still have problems, just post your vis, (without any unnecessary code), or ask something specific
    Message Edited by Pnt on 04-21-2009 08:18 PM
    Attachments:
    Clipboard-2.jpg ‏44 KB

  • Show front panels of sub VIs when running a EXE (build application)

    I've created a exe file and it works fine. However, it only shows the front panel of main VI and I can not open sub VIs (it looks like they are all hidden). I know it can be done by creating a library file along with this exe file, but that's not what I want. I want to create a single exe file that shows several front panels, and that can be run with run time engine. Is there any way to show front panels of sub VIs by running a exe file?

    In the development mode, how are you displaying the front panels? Did you right click on the subVI and select SubVI Node Setup and choose 'Show Font Panel when called/Close afterwards if originallly closed' or did you choose the same options from VI Properties for each subVI. If the second, then the app builder will automatically retain the front panels of the subVI. If you chose the first option or if you are using VI Server to open a front panel, then the default setting in the app builder is to remove the front panels. You would then have to go the VI Setting tab in app builder and edit the settings.

  • Is it possible to unlink sub VIs to prevent affecting other projects

    We are running a validation with different flavours of the same IC which require using the same set of VIs with slightly different settings. In order to avoid confusion for users who are running with one type of silicon we have decided to make a copy of the LabVIEW code in a different area of our project folder on our network. We are concerned that LabVIEW will still find VIs from, say Project A, and use them for Project B, which may or may not cause problems when re-running tests for Project A as some of the VIs may need to be modified for Project B.
    We have looked at creating different sub folders and unmapping network drives but are still concerned that LabVIEW will be smart enough to find the Project A files when it should pick up the Project B files. The issue is that we may need to edit some of the VIs for Project B but don't want them to be modified for Project A.
    Is there a "One-click" method of unlinking all sub-VIs for Project B and when we load the main VI for Project B we can then manually point to the correct files so that Project A will not be affected and we can still run the VIs for Project A in the same environment with the same network drives mapped?
    This is complicated to explain so let me know if you need clarification.

    I don't think there is an automatic way of doing this. (someone else may know better)
    I would do a "save as" on the project, duplicate all files elsewhere, then add a prefix to all of your VI filenames.
    I tend to do this for projects that re-use old code too. Add a project specific prefix to the VIs and then if I decide to modify things in the new project I don't break old code.
    Edit:
    Another thought: If it is just settings you want to change rather than the actual code, maybe you could use a config file of some kind to load in the values that are going to change with your different setups. Then you use all the same VIs but just change the config file between different setups.

  • Required connections to sub vis automatically

    I remember some radio button to make connections to sub vis automatically required. Unfortunately i don't find it anymore. Can you give me a hint?

    Is this what you're looking for?
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • Examples for labview having sub vis

    I am making some examples for labview adding to labview example directory (..\LabVIEW xxxx\examples\my own examples).
    My examples contains some sub vis. As i copy example files and sub vis to (..\LabVIEW xxxx\examples\my own examples) then i see all files in example finder example files and sub vis. Is there any method that doesnot show sub vis in wxample finder. I will be very thank full to you NI. Sorry if i am duplicating post.
    regards

    I have a couple of thoughts about your questions:
    1) When browsing by Directory, yes you will see subVIs. A common practice is to put all your subVIs in a separate folder labeled 'subVIs'. That way they don't look mixed among your examples.
    2) Darren is correct that the bin3 file format is the same for all versions of LabVIEW, and that the bin3 file you created for LV 2010 will work in 2011. Notice he mentioned to put your bin3 file in [LabVIEW 20xx]\examples\exbins. This is important for LabVIEW 2011 and beyond.  In LabVIEW 2010 and prior we would look anywhere in the examples folder for bin3 files.  To speed up the launch time of the NI Example Finder, starting in LabVIEW 2011, you must put your bin3 file in the \examples\exbins, instr.lib, or user.lib folder.  You can find this information if you click the Help button from within the Prepare Example VIs for NI Example Finder.

  • Synchronization of two sub-vis!

    I am working under LV 7.0 and I have to acquire videos through FireWire. The cameras are included into LV via an ActiveX control. So far so good. Because I have to control 2 cameras I have to start the capturing simultaneously. I have written to sub-vis where I initialize the cameras and start the capturing. Now I am wondering how to synchronize these sub-vis because sometimes the files have different lengths, up to 5 frames or about one second. Is there a way to get this thing to work?
    Thanks a lot in advance,
    Henning

    Hi Henning,
    Please take a look at the example included with LV that can be found at
    Help >>> Find Examples...
    Optimizing Applications >>> Syncronizing Tasks >>> Rendezvous with SubVIs.vi
    The help for this VI follows
    This VI is a demonstration of using a rendevouz. It creates a rendezvous of size 3 and then calls three parallel subVIs using this rendevouz.
    These subVIs use the rendezvous to synchronize the beginning of their loops. Each one displays integers to a graph. Finally, they all use the rendevouz to exit at the same time.
    Please note that this will get sub-VI sync'd up at the begining of each cycle. I have to raise the concern that the actual interaction of the sub-VI's with their respective activeX service may end up se
    quential if they all execute in the user interface thread.
    The technique illustrated in my cited example should get all of your files sizes to match up.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to creat multiple sub VIs'

    I have a VERY large VI that finaly crashed due to the large size. What is the best way to create "Sub VIS"? I have almost 800K of code. Should I create all the sub vis and then add them to my Project? I want the program to call the sub vis automaticaly.
    Thanks
    Philip

    Hi Philip,
    Backups:
    As Lynn (johnsold) said, local backups are a minimum requirement.
    A service like Dropbox is better in case of computer crash.
    Note: Temporarily disable Dropbox syncing when doing builds in a Dropbox folder as this may cause builds to fail.
    The best solution is true source control like the free TortiseSVN.
    For sub vis I suggest:
    Identify code sections that perform one specific function. This makes a logical sub vi. If you can easily come up with a name to describe the
    section (like "Parse Input String" for example) then you are on the right track. With some practice you will be creating sub vis that can be used
    in other programs and save you time in the future. This is a good reason to NOT include unrelated code in a sub vi just because it will fit.
    Take note of the number of inputs and outputs in the code section. Ideally you want a small number of inputs and the same for outputs (3 or 4). Use clusters to reduce the number of I/O items.
    Standardize on a connector pane layout - this makes wires line up better. The 4224 pattern works well. When LabVIEW creates sub vis it only creates the number of inputs and outputs that are required. So you will normally have to change the connector pattern and rearrange the controls and indicators every time you create a sub vi.
    Include error in and error out in their standard places even if you don't need them for the particular application. When you use that sub vi later
    you may need them.
    Good practice is to use Type Defines for controls and indicators that go to more than 1 place. In your case, it is a jugement call if it is worth the trouble to do this on an existing program. Once you start using sub vis more, Type devs become very important. If you don't use them, changing a data structure will require manually changing every sub vi that uses that data structure.
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • Custom run-time menus within dynamically called sub-VIs?

    How do you use custom run-time menus within sub-VIs that have been dynamically called? I'm using Labview 6.02.

    Since you say within subVIs, I am assuming that you have the subVIs open their front panels when called. Each subVI must have the RTM defined when the subVI is created. You can use the same RTM for each one (use the open function in the menu editor).
    If necessary, you can dynamically add and remove menu items using the Application Control->Menu functions. I have some subVIs that add items to the main RTM when they are loaded and remove the items when they finish.
    Rob

Maybe you are looking for

  • G5 locked up after 10.5.8 update attempt

    Ran the update on my MacBook. No problems. Figured it was safe to do the same on the Dual G5. Computer was working beautifully on 10.5.7 with no problems, so it should be fine with the updates. It is a Mac after all. Not so. Here's the scenario: Ran

  • Questions in Lync 2013 HADR

    Hi Team, One of the customer raised the query: In our scenario, we want Active/Active High availability between different geolocations with RPO=0 and RTO near zero (seconds). Questions: 1. Isn't this possible with pool pairing and database availabili

  • Is there table/Report history including timestamp & date for activity type created?

    Hi Guys I have an audit request for activity type that should include Date of creation/change and timestamp for them, but I don´t know if there is a table or report that I should run. Actually in KP26 in section line item shown the dates but by activ

  • Problems with Password reset

    Hi, I was wondering if anyone can see anything wrong with this code, as it does not seem to be working. Once the email is entered, a password should be generated, and should be sent to the users email address (if it exists in the database). Or return

  • Message in Real Time???

    how do i see the messages going out in real time?