How to programati​cally set front panel objects (buttons) to enable, disabled, and disabled and gray

I'm writing a program that when I am iterating through a loop, I want to have some buttons disabled and grayed. Once the loop is done, I want those buttons to now be enabled.
But I have no clue how to programatically do this
(aka enable and disable while the program is running, NOT before the program starts)
Any help would be appreciated

Create a property node, & select the 'Disabled' property.  Set it to 0 for enabled, 1 for disabled, & 2 for disabled & grayed.
Paul Cardinale

Similar Messages

  • Problem : controls & indicators not updated when programati​cally open Front Panel

    Hi,
    I have a strange problem when I want to progamatically open the front panel of a sub-vi: for some sub-vis the controls and indicatores are correctly updated while for others they are not (ie the controls show outdated values).
    I have created an example here that illustrate this. The 2 sub-vis are *exactly* the same, but only one shows updated controls when I open it (with the sub-vi previously closed of course).
    How is that possible?
    What do I have to do to have the controls updated to the last value of the *last call* when I open the sub-vi?
    Solved!
    Go to Solution.
    Attachments:
    Front panel problem.zip ‏35 KB

    titi_nicolas wrote:
    mhmmm,....no that is NOT the reason... Have you tried the VI???
    Honnestly, I would not bother people on this forum for such a stupid mistake.
    And I also expect people to know how to run a VI....
    And to play in your game, you forgot -3) Turn on the PC, -2) log in windows, -1) open labview...
    Well, I DID run your VI and everything worked just fine, however I no longer have LabVIEW 7.1 so maybe your observation no longer applies to newer versions. It could also be because they were just upgraded as Ben noted. I did not study it in detail.
    And Yes, as Ben noted, invisible VIs don't get updated for performance reasons (and not to waste extra data copies for the controls and indicators). LabVIEW is typically smart enought to update when needed, e.g. if the subVI tries to print its panel, etc.
    I guess you haven't been in this forum for too long, but since controls can easily be operated in edit mode is is absolutely important to mention at which step you run the VI. (try to operate your controls with the computer turned off and you will see that it is not that easy ). Also if you have been programming for any length of time, you should know that stupid mistakes happen all the time (at least to me and Ben ). It is much easier to weed out the stupid mistakes with a quick question&answer than to spend hours searching for a deep and complex solution.
    LabVIEW Champion . Do more with less code and in less time .

  • Setting up position of front panel objects using input from file

    I am working on a project and i have got the following query.
    i have a front panel with lot of objects like knobs,dials,push buttons etc..
    the entire panel will be the console to the user and as he changes the various
    positions of the objects their values will be written in to a file.
    now after a days work when the system is restarted again the next day
    the values of various objects should be read from the file and the front panel objects should be set in their position according to it
    in short the objects(knobs,buttons etc) should both act as o/p i.e when user interacts with them and they should also act as i/p when their position will be set from
    file.
    how can i achieve this.any help regard
    ing this would be greatly appreciated

    You should separate the read portion of this vi from the write portion of the vi. You want to execute the read portion of the vi only at startup and the write portion of the vi only at shutdown. So you'll be reading the file and writing the output to the property nodes, running your program, and then taking the value of the controls and writing to file. I have attached an example of how this might work. You might also do this with a state machine structure to control the data flow.
    Hope that helps
    Attachments:
    query.vi ‏49 KB
    read_file.vi ‏42 KB
    write_file.vi ‏36 KB

  • How to set front panel size to be same as one led?

    Hello All,
    LV2010
    In documentation reads that minimum front panel size is one pixel. I need to create front panel which have same size as one led (see attachment). I'm not able to make front enough small just by dragging window borders. I also tried to change front panel size from File->Vi properties ->Window size but that didn't helped. How I can set front panel to smaller size?
    Attachments:
    Small_front_panel.vi ‏6 KB

    I think I got it
    In the window apperance option I removed everything except "Allow user to resize window" And the Run options. Then I ran the VI (continuosly since there is no loop) and resized it. After I stopped it, I then removed  "Allow user to resize window" from the window apperance options.
    P.S! If you try to resize my Vi now, it will pop back out for some reason. 
    Regards,
    Even
    Certified LabVIEW Associate Developer
    Automated Test Developer
    Topro AS
    Norway
    Attachments:
    Small_front_panel (1).vi ‏6 KB

  • How to hide front panel objects behind other front panel objects

    Hi,
    I need tho change an existing project and to make it simple just want to hide some front panel objects behind others. But I can't find how to put the one I wnt to the front hiding all others. So now there are some in front that should be hidden.
    Is there a button or menu item "Move to front / back" like in many other programs?
    Thanks
    Martin
    Solved!
    Go to Solution.

    Hi Martin,
    what about the link I provided in my previous post? What else do you need?
    What about the chapter "fundamentals" in the LabVIEW help?
    Going the way "Fundamentals -> Building the FrontPanel -> How-To -> Reordering Objects" seems rather logically to me…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to make the LV front panel controls the current value through the program is set as the default value when the next time you open?

    How to make the LV front panel controls the current value through the programis set as the default value when the next time you open?
    1110340051 

    Try this: Re: How to make a VI remember the latest control value?
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • Front panel objects not stationary

    Hello
    I've created a VI for a particular instrument in our lab. There are a number of inputs and outputs associated with it so I arranged them together on the front panel for ease of viewing. However after I saved my VI and opened it again all most of the objects are all jumbled up again. It makes no difference even if I save a new VI. This is really really annoying. One section of the front panel is fine but the other lie over and on top of each other making it a pain to separate. It makes no difference if I move the controls and indicators to their designated spots and lock them, they appear somewhere else when I re-open the VI..
    HELP!!!
    Thanks,
     Will.

    Hi,
         It seems that you programatically set a location for your controls,... If you place it somewhere it is supposed to be there the next times you open it... moreover if you save it there...
    Did you try to place your control and save it, without execute the program...
    Nevertheless, without an example it is very difficult to help you...
    FakStory

  • Bug: Front Panel objects relative position change when placing merge VI onto Block Diagram

    I've posted a bug report on LAVA, here:
    http://forums.lavag.org/Front-Panel-objects-relati​ve-position-change-when-placing-merge-VI-onto-Bloc​...
    If someone at NI can reproduce, can I please get a CAR #?
    Thanks,
    -Jim
    Solved!
    Go to Solution.

    Donovan B wrote:
    Hi Jim,
    After my previous post, I also saw this behavior, so I decided to do another test.  If there are no decorations in the VI set to “Merge VI” (“Place VI Contents” for LabVIEW 8.5 and later) the controls and indicators are still not selected when dropping the VI from the Functions palette.  I checked this behavior back to LabVIEW 7.1 and it is consistent throughout that controls and indicators are not selected.  (Consequently, so is the fact that when decorations are present they don’t maintain the relative position).
    I am not sure if this would be better suited as a CAR or product suggestion since it has been this way that long, but it does not appear to be related to the fact that decorations are present in the Merge VI.  It does seem strange that the decorations are selected though.  Looks like the best way to work around this is to drop the VI from the Controls palette.  Hopefully, it’s not too much of a hassle.
    Hi  Donovan,
    Thanks for checking in.
    >  I checked this behavior back to LabVIEW 7.1 and it
    is consistent throughout that controls and indicators are not
    selected.  (Consequently, so is the fact that when decorations are
    present they don’t maintain the relative position).
    This just means that not many people use this feature.  However, now that VIPM Professional makes it so easy to edit the palettes, I'm sure that others will start complaining that this doesn't work as they expect.
    > I am not sure if this would be better suited as a CAR or product suggestion
    since it has been this way that long, but it does not appear to be
    related to the fact that decorations are present in the Merge VI.
     Just look up the functional specifications for this feature and see if all objects are supposed to be selected.
    But seriously, is there a reason that only the FP decorations are selected?  Surely this would be documented somewhere, if there was a good reason for this current (IMO, buggy) behavior.
    > It
    does seem strange that the decorations are selected though.  Looks like
    the best way to work around this is to drop the VI from the Controls
    palette.  Hopefully, it’s not too much of a hassle.
    That's not a reasonably work-around, IMO.  It doesn't make sense to drop Block Diagram components onto the Front Panel.  For example, this bug affects the JKI State Machine.  It doesn't make sense to drop a State Machine onto the Front Panel.
    So, I'd file it as a CAR/bug, and then wait to see how LV R&D feels about it.  If they can find some valid reason for why Controls and Indicators shouldn't be selected, then that's fine (and hopefully someone will explain it to me).
    Thanks,
    -Jim

  • Programaticly (dynamicly) show front panel of a vi

    I want to programaticly show the front panel of one of my sub VI's. I have one method that allows me to do this but I would like others input on wether this is a proper way or if there is a better method. I want to make sure that I am not going to gobble up memory.
    The VI properties are set with the show panel on all unchecked.
    The reason for doing this is because sometimes I want user input and other times input is provided dynamicly.
    Attachments:
    DynamicShow.vi ‏36 KB

    Your code looks pretty good. The only thing to be careful of is reference numbers and loop. With a WHILE loop (like you are using in tis example) there would be no problem simply running the reference through the array.
    However, if you every want to do something similar using a FOR loop you will need to be very careful because they have a fundamental difference. WHILE loops always execute at least once, so their outputs are always defined. FOR loops can execute zero times, and when they do their outputs are undefined--which in the case of a reference results in an invalid reference and lots of errors down stream from the loop.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Front Panel objects do not stay in place after saving, closing, and reopening the VI.

    I have been working with a couple of versions of a main VI. The original VI was given to me so that I could add additional functionalities to it. I had been designing the front panel of the latest version of the VI on a Dell laptop running Windows 7 and LabView 2011 SP1 using a monitor with a resolution of 1920x1080. My booleans, numerics, and plots on the front panel had always stayed in place after saving, closing, and reopening the VI. Once in the field, I connected my laptop to a cRIO9073 and used my laptop screen with a resolution of 1366x768 to operate the VI. I made some changes to the VI, saved it, and reopened it. This time I noticed that the front panel objects had become overlapped, resized, and generally rearranged. I tried fixing the objects but I noticed that they reverted back to the incorrect positions after saving and reopening the VI. I was successful in keeping the objects in position a couple of times, but when I would open the VI at a later time, the objects were again rearranged. This is happening on both my monitor and laptop screen. The original version of the VI, however, does not behave this way and I have opened it on both my monitor and laptop screen. In this version, the front panel objects always stay in place. Both VI's have the same window size properties. Could I have corrupted the latest version of my VI somehow? Below are screenshots of the front panels of both VI's.
    Attachments:
    Blender Controller Original.PNG ‏140 KB
    Blender Controller.PNG ‏203 KB

    Hi Miguel,
    It is possible to programmatically set or change the position of front panel objects. (for example: http://digital.ni.com/public.nsf/allkb/4D0DA06B431​95B3F862572F3000AF2D3?OpenDocument) However, if you haven’t intentionally done that, it seems unlikely that it is the problem.
    Have you tried copying the entire block diagram in to a new VI to see if the problem persists? While it is unlikely, you are right that it is possible for VIs to become corrupted. I’ve never heard of a situation like this except in the situation where the settings Tom had you check have been changed. Here is some information about those settings:
    http://digital.ni.com/public.nsf/allkb/7567EF257B9​CFDF986256F630073228F?OpenDocument
    Since there was no rearrangement when you copied the front panel to a new VI, you might try copying the block diagram a little bit at a time to see if there is some particular part of it that creates the problem somehow.
    K. Johnson

  • Front panel objects missing

    I have a weird phenomena. I have a program that runs fine, does data acquisition and writes to measurement fine. All of a sudden, and in no scheduled way, all the front panel text disappears, which causes the write to measurement to fault because there is no text left to build the filepath. But the funny thing is, after pressing stop on the Labview error, the machine keeps running. There is a digital watchdog in the program that is supposed to stop the machine if the program stops. Anyone had this problem, with the front panel objects/text disappearing?

    Hi tavwtby,
    It sounds like you are running out of virtual memory. Here is a help article on how to extend the size of VM on your system (http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/enable_lrg_ad_aware/). Try this out and see if you still get the same behavior. 
    Aldo A
    Applications Engineer
    National Instruments

  • Programmtically Scaling the front panel objects depending on the Dispaly card resolution.

    I have programmed my application in dispaly resolution of 1024 by 768. I want to deploy the same code on a machine having a resolution of 800 by 600. how do i scale down my front panel objects to 800 by 600 resolution .
    I want to do it programmatically.
    Suresh Thangappan

    To get best control, you will need to do it programmatically. Using the property nodes, all controls can be moved and resized. Resizing is problematic, however, because there is no single method that works for all controls. The top level Bounds property is read-only. It should be used to make sure whatever you did to change the size resulted in the size you expected. You will need to search the control–specific properties for the one which resizes your control of interest. For example, the Plot Area.Size property changes the size of a Waveform Graph.
    You can link one control to the size of the panel and have it scale automatically. Do this by selecting the object, then selecting Edit>>Scale Object with Panel. I typically use this for the main object on my panel. The rest of the objects are then moved around the rescaled object, but not rescaled. You will have to rescale them yourself, and move them again if you do not like the position. You will probably want/need to change font sizes on numerics.
    What you are trying to do is possible, but it is also tedious. Good luck! Let us know if you still have problems.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Copy paste a front panel object to the very same xy location

    Hello,
    Just a practical question, but I would need this kind of feature very often:
    How can I copy-paste a front panel object to the very same location? Lets consider I have a TAB container, and on the first page, I have a Graph. I would like to make a same graph on the second page of the TAB, but at the very same XY location compared to the TAB container.
    Thanks very much!
    Solved!
    Go to Solution.

    hm, I have just realized, there is an option to "duplicate page" for the TAB containers And it does the magic for me, creates the exact copies of all the objects

  • Using config files to setup front panel objects and DAQ info.

    I am trying to write a program that condenses 5 versions into one. I need to be able to load a configuration file based on the users choice of which machine they are using and use that information for my dropdown boxes and for what was constants in a case structure based on a choice from the droplist.
    For example, if a certain part was selected, it had 5 limits listed as constant that the data aquired was compared to. The limits were inside a case structure wired to the droplist.

    "I have a case structure that is connected to a digital line. The program receives a value from the machine's PLC and it picks the appropriate case. Inside this case, there are constants for tolerances for the measurement that was selected. Each case has the same number of constants to control the tolerances for 5 different characteristics of the measurement. There are 32 cases each with different values. The problem is, I have 5 different versions of the program with up to 32 cases in each structure, (over 150 different sets of tolerances). I do not have them all in one program as the same case number is used somewhere else and may have different values. The display information on screen is also different from one machine to the other, and I want to
    be able to hide or show certain front panel objects. I would like to set up an .ini file of some sort that stores all my case selections and load them in blocks, on one machine i load these 32, on a different machine, load the other, etc. Also be able to load the preferences for what is visible and what is not on the front panel."

  • What can affect the size of a front panel object between versions of Windows?

    Greetings, all!
    I have a client that wants to use a piece of LabVIEW code on Windows XP, Vista, and 7.  The application was originally written to run on XP machines, so everything looks OK there.  However, on Vista or 7, certain front panel objects appear larger than they do on the XP machine (in one example, all of the string fields in an array of strings are taller).  Other objects (such as a text label) appear smaller.
    The machines in question all appear to have comparable DPI settings, and monitor resolution does not seem to be a factor.  The application uses Application Font in various sizes in the cases of interest.  Can anyone suggest some other things we can check?
    Thanks!

    This issue is coming up more and more lately.  Particularly as people move to Win7 machines.  I've seen differences between my home Vista machine and my work XP machine.
    It comes down to the system fonts used by the different OS's.  XP's basic font is Tahoma.  Vista uses Segoe.  I believe Win7 is the same as Vista, but I'm not sure.  The fonts appear similar, but one font or the other is slightly larger.  So any features that are based on a font size will change.  This includes the sizing of labels.  Text within local, shared, global variables, and references.  Enough that it can cause wires to move a few pixels on a BD, and objects that are aligned on one system to look slightly misaligned on another.
    I think that if you set the fonts you use to a specific font, rather than Application font (which is taken from one of the current Windows font settings, you will avoid the issue.  The other possibility is to define which font is used for the application font within your LabVIEW.ini.  (Or the application's .ini file if it is built into an .exe.)
    Do some searching on the forums for application font, system font, dialog font, windows versions.  You'll find quite a few threads where people had different variations of this problem.

Maybe you are looking for

  • Boot Camp Windows 7 No Longer Connects to Internet

    Hello, I have a mid 2011 iMac with Boot Camp Windows 7 installation.  It has run flawlessly for more than a year.  Recently however, I have been untable to connect to internet when running Windows.  The connection works fine as a Mac.  While in Windo

  • Hard drive storage issue - "Other" and not showing correct data usage

    I'm currently using a MacBook Pro (Retina 15" Mid 14') which I purchased less than a month ago. Based on my "about this mac" storage summary, I'm using over 190GB, yet I can only account 67GB of usage. I've restarted and reindexed my spotlight search

  • Wav - windows media file properties

    hi all, is there a way to get properties from a .wav (windows media) file? for example, the time duration of the media? thanks in advance. Giovani Salvador

  • Premier elements 11

    I have recently bought premier elements 11. I open the icon, click on new project, it looks to try and open but it then close. I then get a message... We have detected an incompatible display driver. To get a better and faster performance, please upd

  • MBP 2013 Sleeping, fans running, but no display

    Hi. I have this reocurring problem with my MBP late 2013 (the £1.8k model). Sometimes when I put the machine to sleep it will not wake but the fans will be running and the only way to recover from this state is to reset the machine using power+alt or