Continuously Updating GUI

Hi,
I'm just wondering whats the best way to write a VI that includes two parts: one being an event driven GUI and the second being a continuously updating data display (i.e. temperature displays and graphs)? Would the only way to accomplish this to have both the controls and data collection incorporated in one loop and forget about an event structure? Both controls and data collection is for the same device and each command/query requires sufficient time for the device to process. 

No, have the GUI display the data as well as have an event driven "control" part but put the data acquisition in another loop (or better yet another vi). They can communicate through any number of means; functional globals, queues, etc. Search on Producer-Consumer structures, both here (forum) and in the LabVIEW examples in your LabVIEW installation.
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion

Similar Messages

  • Windows 8.1 update continues updating 6 hour after

    This morning Windows ask me to reboot for install some updates, I say yes and now six hours after it continues updating at the same step 'installing update 6 of 12'
    I don't know what to do. Can I stop the updating process? I tried to switch off my computer one hour ago but the computer (laptop) doesn't switch off just sleeps until I press the power button again.
    Some clues?
    My laptop: Toshiba satellite L850-150, Windows 8.1 x64, Intel i7, 8 GB RAM, SSD hard disk.

    Hi Carlos,
    Thank you for the update.
    If any further help needed, please feel free to ask in TechNet.
    Best regards
    Michael Shao
    TechNet Community Support

  • Continual updating of previews and thumbnails. Why and how to stop it?

    I am switching over to Aperture after having manually managed my files in order to see if there is any benefit for me as my photo collection is getting a bit out of control.
    I have imported as projects all my folders of images. Now Aperture runs very slowly and is continually updating previews and thumbnails. Is there anything I can do to stop this or is this just part of the process of the system going through my files and generating the previews and thumbnails? If so how long can this take? Its been almost a day so far!
    I did read a support document TS1360 which mentioned that items need to be migrated to RAW 2 format from version RAW 1. This would be fine but I have no idea how to find the images if this is the case. If its all my images then that could make for a real mass migration!
    Any thoughts?

    Raw v1 and raw v 2 relate to changes in the raw processing engine between aperture v 1x and 2x there is no need for you to worry about this if your images never resided in an Aperture v1 application.
    Regarding previews & thumbnails, it is a good idea to let aperture build the thumbnails and previews. This will take some time depending on the size of the image files and the quantity of images you imported into Aperture.
    If you have no plans to use the functionality previews gives you can switch off that function in the preferences and in the Library (cog wheel) settings. But previews may be necessary depending on how you have set you your Library and if the files are referenced or actually reside with the Library file structure. Referenced files without previews need to be physically available to aperture for aperture to display them. Referenced files on an external HD with previews will display in the library even if the drive is off line, however the image displayed is only the preview in this case.
    The PPC G5 you have will labour importing large qty's of images for the first time, however given the chance to build everything, it should function reasonably thereafter. But It's (G5) really the absolute minimum and less than ideal platform at this stage.
    Hope this helps.

  • My iPad won't continue updating software?

    I Was updating my iPad Air's software to iOS 7.1.2 and I lost wifi connectivity in the middle... Now  when I go to settings->general->software update the gears are turning but the blue bar is gone and it says that it is downloading without anything actually happening... It has been like this for hours. I tried rebooting the iPad but nothing happened.

    Thank you Briansyddall
    I tried restarting the iPad the way you said I should. It refreshed the iPad but it didn't continue updating. I put the iPad in the charger and then it worked! Turns out the battery has to be either more than 50% full or plugged into the charger in order to update it's software... Thank you for the help though!

  • Apps Store continuing updating Apps even I stopped it

    Pressed "Update All" wrongly in Apps Store. Have "Stop" it but it still continuing updating in background even I off "App background Refresh" & "Auto update". Please help that how to stop updating my apps. Thanks!

    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ General
    Select your preferred browser in the menu labeled
    Default web browser

  • HT5704 please help me why i cant continue updating my iphone?

    Hi, I try to upgrade my iphone 3GS version 4.1 to become 6.1, I download the itunes then now why its cannot continue updating my iphone? always says that we are sorry, we are unable to continue activation of this time. Please try again later or contact customer care. Please help me for this problem.

    Most likely, your phone was hacked to carrier unlock.  When you updated, the hack was removed and the phone is now re-locked to its original carrier.  It will now activate and operate only with that carrier, using their SIM card

  • (paid support) Pacman Update GUI

    Below the project description. If you are interested in doing this programming job, please email/pm me.
    If there are questions, please reply to this post.
    Pacman Update GUI
    Archlinux (http://www.archlinux.org/) uses the pacman package manager. A number of GUI applications to control this package manager exist (http://wiki.archlinux.org/index.php/Pac … _Frontends), but none suit our needs.
    For this project you will need to design and implement two independent GTK+ applications: an Update Manager and an Update Applet. The Update Manager must be an application that guides the user through updating the system. The Update Applet must be an application which shows a systray icon. This application will check for updates once in a while and notify the user if there are updates.
    Both applications must be internationalized/localized and written in C, C++ or Python. The applications should have as little dependencies as possible. The applications must include installation scripts. The applications must be installed in compiled form. Any configuration needed for these tools should be systemwide. We do not need a gui for configuration.
    Update Manager
    The Update Manager must be an application that guides the user through the steps of updating the system with as little effort and as little user interaction as possible. You are expected to first define the minimal amount of steps required, design the application and then implement the application (gui and internals).
    There are two possibilities for this applications:
    1. You develop it from scratch.
    2. You modify the gnome update manager (used in eg ubuntu) to work with pacman.
    We will rely on your expertise to decide which approach is best.
    Update Applet
    The Update Applet provides a systray icon which checks for system updates in regular intervals. The applet should have a tooltip showing the update status, and a context menu with a few options, such as "Check for updates now", "About" and "start Update Manager". You are expected to design and implement the application.

    I don't get why you should allow your users to update their OS(that is their GUI, their kernel, xorg, libc and other _core_ functionality). These components are already quite "great" and shouldn't need upgrading if that is your worry. Only in the case of some new device coming out and the kernel or xorg need to support it i can see the problem. This should happen very rarely though. I mean, why should you allow your OS to be upgraded by some lowly non-tech users. I don't know of many workplaces which allow their users to upgrade their windows versions for example...
    You could always upgrade the OS every X years if needed.
    If the boss wants his emplyees to be able to download whichever apps/games they want then ofcourse you could allow this, but this should only be allowed if said apps/games doesn't drag in new versions of xorg, kernel versions or other core functionality or its dependencies.
    Just blacklist these in pacman.conf and make the file unwritable for the users...
    This way you only need external repo for apps which doesn't install without user intervention.
    Here i define "core functionality" as all the code responsible for giving a "working computer" as defined by the boss and you if he's not very IT. If you are worried about security and this is why you want a constantly updating machine then just connect all the machines to a router/firewall before they are allowed onto the net. That one could be an arch machine...
    Also I haven't tried xfce in a long while but you should watch against giving "windows users/mac users" anything which isn't glitzy and full-featured, because if the users doesn't think the OS have all the functionality they "need" and they don't think it looks fancy enough they have a tendency to go back to whatever OS they came from or try to "upgrade" their own os... which might spell problems for you.
    You know, never underestimate the ingeniousness of an idiot.
    Just my 5 cents.
    Last edited by test1000 (2010-06-25 00:13:42)

  • Continuously Updating Graph Help

    Relatively new too labview. What I am looking to do is relatively simple. I have an accelerometer that I would like to aquire data from. I want to Log 5 seconds of data at 100hz. When I use a waveform graph it does not update until the entier loops have finished. I can get a live updating graph if i use a waveform chart, but the time scale is set to system time (HH:MMS). I simply want it to start at 0 seconds and go to 5 seconds. The data does not need to be logged on the graph as I will simply be outputting to a file.
    Is there a way to get a continuously updating graph using a waveform graph or is there a way to set up a waveform chart with a time scale that starts at 0 and goes until a defined value (5 seconds) 

    You must use a waveform chart. Not a graph. Goto help in the toolbar, then select Find Examples. Search for chart. 
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Is it safe to use SwingUtilities.invokeLater(), while updating GUI?

    Hi,
    I am updating GUI components in synchronized block which is runinng on main() thread my application hangs, but if I use SwingUtilities.invokeLater(...) then it runs fine.
    My question is:
    Is it safe to use SwingUtilities.invokeLater(...) in synchronized block.
    Edited by: Amol_Parekh on Nov 1, 2007 1:28 AM

    Paul Hyde in his "Java Thread Programming" (great book!!!) says it is.
    With invokeLater() you say to the Thread Scheduler you want that code to run on the Swing thread. In fact, if that is the only thing you do in the synchronized block I think it is unnecessary.
    Greetings,
    astrognom

  • Continuously update time stamp on main panel

    Hello,
    I am trying to continuously update/show the time stamp based of a fixed starting point.  I made a SubVI, to accomplish the task, however, how can I go about using this subVI into a main program?  Alternatively, how can I continuously update the timestamp on the main VI?
    Any help will be greatly appreciated.
    Thanks,
    hiNi.
    Attachments:
    Update timestamp.llb ‏25 KB

    Why you want to read time stamp from Subvi. If you’re not doing anything in subvi (except time) then there is no use. You can simply update your time in Main VI ( as per my previous post).
    Please check this VI. I hope this will help you.
    Munna
    Attachments:
    Update timestamp_MOD.llb ‏31 KB

  • Stop plots from continuously updating in edit mode

    I have many plots on a graph in the Report section of DIAdem. When I am trying to put lables in for the axes and a title for the plot, every move I make I have to wait like 10 seconds because it re-updates all the plots. Is there a way to stop the plots from continuously updating during the edit phase?

    Hello amaglio,
    I have another indirect suggestion that might help with your questions.
    Starting with DIAdem 2011 we have a new display type that allows you to add points to graphs programmatically, i.e. you will be able to enter the X and Y of a curve you wish to point to and DIAdem will draw an arrow to that point, and move it when you resize an axis system. See example plot below.
    You can join the Beta test for DIAdem 2011 and test this for yourself at http://www.ni.com/beta - you can use my email address (our email addresses are [email protected]) for the NI reference to participate in the Beta test.
    I know that doesn't solve your immediate issue, but it might solve your problem when DIAdem 2011 is released and you will be able to automate the task you are right now doing manually.
    I hope this helps a little.
         Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • TA20920 Mac original is 10.6 and have upgrate to 10.6.8 and than i continue updating to 10.8 and this kind of message always appear until i turn off and turn it on. what is the solution for this message

    i got Mac originally version is 10.6 and have upgrate to 10.6.8 and than i continue updating to 10.8 and this kind of message always appear until i turn off and turn it on. what is the solution for this message

    This message?
    http://support.apple.com/kb/TA20920
    is a difficult one to resolve.
    There is an analysis and suggestions to this problem posted here.
    http://www.thexlab.com/faqs/kernelpanics.html

  • Updating GUI

    Hello Techies,
    How can i update my gui.
    My gui is having 2 combo boxes , one text field and one button. when i click on button the request must go to the TCP server and receive the responses from TCPServer.
    My problem is that when i first click on Button,the request is going to the TCP and getting reply.
    I will get continuous responses from TCP server.
    I am getting first response from the server.
    Second response I am getting the following error.
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at javax.swing.JComponent.getComponentGraphics(Unknown Source)
         at javax.swing.JComponent.paint(Unknown Source)
         at javax.swing.JComponent.update(Unknown Source)
         at testForSwing1$4.run(testForSwing1.java:475)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)Here is my Code
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.GraphicsConfigTemplate;
    import java.awt.GraphicsConfiguration;
    import java.awt.Image;
    import java.awt.Label;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.lang.reflect.InvocationTargetException;
    import java.net.Socket;
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.*;
    import javax.swing.plaf.ComponentUI;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.SAXException;
    public class testForSwing1 extends JPanel implements ActionListener {
        public static Socket socket ;
           JTextField textField;
           JComboBox exchangeComboBox;
           JComboBox fieldsComboBox;
           JButton button;
            public testForSwing1(List List, List )
         super();
         // TODO Auto-generated constructor stub
         JLabel exchLabel = new JLabel("xxxName");
         xxxComboBox = new JComboBox(List.toArray());
         add(xxxLabel);
         add(xxxComboBox);
                          xxxComboBox.addActionListener(this);
         out = outStream;
         in = inStream;
         JLabel fieldLabel = new JLabel("yyy");
         fieldsComboBox = new JComboBox(fieldsList.toArray());
         add(fieldLabel);
         add(fieldsComboBox);
         fieldsComboBox.addActionListener(this);
         textField = new JTextField(15);
         add(textField);
         button = new JButton("clickMe");
         button.addActionListener(this);
         add(button);
         public void actionPerformed(final ActionEvent ae)
         final  JButton ts = (JButton)ae.getSource();
         if ((ae.getActionCommand().equalsIgnoreCase("clickMe"))) {
         //try
         Runnable tcpConnection = new Runnable()
         public void run()
                  try
                        out = new DataOutputStream(socket.getOutputStream());
                          in = new DataInputStream(socket.getInputStream());
                                                                                          out.writeBytes(ram);                               
                  out.writeByte('\n');
                                                                     while(socket.getInputStream()!= null)
             System.out.println("echo: " + in.readLine());
             update( grap );
    catch (IOException ioe) {
                         System.out.println("IOException"+ioe.getMessage());
                                                 SwingUtilities.invokeLater(tcpConnection);
                                  break outt;
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              //List list1InMainMethod = new ArrayList();
              //List list2InMainMethod = new ArrayList();
                  try {
                   File sourceXmlFile = new File(args[0]);
                   File fidsXmlFile = new File(args[1]);
                   DocumentBuilderFactory dbFactory = DocumentBuilderFactory
                             .newInstance();
                    socket = new Socket("test",90);
         createAndShowGUI(xxxFile, yyyFile);
              } catch (ParserConfigurationException pce) {
                   // TODO: handle exception
                   System.out.println("ParserConfiguration exception"
                             + pce.getMessage());
              } catch (SAXException saxe) {
                   // TODO: handle exception
                   System.out.println("SAXException" + saxe.getMessage());
              } catch (IOException ioe) {
                   // TODO: handle exception
                   System.out.println("IOExceptionxxxx" + ioe.getMessage());
    public static Graphics grap;
         public static void createAndShowGUI(List list1InCreateAndShowGUI,
                   List list2InCreateAndShowGUI,DataOutputStream out,DataInputStream in) {
              // Make sure we have nice window decorations.
              //try
              JFrame.setDefaultLookAndFeelDecorated(true);
              // Create and set up the window.
              JFrame frame = new JFrame("ComboBoxDemo");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         JComponent newContentPane = new testForSwing1(list1InCreateAndShowGUI,
                        list2InCreateAndShowGUI,out,in);
              newContentPane.setOpaque(true); // content panes must be opaque
              //grap = newContentPane.getGraphics();
              frame.setContentPane(newContentPane);
              // Display the window.
              frame.pack();
              frame.setVisible(true);
    }I had posted only GUI coding only..
    SwingUtilities.invokeLater(new Runnable()
                       public void run()
                                        try
                                              out = new DataOutputStream(socket.getOutputStream());
                                              in = new DataInputStream(socket.getInputStream());
                                              //Change
                                             out.writeBytes(s);                               
                                              out.writeByte('\n');
                                              //change over
                                            while(socket.getInputStream()!= null)
                                           System.out.println("echo: " + in.readLine());
                                           Object c = in.readLine();
                                           update(grap);
                                        catch (IOException ioe) {
                                                 // TODO: handle exception
                                             System.out.println("IOException"+ioe.getMessage());
              I am getting nullpointer exception in update(grap);
    If i dont use this update(grap) my gui is going to block.
    How can i solve this problem. Plz guide me. I had stucked here very long time back.
    Thanks(Inadvance),
    ramu.

    Hello camie,
    The above problem is working fine when i create thread for each request.
    when i use nio,instead of threading, the gui is not responding i.e going to be stucked.
    I am using nio , since the response from the Server which is appearing in the console is sometimes is machine code, some times some of the characters in the response is missing.
    Here is my code.
    public class JabberClient1
          testForSwing1 tfs1 = new testForSwing1();
          public void connect(String s,testForSwing1 tfs,SocketChannel  scc,Selector see)throws IOException
               SocketChannel sc = scc;
               Selector sel = see;
              String str = s;
               tfs1=tfs;
              try 
                      int i = 0;
          // Because of the asynchronous nature you do not know
          // when reading and writing is done, hence you need to
          // keep track of this, boolean written is used to
          // alternate between read and write. Whatever is written
          // is echoed and should be read.
          // boolean done is used to check when to break out of
          // the loop
          boolean written = false, done = false;
          String encoding = System.getProperty("file.encoding");
          Charset cs = Charset.forName(encoding);
          ByteBuffer buf = ByteBuffer.allocate(1024);
            while(!done) {
            sel.select();
            Iterator it = sel.selectedKeys().iterator();
              while(it.hasNext()) {
              SelectionKey key = (SelectionKey)it.next();
              it.remove();
              tfs1.repaint();
              sc = (SocketChannel)key.channel();
              if(key.isConnectable() && !sc.isConnected()) {
                   System.out.println("is connected");
                InetAddress addr = InetAddress.getByName(null);
              if(key.isReadable() ) {
                if(sc.read((ByteBuffer)buf.clear()) > 0) {
                                      System.out.println("is reading()");
                     String response = cs.decode(
                    (ByteBuffer) buf.flip()).toString();
                  System.out.print(response);
                  if(response.indexOf("END") != -1)
                  done = true;
                  tfs1.repaint();
              if(key.isWritable() &&!written ) {
                   System.out.println("is writting");
                 System.out.println("string length"+s.length()); 
                if(i < s.length())
                     sc.write(ByteBuffer.wrap(new String(s+ '\n').getBytes()));
                else if(i == s.length())
                     sc.write(ByteBuffer.wrap(new String("END\n").getBytes()));
                written = true;
              tfs1.repaint();
                i++;
        } finally {
          sc.close();
          sel.close();
      in my testForSwing1.java program
      public static void main(String[] args)
                sc = SocketChannel.open();
                sel = Selector.open();
                sc.connect(new InetSocketAddress("localhost", 7890));
                sc.configureBlocking(false);
                sc.register(sel, SelectionKey.OP_READ |
                                       SelectionKey.OP_WRITE  |  SelectionKey.OP_CONNECT);
    JabberClient1 jc= new JabberClient1();
    System.out.println("sxxxxxxx"+s);
    try
         jc.connect(s,tfs,sc,sel);
    catch (IOException e)
         System.out.println("ioexception"+e.getMessage());
                  Second code which i had placed is not complete.
    my gui is not respondin when the i want to second request.
    plz guide me.....
    regards,
    ramu.

  • J2ME update gui while running MIDlet

    Hello all,
    I've got a method in my MIDlet which is to show a new form for about 2 seconds and then revert back to the application. It already does all of it's calculations right but it simply does not update the GUI until after the 'return' statement.
    Does anybody know why it does not update the GUI before waiting those two seconds and how could I make it do that? Below is my (greatly oversimplified) code.
         public int Throwing(int diceResult)
                   Form fi = new Form( "Dice" );
                   fi.append("lalala");
                   getDisplay().setCurrent( fi );
              Thread currentThread = Thread.currentThread();
              try {
                   synchronized(this)
                   System.out.println("waiting");
                     wait( 2000 );
                   catch ( InterruptedException ie )
                        System.out.println("Exception caught");
                   System.out.println("Returning");
                 return diceResult;
         }

    What do you mean "the main 'UI' thread continues'. Of course it does. Otherwise your MIDlet becomes unresponsive, as you have seen.
    I imagine what you want is something to be done when Throwing() finishes (like setting a new displayable with the results). In that case you have to make that part of the thread that calls Throwing(). Something like this, maybe:
    public void run() {
      int result = Throwing(5);
      Form f = new Form("Results");
      f.append("The result is " + result);
      getDisplay().setCurrent(f);
    }shmoove

  • Update GUI during db query

    Folks'es,
    i have the following problem:
    * i have to perform a database query during a drag operation
    * the query can take quite some time
    * while the query is performed, i would like to show at least some text in my GUI telling the user what happens
    * i need to wait for the query to finish before i can continue.
    question:
    how can I update the GUI while a lengthy, synchronous operation is done on the event thread?
    thomas
    PS: i know about SwingUtilities.invokeLater() but i can't get it to do what i need (i'm too thick :().

    I recommend the paintImmediately() method. Here is a
    thread that shows it in action:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=23
    114you're a hero! i must have been blind for the last 4 yrs!
    thanx,
    thomas

Maybe you are looking for

  • Re: How to create new subtypes for OM  Custom infotype

    Hi Gurus, I  facing  problem when creating for Subtypes in  OM , i need create Infotyes with Subtypes in OM.Check below steps how i created 1. I create Structure in se11. HRI9119 2. In PPCI , i create infotype 9119 3.In SM30 , I Maintain table T777i,

  • I need help in ADI Tool

    Hi all Is possible to use arabic language in the Oracle ADI Report, that's language is not exist on the language option. Regard

  • Doubts with working in BI

    Dear Experts, I am sure SAP follows the same concepts in BI as just recently i have worked in JasperSoft Talend Open studio. But i have some doubts with BI. I created a RFC in ABAP. Used that RFC to bring data for a single day as parameter  on to ing

  • How to use a custom jDialog ?

    Hi to everybody I have a little custom jdialog with only a jTextField inside. I'd like to know how to call it from another JFrame and then read the text which the user have written. Any advices ? Thank u in advance and greetings from Italy Andrea

  • Photoshop elements 13 boxed product - where is the serial number? It's not on the back of the box.

    I'm unable to install my photoshop elements 13 as I can not locate the serial number. I bought a boxed product. There is a label on the back of the box, but it doesn't have a 24 alpha numeric code on the back...( a bunch of other numbers but nothing