Can I control front panel items from a sub VI?

Hi all,
After taking the Intermediate I class, I have been trying to follow the methods of using modular programming, but there's one thing I haven't quite figured out how to do. How can I change a front panel display from within a sub VI? I have a menu selection that I wish to change - can I simply input a reference to it or something like that?
Thanks much,
Jason

All you need to do is to pass a control reference to the subvi, and then, in the subvi, to use a property node to modify whatever you want (well, almost...) on your control. Ask if you have more trouble and need an axample...
CC
Chilly Charly    (aka CC)
         E-List Master - Kudos glutton - Press the yellow button on the left...        

Similar Messages

  • Controlling front panel properties from within a statechart

    I have a user interface that I am trying to put into a statechart.  On the user interface I have a bunch of buttons (controls) and indicators.  To populate the indicators I am getting data back from 2 sources (USB and RS 232).  For this, I have made shared variables for the data returning from the sources but this only works for indicators as far as I can see.  Anyway, I have the software working and now that I am trying to go back and place the code into the statechart format to clean it up I am running into issues.  Since the statechart does not run inside the labview panel I can not access the front panel properties of controls.  Basically, I am using the statechart to control which buttons are active on the front panel (this is dependent on the state the user is in).  Also I am using the states to control a LabVIEW “tab control” to determine which tab to display.  For instance, I have an operate screen and a calibrate screen.  Depending on which state the operator is in, different controls are active (I don’t want the user to accidently change an item on the operate screen while in calibrate).  Is there a way to do this inside the statechart structure?  

    You don't actually copy the reference itself. Rather, you want to add a control of the same type as the reference to your statechart Inputs.ctl. You can get such a control by right clicking on the reference you created and choosing "create control".
    Then you pass in the reference to your specific control into the statechart via the inputs terminal. You can then talk to this reference via VI server and manipulate the original control. 
    If this isn't clear probably the best thing to do is to look in the LV help index for the keyword "control references" and read about "passing to subVIs". Passing a reference to a subVI is very much like passing one to a statechart so most of this is relevant.
    Hope that helps.

  • How can you "enable front panel dataloggin​g?"

    In the Labview User Manual, it says that "You can create and read datalog files by enabling front panel datalogging." How do you go about "enabling front panel datalogging?"
    Any help would be greatly appreciated.

    From a LabVIEW only perspective, you can enable control (front panel) datalogging through the menu Operate>Data Logging->. If you bind a log file to the VIs front panel it will generate a binary file with the state of the controls in it, when you execute Operate>Data Logging>Log... (I could not find a way to execute this Log... by VI server programmatically - Maybe someone else?)
    From a LabVIEW DSC perspective you can generate a Logos Remote connection to a tag (e.g. with the HMI Wizard). And when you have enabled that this tag has to be logged, the LabVIEW DSC Engine will store/log the value into the Citadel database.
    Hope this helps
    Roland
    PS:
    Not updated however maybe helpful:
    80E?OpenDocument>Using Enable Database Access to Retrieve Data from a LabVIEW VI's Log File
    Front Panel Data Logging and Retrieval (old Example)

  • Update a front panel indicator from a loop inside a called vi. Without exiting

    I am looking for the best way to update some indicators from within loop within a called .vi.
    I need to update the front panle without exiting the loop.
    I am able to use functional global vi to update the values of front panel indicators from within my nested loops, but I am looking for the best way that these values can be read to update my indicators.
    Thanks

    Or a cluster of references, that way each reference can be named, and can be different types to match the respective indicator.
    There are also methods where you can just send in a VI reference, and in the subVI traverse all the controls and search for the appropriate references by name.
    Take a look at this long nugget.

  • Dialog box problem when controlling front panel remotely

    I have encountered an issue with the Web Publishing Tool- I have a VI that calls a subvi that uses the Promt User for Input function.  When controlling the front panel from another computer I get a message saying that you "Cannot control subVI front panels remotely" and points you to the machine actually running LabView to enter the information in the Prompt User dialog box.  I set the subVI front panel to show when called, which does show the front panel of the subVI, but still get the error related to the dialog box.
    Is there any way to make this work?  Am I missing something obvious?
    Thanks,
    Nathan

    Hi Nathan.
    There are some limitations with dialog boxes in remote applications.  This tutorial has some good examples and explanations on functionality to avoid with web applications.  Additionally, the LabVIEW online Help offers some general guidance for Viewing and Controlling Front Panels Remotely, which may help you in further developing your application.
    Hope that helps!
    Lorielle P.
    Applications Engineer
    National Instruments

  • HT1600 can I control my apple TV from computer

    I misplaced my remote - can I control the apple tV from my iphone or computer

    You can use the remote app to control via iPhone. Have you setup home-sharing?
    http://itunes.apple.com/ca/app/remote/id284417350?mt=8

  • Can I catch front panel events of a vi which calls a subvi in the subvi?

    Hello,
    I have a vi with a picture control. This vi calls a subvi. Can I, while
    the subvi is running, catch frontpanel events from the calling vi in
    the subvi?
    Background:  The subvi should do all necessary tasks to draw
    things in the picture control of the calling vi, but depends on things
    like mouse moves and button clicks on the picture control of the
    calling vi.
    I know that I can generate user events in the calling vi which can be
    caught in the subvi. But I developed the subvi as a standalone test
    version, and want to include it now in a larger project, without to
    much changes to the larger project.
    I'm using Labview 8.0.1
    Best
    Armin

    Hi devchander,
    > It will not be possible to catch the Front panel events of main VI from inside a sub VI using an event structure.
    I don't think Armin want's to do this - it seems he's trying not to modify existing code - but if he does, it is possible - and an example is attached!
    ( just run the example as a sub-vi, it will create a string of mouse-direction-codes while the left-button is held down over caller's FP )
    Hope it helps!
    Message Edited by tbd on 08-17-2006 11:45 PM
    Message Edited by tbd on 08-17-2006 11:48 PM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    MouseTrap.vi ‏138 KB

  • Controlling Front Panel LEDs

    This is hopefully a simple problem, but I can't figure out what to search under.  I have a program with two loops (Z Only Test and Full Test in Tester Program v2).  They do not run at the same time.  I would like both loops to interact with an LED on the front panel (Testing).  How is this done?
    Under Z Only Test, it works fine.  I tried to connect it to the sequence (Full Test), but it tells me I can't do that.  On odd sequences, for the most part, I would like to have the LED light (TRUE).  On evens, off.
    Attachments:
    code.zip ‏143 KB

    rbergs wrote:
    Do you mean make the LED a shared variable?  How do you do that?  I clicked on it and changed it to a variable, but I thought that was like one of the others that I have.  I'll give it a try and see what happens.
    I would assume whatever works for this would also work for numerical displays as well.
    No.  I'm not even sure exactly what you mean by clicked on the LED "and changed it to a variable."
    Right now you have only a single place where you use that LED.  It has a terminal node on your block diagram within a while loop.  I don't know how that fits into your overall program architecture as your VI is quite expansive.  (Two tips, 1.  Don't use stacked sequences.  2.  Look into a state machine architecture)
    All that happens at that point is your read from a shared variable called "Testing".  I'm not sure from where else in your VI that you want to interact with that front panel indicator.  Or whether it will conflict with the already written piece of code.   I also don't know where this shared variable is written to. But the first idea is have the other sections of the code write to the shared variable and let this one update the front panel indicator.
    The second idea is to create a local variable of the front panel indicator.  Right click on the terminal within your code and select Create / Local Variable.  But again, you will have to be careful with conflicts with the different portions of your code writing to the LED.  This is also known as a "race condition".
    (Yes you can use either shared variables to store numeric data, or create local variables of numeric controls or indicators.)
    I'm a bit nervous about your code.  It looks like you have a decent amount of LV experience as you have created quite a sophisticated VI there.  However, it doesn't seem like it is easy to expand or modify.  It takes up quite a bit of screen real estate.  It doesn't use any subVI's even though a lot of the code seems to be duplicated or very similar.  And it seems like it uses a lot of shared variables, probably more than necessary.
    Message Edited by Ravens Fan on 05-29-2009 01:38 PM

  • How can i open front panel of a vi and run it

    Hi
    I have a vi that i call multiple times from another vi, however i want it to open the front panel on some calls and not on others.  What is the best way to do this?
    I have come up with a way and was wondering if this method was okay or is there another method that might work better escepcially since i am eventually going to create an application out of it and hope that no problems pop up then
    Unititled 1 calls Untitled 2 where with one call it opens and runs Untitled 2 while with the other call it simply runs untitled 2.vi
    What I did was i changed untitled 2.vi window appearance to dialog but i deselected the show front panel when called, so by simply calling the subvi form untitled 1 it works.  Unititled 2 runs but does not open
    Now with another call i want to open and run untitled 2.vi so by looking the attached vi you can see what i have done
    Again if there is a better method that would make my vi's more efficient i would greatly appreciate it.
    Reza Sed
    Attachments:
    Untitled 1.vi ‏24 KB
    Untitled 2.vi ‏10 KB

    What you did, in theory, is the correct way to do it.  However, you should move the front panel open and close into Untitled2.vi and have a boolean input as to whether to show the front panel or not.  This way, your calling code is cleaner, and you don't have to reproduce the code everytime you want to call the subVI and show the panel.
    If you were to use Untitled2 in another project, then you woud have to go back and look how to implement the showing of the front panel in your other code.  If later, you were to decide you want that VI to be maximized, then you make one change in the VI, and not in every place you ever call it showing the front panel.

  • Can not open front panel sub VI when running an application VI.

    When I create an application of my program a problem occurs. When I select options (press a button or so) from the main front panel that should result in a popup menu (sub VI cal) LabVIEW indicates that something is happening but the front panel does not open. The mouse indicator changes to the time glass so LabVIEW is doing something but the window of the sub VI does not open.
    The problem has the same characteristics on several places. There are some sub VI front panels that opens but I ca not find the reason for why these open and not other.

    Hi
    there are three ways trhough which you can force a subVI to show its front panel
    1. open the perticular SUB VI
    click File->VI properties select window appearence catagory.
    click customize button and select "Show Front Panel when called" and "close afterwads if originally closed" check boxes
    save the VI
    whenever you use this Sub VI every time it will pop up front panel
    2. dont perform the changes suggested in option 1. place the instance of subVI in your main application and if you want that instance to popup a front panel then right click on subVI and Select "SubVI Node Setup" again select "Show Front Panel when called" and "close afterwads if originally closed" check boxes
    with this option only certain instances of SUB VI will cause pop up to occur
    3. this is the most flexible option. use invoke node to show front panel. in invoke node select show front panel method to popup the VI and use close front panel method to close the pop up window.
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

  • How can i remove the menu item from a menu

    how can i remove the JMenuItem from a JMenu at run time.
    thanks in advance

    This is in JMenu from the api
    void remove(JMenuItem item)
    Removes the specified menu item from this menu.
    You must download the api! it helps a lot!
    You can do that or if you need to access it again just set it visible(false);

  • Can't remove Front Panels in Application Builder

    I have had a few issues using Application Builder (v7.1) in regards to it removing or not removing front panels for my subvi's when I was trying to compile. Here are the conclusions I came to if anyone else runs into the problems I had.
    Problem 1) Some of the front panels were being removed for dynamically loaded VI's, which were not set as dynamic VI's in the Application Builder, but which were static-linked VI's in the program (so they were loaded in memory as linked subvi's but called dynamically). When the Application Builder decided to remove the front panel for those VI's, there was an error when loading them dynamically.
    Problem 2) Some of the front panels were NOT being removed for subvi's that I didn't want to have their front panel built into the compiled program. Loading front panels that are not needed uses extra memory, but there was no way to change the option to not load the front panel for certain particular subvi's in Application Builder--the option was grayed out.
    For problem 1, I decided not to worry about linking the files dynamically in the Application Builder, but to just make sure the Application Builder would include their front panels. For problem 2, I had to figure out what was making Application Builder force the front panels to be included when I deemed it unnecessary, so that I could fix them not to be included. Basically then, going through my VI's that were forcibly included, I came up with a list of stuff I began checking for each time I would run into one where I didn't want to include the front panel. I have attached my list to this post.
    My solution for problem 1 was then to use a customized appearance for my static-linked / dynamically loaded VI's, and disable the menu bar (forces the front panel to be included by Application Builder without changing appearance, since I never actually see the FP). My solution for problem 2 was often to remove property nodes referencing text on the front panel controls. Sometimes I was able to perform a numeric->text or enum->text conversion instead of referencing the text of the control itself, and sometimes I realized I didn't want anything to change and that it was ok to include the front panel so I could (for example) get a list of strings for my enum control.
    I have attached the reference list I came up with of things to check for to make sure your VI properties are set correctly if you are trying to get Application Builder NOT to include the front panel of your subvi. The list might not be complete, but it's helped me to narrow down things very quickly and find the problems I was having.
    Attachments:
    ThingsToCheck.doc ‏61 KB

    m3nth wrote:
    Problem 1) Some of the front panels were being removed for dynamically loaded VI's, which were not set as dynamic VI's in the Application Builder, but which were static-linked VI's in the program (so they were loaded in memory as linked subvi's but called dynamically). When the Application Builder decided to remove the front panel for those VI's, there was an error when loading them dynamically.
    This is expected behaviour. The application has no way of knowing that these VIs will at some time be called dynamically. That would require analysing and understanding the entire program and in cases where you calculate the dynamic VI to be called at runtime it still wouldn't be feasable to do so.
    m3nth wrote:
    Problem 2) Some of the front panels were NOT being removed for subvi's that I didn't want to have their front panel built into the compiled program. Loading front panels that are not needed uses extra memory, but there was no way to change the option to not load the front panel for certain particular subvi's in Application Builder--the option was grayed out.
    There are several reasons why a front panel is needed. One of them is when the VI is called dynamically, even if the FP is never displayed and AppBuilder will account for that for VIs which have been added as dynamic VI to the project.
    The other is when a VI uses some Property Nodes or Attribute Nodes as they are called now.
    So to solve your problem 1) you could also just drop some property node in the diagram of such VIs and be done with it.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can I add and remove items from the bookmarks toolbar?

    I want to remove items from the bookmarks toolbar and add ones that I use on a regular basis. How can I do this?

    See:
    *https://developer.mozilla.org/en/Chrome
    *http://en.wikipedia.org/wiki/User_interface_chrome#User_interface_and_interaction_design

  • How can I control an iPad screen from a Mac

    I have a friend who needs help using her iPad.  She lives 1500 miles away.  Is there any way I can control her iPad remotely from my iMac?

    "Control" would be ideal, so I could take complete control of her iPad and then show her how to do things as if I was sitting there.  Think "Remote Access".
    But "Share" would be almost as good.  At least then I could see her screen and be on the phone explaining what to do and watching her cursor movements.
    The way we try to do it now is she holds up her iPad during an iChat (video) session, but the screen is too hard to see to be of any use, and helping her this way is virtually impossible.

  • Can jmf control 4 ports input from falcon plus framegrabber card?

    Hihi,
    I am not sure if the jmf can be used to control or stream video from a frame grabber card with 4 ports? this is falcon plus card from ids-imaging. can some one help me to solve my doubt? thanks.

    I'm so stupid... I should've thought about iptables... I'm reconfiguring them now, thank you very much!

Maybe you are looking for

  • What can I do to fix my screensaver that no longer works since I downloaded the last update you sent?

    I am on Windows XP. I downloaded your latest version that you sent me a notice of, and now my screensaver doesn't kick in ever. I've reset it. I've redownloaded Firefox, but it still isn't working. Is there a fix for this problem?

  • Photoshop cs4 new system integration and network problems

    Hi there! I am new to the forums, but I will just dive right into my issue rather than introducing myself: I recently did a new hardware install (16 TB of clustered storage) at a mograph studio that are heavy users of Photoshop CS4, amongst other thi

  • Counting down to zero from a specified number

    I'm sure this is a very simple thing to do, but I can't figure out how. I want to count down from a specified number to 0, then restart counting at that orginal number. The trick is that I need it to place it in a case structure, and have it restart

  • Iphone cant connect to password protected networks

    Hi, my iphone connects to non password networks very easily. However when its protected by a password i can't log in even if the hep key is correct. I've done everything from resetting the network settings, typing the ip address, and so on. Thank you

  • Log Polar transformation

    I am using the IMAQ Vision. Let me know how to go for the Log Polar conversion of the image and do the FFT on the Image