Reference to control on main front panel fails when subvi front panel is closed?

Hi All,
I'm experiencing an odd bug. In my code, I use a subvi to control a piece of hardware. This subvi has controls for all of the functions of my hardware.
I'm changing the value of one of these controls from my main front panel by running a reference to a knob on my main front panel into the subvi, grabbing the value of the knob with a property node, and then updating the value of the subvi control using a signaling property node.
This works fine when my subvi front panel is open but fails to work at all when the subvi front panel is closed.
I'm new to labview , so any help is appreciated.
Thanks,
Arpan
Solved!
Go to Solution.

What is your LabVIEW version?
Front panels that are not shown are typically not updated and might not even be loaded into memory.
The presence of certain code elements (e.g. property nodes) often forces the front panel to be in memory even if it is not shown, but I haven't studied it in a long time so there might be subtleties. Maybe somebody from NI can give more details.
If it does not work unles the FP is open, open the front panel minimized to avoid distraction.
Can you attach some code? Maybe there are better ways to do all this anyway.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How can I get a reference to all controls on a front panel of one type )for example of the type Text Ring?

    I'd like to set the strings[] property of all the Text Ring controls on a front panel at once without creating a property node for every text ring. How can i do that?

    > How can I get a reference to all controls on a front panel of one type
    > )for example of the type Text Ring?
    >
    > I'd like to set the strings[] property of all the Text Ring controls
    > on a front panel at once without creating a property node for every
    > text ring. How can i do that?
    This is likely more complicated than making property nodes for each
    ring, but you can do it. Make a subVI that takes in a panel reference,
    reads the array of control references, loops through them looking for
    rings, and modifying the Strings[] property on each ring.
    The part of this that will probably be the least obvious, when you
    have an array of control references there are two ways to find out
    if an element is a ring. You can read the classID and compare it
    to the cla
    ssID of a true ring control. An alternative is to cast
    the control reference to a ring control using a Cast to more specific
    node and wire the error out to a case structure. The error case is
    where the objects that aren't rings will go. The success case case
    where you will have a valid ring refnum that you can use to modify
    the strings.
    Greg McKaskle

  • Reference to control different from reference panel- controls[]

    Hi, I get references to all my objects on front panel from the properties panle->controls[]. In my program I use an Event case and the reference to the contol passed from the Event Case is different fom the reference obtained by panel->controls[]. I need this to be the same since I want to use this reference to search for match in ref array from panel->controls[] get the array index of thet control

    Do you have tabs\arrays\clusters?
    The references from controls in those (and possibly other structures) are not returned when you use the Controls[] property.
    You have to go over all the references and if any of them is one of these structures you need to cast it to its specific class and extract its Controls[] property to get to the controls in it. This needs to be done recursively until there are no more structures.
    I seem to remember seeing a VI somewhere that did this (maybe OpenG?), but I can't seem to find it. Maybe someone else knows.
    Try to take over the world!

  • How to show in the main front panel the progress of each sub Vi ?

    my program has many sub VIs, i wish to show in the main front panel the progress of each sub Vi; what is the best way to do that?
    atleast i need to show that each sub vi is completed, [can i add details on the main front panelsuch as: filename that is being read by a subVi, graphs plotted by a subVi, etc..]
    can i display a graph from a subVi on the front panel of the main Vi?
    what i hv done is attched as picture.
    Solved!
    Go to Solution.
    Attachments:
    Capture4.JPG ‏152 KB

    as suggested...pass references and cntrl references
    Spoiler (Highlight to read)
    Attachments:
    main ref cntrl.zip ‏27 KB

  • Multiple subvi's in main front panel

    Hello and welcome (it is my first post here),
    sorry if such subject was already risen, however I don't know how to specify it exactly in terms of LV nomenclature (I'm a beginner in LV) what makes it quite difficult to search the forum.
    I need to create an interface with user specified number of input channels (specified during application work, so dynamic loading is necessary). Each channel is to be controlled by subVI. I'd like to load panels of all running input subVI's into some container in a main front panel (similarly to subpanel, but loading multiple VI, not single one). Is there a container capable of this? Is it at all possible in LV?
    Regards,
    kaolpr
    Solved!
    Go to Solution.

    You can use multiple subpanels. Unfortunately the number of subpanels must be set during development. You could create a method of cycling through your various channels. This would involve loading and unloading the multiple subpanels that you do include in the UI.
    Another alternative would be to use a table or something similar. Have your subVIs post updates to the UI code via queues, notifiers or user events. Tables are much easier to manage when your number of elements varies. If you need to have the UI pass information to the subVIs it can also use queues, notifiers or user events.
    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

  • How to update the variables in sub-vi on main front panel?

    hi~
    The problem is to display variables in Sub vi on main front panel.
    What should I do?메시지가 04-07-2005 03:14 AM에 julitan에 의해 편집되었음
    Attachments:
    main_.vi ‏14 KB

    You probably want the slide to update while the while loop in the subVI is running, so you can't simply wire an output from the subVI to the main VI. So you are going to have to use some form of communication between the two VI's other than a hard wire. For this simple case I think I would recommend using a global variable. You could also use DataSocket or even write the value to disk, but using a global is probably the easiest method for this case. I've attached your modified VI's. Let me know if this works for you.
    Robert Mortensen
    Software Engineer
    National Instruments
    Attachments:
    global.zip ‏45 KB

  • Analog output to the DAQ that changes when controls on the front panel change

    I'm using the PCI-6024E, and trying to output an analog waveform that can change when one of the two controls on the front panel change. It outputs fine setting it to continuous output and using a simple while loop around the "Is Task Done" VI, but if I put the "Write" VI in the while loop, it doesn't output steadily. I then tried to use an event structure, so that I'd only have to write every time something on the front panel changes, but for some reason it was writing finite samples, even though I set the Timing VI to continuous. I looked around the NI site, and found an article about this with an example. I tried to change it around to use my waveform, but whenever I run it, I get a memory underflow error. Has anyone needed to do this before? Thanks in advance.
    -- Josh Matloff

    Hi Josh-
    It looks like you forgot to post the code still, but I'll take a stab at the problem anyway. It sounds like you're looking for a way to update a continuous waveform at runtime.
    You will need to stop the task in order to replace the write buffer information, but this will only be a small gap in operation. I have attached a modified LabVIEW shipping example that shows how to use value change events for any of the pertinent waveform parameters to either programmatically stop the task, replace the buffer, set timing and restart or to just pass the task information straight through. This will lead to continuous operation with no breaks at the output.
    Please let us know if this clears up your questions.
    Thanks-
    Tom W
    National Instruments
    Attachments:
    Cont Gen Voltage Wfm-Int Clk with Runtime Update.vi ‏134 KB

  • Pressing on the Table Control locks the front panel in a certain state

    Hello everyone!
    I have following problem. I have a very simple state machine with two cases. In the Idle case there is an event structure receiving input from a Table Control. When pressing Run the Vi enters the Run state. To exit the RUn state I have a Finish button, but IF I during the running state press anything on the Table Control the entire front panel will lock. Disabling the Table Control in the running state doesn´t help in the same way it helped for Button 1 and 2. Any help would be appreciated. I have tried unsuccesfully with the Registering and Unregistering event functions.
    Attached is a simplified version of the problem. Thanks in advance.
    Solved!
    Go to Solution.
    Attachments:
    Event lock problem.vi ‏22 KB

    Hi, RealBjörkis !
    I ran your VI and I saw a few problems, try to keep your controls outside the events structure, also do what said P@Anand previously.
    Here is your VI with some corrections. (Hope it fix the problem)
    Good Luck.
    Attachments:
    Event lock problem.vi ‏23 KB

  • Obtaining References of Controls Inside of Tab Controls

    Does anyone have a way to detemine the id/index number of a control on a tabbed front panel? If there is no front panel I can use the menus: Edit, Set tabbing order. Then I can use this index in the block diagram of a sub-vi to update the control on the main fornt panel with data from the sub-vi as it runs. Yet, if you do the same thing on a front panel with a tab display, only the tabbed pages are indexed, as opposed to the individiual controls and displays. 
    Thanks.
    Brian

    I have a way of updating a control on the main vi by using an open vi reference to the main vi in my sub-vi (see code below). This is working fine for situtations where the main vi does not have a tab control. With this vi that you gave me, how can I reference a specific control in the table, such as the 3rd control on the 3rd page..and more generally the n-th control on the n-th page such that my "2" below is correct. Currently I just wire a numeric to an index array and the value is then sent to that control. the trouble that I am having is in the "get all controls" & "pick the control" part below. With the tab control on the front panel, I cannot simply wire a numeric like I did below with the "2".

  • How can i get the reference to Controls from VI-reference

    Hello,
    i have a VI with ~5 controls on it.
    And with the Object "Current VIs path" and "Open VI reference" i can create a reference to the current VI.
    How can i create now a reference to the controls? (Starting with VI-reference?
    Of course i know how to create directly a reference from a control.
    My idea wasm that there areperhaps properties like:
    - Number of controls
    - Name of control
    - Type of control (string, bool. number...)
    Is this somewhere there and i just dont find it?
    Thanks for your help

    Once you have the VI Refnum, it's a two-step process. Wire the VI Refnum into a property node and get a reference to the Front Panel. Output the Front Panel reference into another property node and select the property Controls[ ], which outputs an array of references for all the controls on the front panel.
    Message Edited by Jarrod S. on 04-20-2007 11:06 AM
    Jarrod S.
    National Instruments
    Attachments:
    get_ref.PNG ‏5 KB

  • How can I close a remote front panel by closing only the browser window?

    I control a remote front panel in a browser (from the client PC). If I don't use the 'close' - button in my program to end the remote front panel, but instead of this the 'x' of the browser window (in the right bottom corner), my program won't be close, it continues on the server. Do you know how to end a VI by closing only the browser windows?
    Thanks for any help!
    wolfe

    I found the examples. Thanks.
    But I could not find a solution yet. Now I know how to end a VI by clicking on the x of the VIwindow.
    My problem is, to end a VI by clicking on the x of the BROWSER window after I loaded and controlled a remote panel VI in a browser (e.g. IE).
    If you have any ideas ... I'd be happy.
    Thanks for your help.

  • Main "Play Control" volume changes on its own when I open and close WinDVD or Winfast

    Main "Play Control" volume changes on its own when I open these programs, and when they're closed the main volume resets to where it was before the program was opened.
    Surely I'm not the only one who has had this problem before.. I've had the problem with both Creative soundcards I've owned, before and after different drivers installations.
    It can be very irritating and can potentially lead to damaged speakers if I'm not paying close attention to what my various volume knobs are set at before and after I open these programs.
    I appreciate any and all input, thankyou.

    I had to edit to reflect its Mavericks 10.9

  • How can I control the direction of  Panel Page  menuTabs (menu1) ?

    Hi all,
    in ADF FACES - JDeveloper 10.1.3
    how can I control the direction of Panel Page menuTabs (menu1) either from left to right or right to left ?
    regards,

    In the adf-faces-config.xml file you can add a right-to-left tag.
    (Right click on the structure window and choose insert inside...)

  • Problem updating a control on one panel based on a value change in another control on a different panel

    Hi,
    I am trying to update the value of a control on one panel when the value of another control on a different panel is changed.  The two panels are saved in two different .uir files, so there are two associated .h files generated by CVI.  The problem is that, inside the callback function for the control that is being modified (Ctrl_Id_A on Panel_A), when I call SetCtrlVal(Panel_B, Ctrl_Id_B, Value); 'Panel_B' and 'Ctrl_Id_B' (which have the same numeric values as Panel_A = 1 and Ctrl_Id_A = 2 in their respective .h files) are being interpreted as Panel_A and Ctrl_Id_A.  I never understood how CVI makes this distinction, eg. knowing which of PANEL_A = 1 and PANEL_B = 1 is being referred to, but didn't worry about it since I never needed cross-communication between panels until now.  Any help on how to implement this would be greatly appreciated.  Thanks!
    Solved!
    Go to Solution.

    This is a basic issue on which you can find tons of forum posts
    The online help for the function recitates:
    int SetCtrlVal (int panelHandle, int controlID, ...);
    Parameters
    Input
    Name
    Type
    Description
    panelHandle
    int
    Specifier for a particular panel that is currently in memory. You obtain this
    handle from LoadPanel, NewPanel, or DuplicatePanel.
    controlID
    int
    The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
    value
    New value of the control. The data type of value must match the data type of the control.
    That is, you must not use the panel constant name in the first parameter of SetCtrlVal, use the panel handle instead. The system guarantees that all panel handles are unique throughout the whole application whichever is the number of panels used in every moment.
    int SetCtrlVal (int panelHandle, int controlID, ...);
    Purpose
    Sets the value of a control to a value you specify.
    When you call SetCtrlVal on a list box or a ring control, SetCtrlVal
    sets the current list item to the first item that has the value you
    specify. To set the current list item through a zero-based index, use SetCtrlIndex.
    When you call SetCtrlVal on a text box, SetCtrlVal appends value to the contents of the text box and scrolls the text box to display value. Use ResetTextBox to replace the contents of the text box with value.
    Note   This function updates the displayed value immediately. Use SetCtrlAttribute with ATTR_CTRL_VAL to set the control value without immediately updating the displayed value. For this reason, SetCtrlAttribute with ATTR_CTRL_VAL is generally faster than SetCtrlVal. However, if the control in which you are setting the value is the active control in the panel, SetCtrlAttribute with ATTR_CTRL_VAL displays the value immediately.
    Note   This function is not valid for graph and strip chart controls.
    Parameters
    Input
    Name
    Type
    Description
    panelHandle
    int
    Specifier for a particular panel that is currently in memory. You obtain this
    handle from LoadPanel, NewPanel, or DuplicatePanel.
    controlID
    int
    The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl.
    value
    New value of the control. The data type of value must match the data type of the control.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • I have a mac pro 1.1. the main hard drive failed. How do I reload OS X 10.7 back in my computer. the app store will not let me reinstall this os. My computer is not compatible OS x 10.8?

    I have a mac pro 1.1. the main hard drive failed. How do I reload OS X 10.7 back in my computer. the app store will not let me reinstall this os. My computer is not compatible OS x 10.8?

    You need to first install the OS your Mac came on the bundled gray disks. Assuming it's Snow Leopard, you could then login into the App Store using your same Apple ID and password to download and install Lion.
    If your Mac is a bit older and came with Leopard, 10.5.x, you can bypass that and install Snow Leopard from your retail disk. The only software you'd need to install separately from the gray disks would be the optional software, such as the iLife suite and other titles not included on the retail SL disk.

Maybe you are looking for

  • Don't know power on password for hp touchsmart 520-1020 windows 7 64 bit

    My touchsmart 520-1020 was powered off and when it came back on it was asking for a power on password. Can anyone help me with this? Please? when i enter a random password three times it doesn't give me a code. it shows a key each time i press enter

  • Logic for monthly quarterly yearly basis for  ar eport

    hi ,           i need to run a report (which shows sales order number and creation date based on erdat entered in selection screen) in back ground. for that i have to develop a wrapper program which calls the main program and executes it. i can do th

  • BAPI to insert text EENO_DYNP-ZEILE

    Dear All. We are facing an scenario in which we need to insert text in field EENO_DYNP-ZEILE vía BAPI or BATCH for CONNECTION OBJECT AND DEVICE LOCATION. Our question is *¿Do you know the BAPI-FIELD which store this long text? Thanks in Advance. Nico

  • Feature 'nested external environment calls' not implemented

    Hi. I've created a .Net 3.5 DLL which is called by a stored procedure using CLR in a trigger. Inside one of the functions I've got an update-statement against the same table as the trigger which calls the CLR code. That update results in a SAExeption

  • Safari Plugin Management

    Safari in Snow Leopard is supposed to run plugins in their own process, like Flash Player. For me, however, this is not working; it's simply running in the Safari process. The difference is that I'm not getting the whole "crash resistance" thing they