Question on closing Front Panel references

I'm manipulating controls on the Front Panel of my VI.  In doing this, I open a slew of references (to the VI, to the Front Panel, to its Panes, and to the objects on the Front Panel).  Normally, before exiting the VI, I carefully close them (in LIFO order, of course), but a question has arisen:
I want to "export" a series of references to Boolean controls for use in succeeding VIs.  No problem, while enumerating the controls (see above), I simply identify the Boolean references and build them into an array that I pass out.  First question -- does anything "go wrong" if I also do a "Close Ref" in the main loop (after adding the reference to the array, of course)?  [At present, I'm only doing a Close Ref on the non-Booleans].  Logic says this should be OK, as the Close Ref is mainly doing "garbage collection", and I've done a "copy" operation in building my array, but to a persistent structure.
Second question -- in my "cleanup" routine, I noticed I was "double-disposing" of the references, that is, I did a Close Ref on my array of Boolean References, but also was enumerating the entire Front Panel (as I did when I opened it) and disposing of the references that it found.  Again, this should be no problem, but (in principle) I'm doing a Close Ref on two references to the Boolean control.  It occurs to me that this is not really logical either -- I should be able to simply "abandon" the array of references -- although it takes up memory that can be "reclaimed" for other uses, the fact that it is an array of RefNums is a "so what" -- the contents of the array could have been a numeric or other "solid" data type.
Does this make sense?  To summarize, what I'm trying to do is to "extract" some RefNums to Front Panel objects for later use.  In the "extraction" process, I must open (and create references to) multiple objects, including RefNums to my "objects of interest".  What I think I can (and should) do, once I've copied the RefNums I need, is to dispose (Close Ref) all of the RefNums that I opened during the extraction routine, and do something equivalent when I do the subsequent "cleanup" (which undoes any modifications I made as part of the extraction).
Comments welcome.
Bob Schor

I usually store the ref. at the beginning of my program, in Functional Globals, and i close them when the program does not need them any more. 
I think this is the right approach. And it is simple

Similar Messages

  • Error 1032 accessing Front panel reference on 6.1 EXE from 7.1.1f2

    I am installing a Data Acquisition system developed in 7.1.1f2 (.net 2.0 patched).  The system has 4 device drivers reading data from different components (SCXI DAQ, OPC/DSTP, DLL Library, and a Labview 6.1 executable)  When I got on site, I modified the 6.1 EXE's INI file to allow TCP access to * and export * on a specified port.  The driver accessing the 6.1 EXE was reading the digital values correctly but I also needed to read XY Graphs along with the plot configurations and coloration.  I then wrote a simple debug VI that Connects to the 6.1 EXE's Win 2000 Machine the Application reference succeeded, I open a reference to the exported main vi and seem to access all the properties and methods of the VI except the Front Panel calls.  Some of the calls return invalid data (read this is the default result if an error is encountered)and when I try to get the Front panel reference I get error 1032.  I need to get this working in order to get the control references of the waveform graphs, in order to get the plot information. 
    Things I tried:
    1 - I have tried accessing the FP reference from a different machine running LV 7.1 but still get the same error.
    2 - The 6.1 EXE belongs to our client and we cannot modify it, but I have reinstalled it from the backups with no change.
    I don't have any idea how to proceed..
    What else can I verify on the remote VI server,  Is there another way to read the plot data from a graph?  (VI ref --> Get control value mostly works untill the fill color changes on the plots)
    Any Help / guidance would be appreciated.
    Darcy

    Hello Darcy-
    It sounds like you are running into a common problem when trying to access a front panel on a remote executabel. The following KB gve a  bit more clarification on teh nature of the problem adn a possible workaround. The workaround will require modification of the EXE you wish to control, and it sounds like that may not be an option for you.
    http://digital.ni.com/public.nsf/websearch/B36BCCBFEBECF4F486256C69005D49C3?OpenDocument
    If the Vi you wish to communicate with is not written to share its data in any way, it is going to be difficult/impossible to read the the waveform vales from that VI.
    Xaq
    Message Edited by Xaq on 11-21-2006 03:29 PM

  • Question about subvi front panel

    I want to call a subvi in the main program and do like
    this:
    1. When the main program calls the subvi, the subvi shows its front
    panel and executes.
    2. After the subvi finishes, it can close the front panel.
    Now, I meet a problem: I can popup the subvi node setup dialog to enable
    "show front panel when called", which implements the first one, but I
    can not close the front panel until originally closed(main
    program stops). How can I close the subvi's front panel(after it
    finishes running) even when the main program is still running?
    Thanks in advances.
    Sent via Deja.com http://www.deja.com/
    Before you buy.

    In article <[email protected]>,
    "Remco Breen" wrote:
    >
    > [email protected] wrote in message <[email protected]>...
    > >In article <[email protected]>,
    > >"Kevin B. Kent" wrote:
    > >> [email protected] wrote:
    > >>
    > >> > Now, I meet a problem: I can popup the subvi node setup dialog to
    > >enable
    > >> > "show front panel when called", which implements the first one,
    but
    > >I
    > >> > can not close the front panel until originally closed(main
    > >> > program stops). How can I close the subvi's front panel(after it
    > >> > finishes running) even when the main program is still running?
    > >
    > >
    > >
    > >
    > >> Select the "close front panel if originally closed" option.
    > >> in addition to the "Show front panel when called"
    > >>
    > >> Kevin Kent
    > >
    > >
    > >I have tried this, in this way, the subvi's front panel is closed
    only
    > >after the main program stops. In fact, what I want is to close the
    > >subvi's front panel even the main program is still running.
    > >
    > >
    > >zhljh
    > >
    > >
    > >Sent via Deja.com http://www.deja.com/
    > >Before you buy.
    >
    > Another option would be to open a VI reference (found under
    "application
    > control") and tie that to a property node and select the property
    "front
    > panel.open". Change it to a control and attach a boolean false to it
    when
    > you like to close.
    >
    > RB.
    >
    I think a more elegant way of closing the SUB VI is to start off the way
    that Remco states regarding opening a VI reference. Only in the Sub VI,
    you should program a Terminate control (such as an Abort button to exit
    from a While loop... or something similar) and via the VI reference,
    select the 'Set Control Value' method to gracefully stop the Sub VI
    execution. Of course the Sub VI will have to set the close if originally
    closed attrib set.
    There is a great source of example LabVIEW apps at:
    http://digital.ni.com/explprog.nsf/web%2Fswgrp?OpenView&Start=1&Count=50
    0&Expand=3.7#3.7
    In particular, see "Stopping a Running SubVI from the Main VI Using VI
    Server" example. It demostrates this techniques better than I can
    explain it. Hope this help.
    Rick
    Sent via Deja.com http://www.deja.com/
    Before you buy.

  • Closing front panel of subvi

    I have a main vi that opens many subvi with their front panel (they pop up as a normal windows not like modal). I need to close a subvi by pressing a button on it but I can't find any way.
    Thank you everyone,
    Massimo Ponte.

    You can use vi.lib\UTILITY\VICTL.LLB\Close Panel.vi. Just pass it the name of the VI whose panel you want to close.
    Sylke had a similar problem here.

  • Save sub-vi's (possibly closed) front panel image to a file

    Hello,
    I would like to dump a file of a sub-vi's front panel when that sub-vi completes execution. I was thinking of using the  "Front Panel:Get Image Method", however the target sub vi's front panel might not be opened. I am looking through the help file, and it says
    "If you do not want to display the front panel but want the image to reflect value changes, create a Property Node from any front panel terminal on the block diagram of the VI for which you want to create a front panel image."
    I'm not quite sure I understand what that means. Can anyone provide an example?
    I am running LV 8.2 for the record.
    Thanks,
    -Ted

    Hi Ted,
     "If you do not
    want to display the front panel but want the image to reflect value
    changes, create a Property Node from any front panel terminal on the
    block diagram of the VI for which you want to create a front panel
    image."
    What that means is to create a property node for something (anything) in your Sub-VI.  
    I have attached an example for you with a dummy property node. And the front panel of the Sub-VI gets updated on the Main-VI. Try removing the property node in the Sub-VI and you will notice that even though the values are correct in the main-vi, the image of the sub-vi doesn't get updated. 
    Hope this helps!
    Warm regards,
    Karunya R
    National Instruments
    Applications Engineer
    Attachments:
    MainVI.vi ‏15 KB
    SubVI.vi ‏10 KB

  • A different Front Panel question

    Just to spice up the board, I'll ask a different question about the front panel. ?I have the X-Fi Fatalty board with the front panel and for the past 2 years have not used the front panel.
    My question: Can I pull the front panel and set it asideI don't use it and the ribbon cable is cluttering up the wiring in my, already cramped, case. ?Will it operate with just the PCI card?
    Thanks.

    Absolutely. I have used mine many times without the front panel. I add it back when I dont want to reach around to the rear to plug in a MIC and I certainly dont use my headphone jack on my center channel speaker for headphone output.

  • Crio to host multiple remote front panels

    Hello all,
    I've a question abt remote front panel hosted by a cRIO system (cRIO9068 to be more specific, running RTOS).
    I have a top level VI (main) as the start up vi in my cRIO system, and it would call a subvi during run. I'd like to enable remote front panel for both the main vi and the sub vi so that I can see both front panels using a web browser. I'm not sure if such a configuration is possible at all and would like to listen to comments by users who have similar experiences.
    Thank you very much!
    Best,
    Jidong

    Hello hhaamm,
    To the best of my knowledge, I don't believe it is possible to host multiple remote front panels from the same executable, and, if it is, would be very difficult. The NI Web Server configuration file only specifies one port on which an executable can run web services, like remote front panels. In, short, I am not sure how you would be able to accomplish this.
    Another thing to keep in mind is that what you want to accomplish can be done in many different ways that would be much easier than creating multiple remote front panels.
    One of these is to move all of your controls and indicators to the top level VI. i.e. make the data you want to see from the sub-VI an output of the sub-VI and create a new indicator for this on your top-level front panel. This way you can still use a remote front panel and can use different decorations and labels to separate the top-level and sub-VI outputs.
    Another way to do this is to use the tab control to create multiple tabs, one for your top-level indicators, and one for your sub-VI indicators. This would still enable you to use remote front panels and would allow for the separation of your different indicators. Here is a note on how to do that:
    http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/creating_tab_controls/
    And here is a more in-depth forum post on how to create them:
    https://forums.ni.com/t5/LabVIEW/how-do-you-create-tabs-on-the-front-panel/td-p/201495
    The final way I can think how you would accomplish this is to use a web service instead of remote front panels and host the output of the sub-VI as a separate website. 
    Hope this helps!
    Collin D.
    Applications Engineer
    National Instruments

  • Close top vi front panel while sub vi front panel run

    Hello,
    I'm writing wiring a program and  have several (several several several .. ) VI which launches Sub-VI with their front panel.
    During there Sub VI, the Front Panel of the Top-VI get bored behind...
    Is it possible to Hide this Front Panel while the sub-VI is running.
    Thanks
    Solved!
    Go to Solution.

    Sorry for this post, i didn't read every replies of the folowing topic :
    http://forums.ni.com/t5/LabVIEW/closing-front-panel/m-p/300115
    The VI of falkpl :HideFPvi.vi 24 KB is a very good method for my VI.
    Sorry again, hope this'll help someone

  • Front panel issues

    Hi All,
    I had a question about the front panel connectors. I have a Lian-Li PC60 series case. On the JFP1 slot I have the reset and power switch configured correctly in that they both work.
    However the HHD and Power LED aren't working. The HDD LED glows a constant red (the hard drive is functioning normally) and the Power LED isn't working at all.
    My case doesn't have the two pin HDD and Power LED connectors that connect to JFP1, only one 3 pin Power LED connector that connects under the 4 pin speaker connector in JFP2. I figured I might have reversed the correct side and connected positive to ground, but after changing that, it doesn't work either way.
    Both LED's functioned with my old IC-7G board.
    Any ideas?
    Other than that the PC appears to be working fine.

    They seem a little high i'm no expert on your CPU or its temp, other than knowing the max is about 70C. Check temp in bios its usually more accurate.
    Check any literature that came with CPU or try
     AMD Athlon™ 64 Processor Power and Thermal Data Sheet
    Mine 3200 (754) shows 38C - 53C Idle/Load
    It's certainly not dangerous or something to be overly concerned about, just something you might want to investigate at your liesure.

  • Dr. Damien's Developmen​t - The Xylophone Project X - Font Issues and Front Panel Layout

    The Show Raw Data button was made active in this installment. Doing this in a robust fashion was more involved than one might think, due to font and platform issues (remember I want to port this to a Windows Mobile device eventually). The following changes were made.
    The A frequency indicator was made active. This was an oversight from the last update.
    A front panel object, XylophoneFP.lvclass, was created to hold the front panel references and methods.
    The front panel object was used to implement the Show Raw Data button.
    The front panel object was used to compensate for font issues.
    When testing this application on Windows Vista, I noticed that the font differences between Vista and XP were annoying enough that I wanted to fix them. This will also lay the groundwork for any layout issues when porting to Windows Mobile. Usually, I create a cluster containing all my front panel references, but this time I put them into an object. Besides the usual object boilerplate, there are two methods, one to rearrange the front panel and one to show/hide the data graphs.
    Once the controls and indicators are properly arranged, showing and hiding the data graphs is simple. VI server methods are used to find the edges of the outer controls, some whitespace is added, then the front panel size is reset. Arranging the controls in the first place is much more complex. Dialog controls are used, and these controls change size based on the default font size. Font sizes can change due to user preference or when using the application in a different operating system than it was developed in. Button sizes can also change due to localization.
    This problem is difficult to solve cleanly, and the VI which does this, XylFP.lvlib:XylophoneFP.lvclass:ArrangeControls.vi, shows the problem. It relies on the actual sizes of the controls/indicators to rearrange the front panel in a hopefully pleasing fashion. Even though this is a relatively simple UI, the VI is fairly complex. It uses VI server calls to determine the current sizes of controls and then rearrange them. If you choose to do something similar, consider the following hints:
    The Bounds property of all controls is not writable. To change the size of controls, you need to find the property or properties which change the size. There may be more than one (which is why Bounds is not writable). For example, to change the size of a boolean, use the Button Size property.
    In many cases, the property you use to change the size of the control will not be the same value as the Bounds property. Using the boolean again, the Bounds of a 3D LED include the 3D effect around the LED, but the Button Size only includes the LED itself. Comparing the Bounds property to the result of a query to the property you will be setting will give you the necessary offset to convert between the two.
    Make sure you label your wires if you attempt to do things like this. Long wires are very common in this type of programming. It is difficult enough to keep track of things without the added aggravation of having the trace wires back to their source to identify them.
    A few judiciously placed type converters can eliminate many type conversion dots. This is not usually a real problem in this context, but you should get into the habit of efficient programming.
    I will be hiking through the mountains of New Mexico with the Boy Scouts for the next couple of weeks, so do not be dismayed if I do not reply to comments very quickly. However, comments and suggestions are still welcome and encouraged. I will reply when I return.
    Previous Installments
    Data Acquisition Concept
    GUI Concepts
    Specifications
    Core Architecture
    Data Acquisition and Note Analysis
    Sound Acquisition Revisited
    Sound Analysis
    Configuration Dialog
    Calibration Dialog
    Message Edited by DFGray on 06-05-2009 03:09 PM
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    XylophoneX.zip ‏1259 KB

    DFGray wrote:
    I put the event structure in the command loop so that events are processed synchronously.  In the past, I have run into a variety of race condition/synchronization issues when separating the event and command loops and prefer to keep them together to make the program structure simpler.
    It is simpler but you give up any multi CPU performance.  That LV is inherently parallel is one (the only) real advantage over a text based development system.  I can write good structured text that is almost as visually easy to parse as LV.  With modern syntax coloring engines, the difference in icons vs. structured text is not that great.
    But the challenge I give the traditional text coders is to keep track of many mulitple threads.  This is why dataflow is a powerful concept.  Yes it does lead to asynchronous execution but if you impose synchronicity on your code you are working against LV.  I get most first time programs where everything is in a sequence structure.  "Just to be safe".  
    Of course this is much better but  my first design goal is that any application should take advantage of a much hardware as possible, degrade gracefully on slower hardware and play nice with other running applications.  This simpler structure severely handicaps that first goal.
    In this case it is simple enough to "get away" with it since as you point out that there should not be anything that takes significant CPU time.   But that may not be true on the PDA?
    If you are going to run it on the PDA will we be discussing techniques to seamlessly use both NIDAQmx Base and NIDAQmx in the same system?  That is a real challenge.  I look forward to more of this!
    Cheers! 

  • Refresh graph properties (colors...) when front panel not opened

    I have a problem with setting the plot properties of a multiple xy-graph.
    I first pass the data (n plots, number variable) to the graph control, THEN I set the according properties like color, line style etc. by a property node beginning with "active plot" followed by the properties. So when I set them, the xy-graph is already initialized with n plots.
    Afterwards, I take the graph picture and save it to a bitmap-file.
    That works fine as long as the front panel is opened or the number of plots and their attributes stays constant. But if the panel is closed (which is the default of that VI) and the number of plots changes, I get only as many plots plotted correctly as there are shown in the plot legend
    - regardless of if the legend is shown or not.
    I don't like the idea of having a huge legend on the panel which still might be too small sometimes or having the legend scaled by it's height-property in pixels.
    What I need is something like a .refresh-method that forces the graph to update even if the front panel is closed. Any idea how to do this?
    Cheers & thanks, Daniel

    The issue you are seeing is because LabVIEW doesn't update the controls/indicator of a front panel that is not open. This is done to save computer resources. The simple way around this is to use VI server to open the front panel for it to update and then close it again. You can use the VI property FP.position to move the window offscreen where it can't be seen and perform the open/close. This will get you the results you are after while still allowing the illusion of a closed front panel.

  • Front panel --pictures switch

    Hi
    I am a customer of NI. I have a question about the front panel design. I want to design a knob with different pictures. When it comes to different value, it displays different pictures. How can I get it? Would you send me a example? Thank you for your help.
    Regards
    Vivian

    Well, there are many approaches to this.  It all depends on what you actually want to do, how big the pictures are, how fast you want the pictures to appear, etc.
    Let's look at the knob.  That's easy.  They are found in the Controls Palette under Numeric.  SImply put a range to supports the number of pictures you want to select.
    You could then use the numeric value from the Knob control as an index to an array.  Now depending on your requirements, the array could be an array of paths to the pictures that gets loaded on the Front Panel, or even as an index to an array of pictures. 
    And there are many other solutions. However, the appropriate approach may depend on what you actually want to do.
    Can you provide more details on what you wish to do?
    Thanks.
    RayR

  • Front panel on K9N2 diamond ?

    HI
    now i got sound card working nicely i have onther question
    abut my front panel i wonder if i can use it whit X-Fi sound blaster
    sound card.
    Here is pic from the front panel
    http://img74.imageshack.us/my.php?image=dsc01128nk1.jpg
    and here is the list of the cabel come form it i just
    put the audio pins
    Mic bais
    Gnd
    Mic in
    SpkOut L
    SpkOut R
    Gnd
    and on the soket some i have got form Msi for Jaud 1 on the sound card
    SENSE2_RETIRN |PORT 1L
    -                     |PORT 1R
    SENSE1_RETIRN |PORT 2L
    PRESENCE#       |SENSE_SEND
    GND                 |PORT 2L
    only thing from front panel is not working is the sound but usb sokets are working fine
    so just wondering if i can use it to get audio from it to if not i just dont bother hehe
    btw it is the orginal frontpanel some was on the case when i buyed and i have tryed 2wise now
    to get it working but no luck 

    Tbh dont maind this post gona change the case any way to this one
    Apevia X-Telstar Jr Black W  
    i hate this one  some i have rhit now is from silvershiled

  • Modifying a front panel decorative box

    Hi
    I have an application whose front panel has several decorative boxes
    (smooth and lowered style) used for aesthetic purposes. When my
    application starts I would like to adapt my front panel display to
    match varying screen dimensions. How would I go about dynamically
    changing these objects? Do the boxes have any properties that are
    modifiable?
    Thanks
    John

    You can access references to the decorations via a front panel reference. Wire the front panel reference to a property node and select the controls property, it will give you references to all the decorations. You now need to know the indexes of the references you want, get those indexes and you can read and write the size property of the decoration(s). I have attached a simple example that resizes two decorations when the front panel is rescaled, just run it and resize the window...the properties will rescale accordingly.
    In the example the rescaling is curde; it just finds how large a percentage the window has changed and change the size of the decorations approx. the same. In real life you may want to put in logic that controls the size in a more refine
    d way.
    Mads
    MTO
    Attachments:
    DecorationRescaling.vi ‏52 KB

  • Audigy 2 NS Front Panel Headph

    Purchased this particular model due to the front panel containing a headphone jack. But I get no sound from it. Now I am using Winamp, iTunes or MS WMP. So my question is - the front panel headphone jack, is this only for devices that you hook up directly to the front panel? Should I be able to hear any sound coming from whatever audio source that is generated from the computer through this jack?
    I am really stumped on this one. Have searched KB & forums, tried all the suggestions, and can get no sound from the FP HP jack utilizing Winamp, iTunes & MS WMP or anyhting else. Ribbon cable is connected correctly. Beatiful sound from speakers and if I disconnect from the rear and connect the headphones from here, no problemo, get sound all day long. But this defeats the purpose of having a jack in the front.
    Hope someone can shed light on this.
    Thanks for your time
    AJ

    Purchased this particular model due to the front panel containing a headphone jack. But I get no sound from it. Now I am using Winamp, iTunes or MS WMP. So my question is - the front panel headphone jack, is this only for devices that you hook up directly to the front panel? Should I be able to hear any sound coming from whatever audio source that is generated from the computer through this jack?
    I am really stumped on this one. Have searched KB & forums, tried all the suggestions, and can get no sound from the FP HP jack utilizing Winamp, iTunes & MS WMP or anyhting else. Ribbon cable is connected correctly. Beatiful sound from speakers and if I disconnect from the rear and connect the headphones from here, no problemo, get sound all day long. But this defeats the purpose of having a jack in the front.
    Hope someone can shed light on this.
    Thanks for your time
    AJ

Maybe you are looking for

  • MIDI Loops & Loop Browser

    Does anyone know if MIDI loops can be manually added to the Loop Browser?

  • IPod updater breaks iPod Mini

    my iPod mini has worked fine for over a year, only a couple of freezes that were easily corrected by a reset. yesterday I download the latest iTunes, and the iPod Updater 2005-9-23. Since then my Mini refuses to download more than 2-3 songs without l

  • Error when trying to run Auto-Analizer

    For several days now, when I try to run Auto-Analizer I get a message that says: "Auto-Analyzer has skipped one or more file(s) because of potential errors." I have trying running it on groups of pictures and individual pictures and get the same mess

  • Fastest way of transferring images from servlet to applet?

    Hi! I have made an applet that shows a large number of images. The way I am doing it now is that I create an ArrayList containing ImageIcons and pass that from the servlet to the applet. What I'm looking for is a faster way of loading and transferrin

  • Probook 4720s internal speaker not working (headphones do)

    Hi. I have a problem where the internal speakers on the laptop just wont work, but I get sound from headphones when they are plugged in. * The computer is less than a month old and has not been used very much. * I think I heard sound when I installed