While loop never stops after reading the result

I 'amattaching the program with thismessage in which while loop never stops, going on continuing until I stops it manualy using the off button What i have to do to get it off automatically afetr execution and reading the query and getting the result in Read in Front panel
Attachments:
PMd VI.vi ‏33 KB

Your stop condition is "continue if true". This means that, unless you press the button, the while loop will stop after one iteration.
First, you should change the termination condition to "stop if true".
Then you should make the stop button "latch when released" (right-click..mechanical action). Else you don't have a well defined state after the program stops.
You should decide on a reasonable loop rate and enter it for the wait control. (beter use a diagram constant if the value is always the same).
Why do you need to continue reading in a loop? Are you expecting the response to change over time?
Do you want to keep appending to the string indicator or only show the latest characters received?
Maybe you also need a wait between the writing and reading?
Delete the ms timer value indicator, it is completely useless.
Do you get any error codes?
Don't use the run continous button. Use the plain run button.
What device are you communicating with? Do you have documentation?
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Execution stops after retrieving the factory from the ServletContext while

    Hi,
    I just started working with Quartz, so I am clueless as to why I am getting this error. This is my first time tying to integrate Quartz 1.6.0 in a web app. I am using the JSF Framework. Although I have added the necessary jars I am still getting the error above: servlet.jar not loaded. If you follow the java code and server output you can see that after retrieving the factory from the ServletContext there is no further execution . Following is the definition of the class used for scheduling:
    Quartz Version: 1.6.0
    IDE : Netbeans 5.0
    AppServer: Tomcat 5.5
    *************************************** JAVA CODE *************************************
    * BirthdayScheduler.java
    * Created on May 20, 2008, 5:24 PM
    package com.csg.cs.cscomwebdev.servlet.timer;
    import java.io.*;
    import java.net.*;
    import java.util.Date;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.quartz.JobDetail;
    import org.quartz.SchedulerException;
    import org.quartz.SimpleTrigger;
    import org.quartz.impl.StdSchedulerFactory;
    import org.quartz.Scheduler;
    * @author Arijit Datta
    * @version
    public class BirthdayScheduler extends HttpServlet {
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    out.close();
    /** Handles the HTTP <code>GET</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    /** Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    /** Returns a short description of the servlet.
    public String getServletInfo() {
    return "Short description";
    public void init()
    System.out.println(" ------------ STARTTING JOB --------------");
    // Retrieve the ServletContext
    ServletContext theApplicationsServletContext = this.getServletContext();
    // Retrieve the factory from the ServletContext
    StdSchedulerFactory factory =(StdSchedulerFactory)theApplicationsServletContext.getAttribute("QuartzFactory Servlet.QUARTZ_FACTORY_KEY");
    System.out.println(" ------------ FACTORY GOT --------------");
    try {
    // Retrieve the scheduler from the factory
    Scheduler scheduler = factory.getScheduler();
    System.out.println(" ------------ SCHEDULER GOT --------------");
    // Start the scheduler
    scheduler.start();
    System.out.println(" ------------ SCHEDULER STARTED --------------");
    //Creating a job
    JobDetail birthdayJobDetail = new JobDetail("birthdayReminderJob", scheduler.DEFAULT_GROUP, BirthdayReminderJob.class );
    System.out.println(" ------------ JOB CREATED --------------");
    //Creating a trigger
    SimpleTrigger birthdayJobtrigger = new SimpleTrigger("birthdayReminderTrigger",scheduler.DEFAULT_GROUP, new Date(),null,SimpleTrigger.REPEAT_INDEFINITELY, 60L * 1000L);
    System.out.println(" ------------ TRIGGER CREATED --------------");
    //Scheduling the job
    scheduler.scheduleJob(birthdayJobDetail,birthdayJobtrigger );
    System.out.println(" ------------ JOB SCHEDULED --------------");
    } catch (SchedulerException ex) {
    System.out.println(ex.getMessage());
    } ************************************* SECTION OF WEB.XML ************************
    <servlet>
    <description>Quartz Initializer Servlet</description>
    <servlet-name>QuartzInitializer</servlet-name>
    <servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet -class>
    <init-param>
    <param-name>shutdown-on-unload</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>start-scheduler-on-load</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>BirthdayScheduler</servlet-name>
    <servlet-class>com.csg.cs.cscomwebdev.servlet.timer.BirthdayScheduler< /servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet> *********************************** SERVER OUTPUT *******************************
    Using CATALINA_BASE: C:\Documents and Settings\165171\.netbeans\5.0\jakarta-tomcat-5.5.9_base
    Using CATALINA_HOME: D:\Program Files\netbeans-5.0\enterprise2\jakarta-tomcat-5.5.9
    Using CATALINA_TMPDIR: C:\Documents and Settings\165171\.netbeans\5.0\jakarta-tomcat-5.5.9_base\temp
    Using JAVA_HOME: C:\Program Files\Java\jdk1.5.0_02
    May 20, 2008 7:27:13 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    May 20, 2008 7:27:13 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 766 ms
    May 20, 2008 7:27:13 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    May 20, 2008 7:27:13 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
    May 20, 2008 7:27:13 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    May 20, 2008 7:27:14 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(D:\Java Programs\cs\CSCOMWEBDEV\build\web\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    log4j:WARN No appenders could be found for logger (org.apache.catalina.session.ManagerBase).
    log4j:WARN Please initialize the log4j system properly.
    ------------ STARTTING JOB --------------
    ------------ FACTORY GOT --------------
    May 20, 2008 7:27:15 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    May 20, 2008 7:27:15 PM org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    May 20, 2008 7:27:15 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/32 config=null
    May 20, 2008 7:27:15 PM org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    May 20, 2008 7:27:16 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2802 ms Can anybody please help out? Where exactly am I going wrong?
    Thanks a lot!
    AD

    Your stop condition is "continue if true". This means that, unless you press the button, the while loop will stop after one iteration.
    First, you should change the termination condition to "stop if true".
    Then you should make the stop button "latch when released" (right-click..mechanical action). Else you don't have a well defined state after the program stops.
    You should decide on a reasonable loop rate and enter it for the wait control. (beter use a diagram constant if the value is always the same).
    Why do you need to continue reading in a loop? Are you expecting the response to change over time?
    Do you want to keep appending to the string indicator or only show the latest characters received?
    Maybe you also need a wait between the writing and reading?
    Delete the ms timer value indicator, it is completely useless.
    Do you get any error codes?
    Don't use the run continous button. Use the plain run button.
    What device are you communicating with? Do you have documentation?
    LabVIEW Champion . Do more with less code and in less time .

  • Hash problem while split the fileds after reading the file(In V4.6C)

    <<Frequently Asked Question>>
    Hi Experts,
    I have uploaded the file with tab delimiter in application server,tab is replaced with hash(#) in the application server.How we split the fields after reading the record.i am working on 4.6c version.
    Edited by: Matt on Dec 6, 2009 1:39 PM

    Dear thr,
    Could you please share your experience that how it got resolved as i am using standard transaction ve94 and tab delimited file is converted into Hash delimited file and # is also uploded with the data that is unwanted for it.
    Thanks
    KuldeepJain

  • My MacMini does not stop after giving the order ''switch off''.What can I do?

    My MacMini does not stop after giving the order ''switch off''.
    It stops only, after pushing the button ''on/off'' for some seconds.
    What can I do?
    frahsun

    boot the Mac into safe mode, repair permissions while in it, then reboot normally.
    if that doesn't help, try resetting the System Management Controller (SMC).

  • HT203433 After reading the sample for Hard Measures and buying and downloading, the downloaded book was missing 9 chapters. Anyone know how to fix this?

    After reading the sample for Hard Measures and buying and downloading, the downloaded book was missing 9 chapters. Anyone know how to fix this?

    Hi Charles...
    Try re downloading the iBook >  Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • HT203167 I purchased the full book from the iTunes Store after reading the sample but the full length will not download only the sample  how do I fix this?

    I purchased a full length book after reading the sample but only the sample will download  how do I fix this   as the full length book appears under purchased books?

    First try a Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least Ten seconds... (But can take Longer)... until the Apple logo appears. Release the Buttons
    If no joy... Try a Restore...
    1: Connect the device to Your computer and open iTunes.
    2: If the device appears in iTunes, select and click Restore on the Summary pane.
    3: If the device doesn't appear in iTunes, try using the Steps in this article to force the device into Recovery Mode.
    From Here
    http://support.apple.com/kb/TS3281
    Make sure you have the Latest Version of iTunes (v11) Installed on your computer
    iTunes free download from www.itunes.com/download
    Note on Recovery Mode.
    You may need to try this More than Once... Be sure to Follow ALL the Steps...
    Once you have Recovered your Device...
    Re-Sync your Content or Restore from the most Recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766

  • HT3680 where can i find this program after reading the whole story?

    where can i find this program after reading the whole story?

    could this knowledge base article be what your looking for?:
    HT3680

  • Two while loops working in parallel at the same time

    Hello, how can I run a .vi with two while loops working in parallel at the same time? . I want that when I run a vi both can be activated o desactivate, but I can't get it. What can I do?
    Thanks a lot.
    Luz

    Here are some links for state machines.
    http://zone.ni.com/devzone/conceptd.nsf/webmain/c7​4cec177a289dbd86256c4e00600196
    http://zone.ni.com/devzone/conceptd.nsf/webmain/8C​4EECACF084F8E986256802007B9186
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/137​47
    http://sine.ni.com/apps/utf8/niepd_web_display.dis​play_epd4?p_guid=B45EACE3DE6756A4E034080020E74861
    http://sine.ni.com/apps/utf8/niepd_web_display.dis​play_epd4?p_guid=B45EACE3E1E956A4E034080020E74861

  • AI Read is executing only once in a while loop instead of continuously scanning the channels

    The ultimate goal is to sample 15 channels (1 at 20kHz, 9 at 1000Hz, and 5 at 100Hz). Since only one scan rate is possible, I would like to reduce the data (for both displaying and saving purposes). The decimate function does not seem to work correctly.
    Attached is the current subroutine used to 'decimate' the data. It seems to work on the first loop iteration, as seen by the data block with correct time stamps and data values, but with each additional iteration, all values are zero. Why is only one scan being used in the displaying of data?
    Attachments:
    Acquire_N_ScansNM4.llb ‏76 KB

    When you call AI Clear, the DAQ session is over. You will not get any new data by calling AI Read after an AI Clear. Move your AI Clear to the right of your while loop such that it runs after the while loop completes. Don't forget to wire an error cluster or DAQ session ID to AI Clear from inside the while loop to create the data dependency. Also, consider adding a shift register for the error cluster and some way to exit the loop on an error.
    Remember that Alliance Members are here to help. We do this stuff every day.
    Daniel L. Press
    PrimeTest Corp.
    www.primetest.com

  • How to stop execution in while loop without stopping execution of other loops in the same vi

    HI
    I am quite a novice in Labview.
    I have a problem in my project. I used a while loop inside my vi to build an array of ten values along with other loops. Then I used a stop button to stop manually the while loop. But it seems like the loop doesn't stop in the middle of the array building and so other loops in the vi doesn't work until the while loop finishes building the array and as soon as while loop execution is over, the complete vi stops. But all that I wanted was to build the array using the shift register along with the control to stop building array anytime. And not to stop execution of other structures when the while loop finishes.
    Can anyone help me?
    Rahul

    Hi Rahul,
    Modified ur Vi to work with single button.
    But the subtract case is not in any loop.
    So, once both the loops stop, the subtract case will execute only once. Depending on state of subtaract boolean at that time, corresponding case will be executed and the Vi will stop.
    so think of a logic where u can put this also in a new loop.
    Or you can also incorporate it in one of the two loops and pass the other loop's data to it.
    Let us know how you will proceed in this regard
    I am posting your VI as well a VI with my modifications VI in Labview 7.0 so that Thomas can give his suggestions too
    Plus, always keep a time delay in your while loops.
    Oh sorry, the "arrayinouttestnewfinal.vi" is the modified vi
    Regards
    Dev
    Message Edited by devchander on 01-10-2006 06:15 AM
    Message Edited by devchander on 01-10-2006 06:19 AM
    Attachments:
    arrayinouttestnewfinalnew4.vi ‏59 KB
    arrayinouttestnewfinal.vi ‏63 KB

  • First i open google search page.after seeing the results if i click in any site the site appears in a new tab.how can i stop this?

    these days i face this problem.whenever i click on a site it appears in a new tab.how can i stop it?

    The Google Search setting has an option '''Where results open'''. If it is selected, you can try deselecting that. If it doesn't solve the problem, please check if this happens in [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]. Safe mode disables the installed '''Extensions''', and themes ('''Appearance''') in '''Tools''' ('''Alt''' + '''T''') > '''Add-ons'''. Hardware acceleration is also temporarily disabled - the manual setting is '''Tools''' > '''Options''' > '''Advanced''' > '''General''' > [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Advanced%20panel?as=u '''Use hardware acceleration when available''']. All these settings/options/add-ons can also be individually or collectively disabled/enabled/changed in Firefox normal mode to check if an extension, theme, option or hardware acceleration is causing issues. Disabling/enabling hardware acceleration, and some types of add-ons in normal mode may require a Firefox restart.
    [http://support.mozilla.com/en-US/kb/Uninstalling+add-ons Uninstalling Add-ons]
    [http://kb.mozillazine.org/Uninstalling_toolbars Uninstalling Toolbars]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.org/en-US/kb/Options%20window Options]

  • How do I exit a while loop which has a 'read from spreadshee​t' pop up in it?

    I have a while loop which calls 'read from spreadsheet'. My problem is that after entering a filename the loop repeats too quickly for me to hit the end loop button. How do I exit the loop without adding a delay after the read thereby slowing the loop when I don't want to exit. If I select cancel I get 'error 43'. Is there a way to to use an error handler to prevent this from popping up and use it to end the loop?

    It's the error handler inside Read From Spreadsheet that creates the message. Specifically, one of the VIs called is Read Lines From File. The last VI in there is General Error Handler. You can delete it and save it with a different name. You should also modify it to return the error cluster. You'll also want to modify Read From Spreadsheet to return the error cluster so that you can trap the error in your VI. When cancel is selected, error code 43 is generated. Stop the loop when you see 43.

  • While loop with stop button within event structure locks up front panel.

    I am not sure if this is a bug with my program or a bug within LabVIEW.  If you believe that this is a bug with my program then I will post my program to be looked at.
    The problem I am having is there is a while loop within an event structure that fires when a particular value changes.  Once the "Activate" button is pressed the while loop within the event structure starts going with a polling frequency of 1hz (1000ms wired to the "wait till next ms multiple" vi).  There is a "Deactivate" button that is wired to the stop control of the while loop and an outter while loop that resets the event structure so that the activate button is being listened to again.
    Once inside the while loop, however, none of the button are responsive within the front panel.  The VI continues to run, and only 60% of my CPU is being consumed, but none of the button or scroll bars work.  The only way for me to terminate the program is with the "Abort" button next to the "Run" button.  If I remove the event structure so that the while loop in question runs as soon as the program starts, the front panel remains responsive.  I've inserted probes within the while loop and verified that it is not running prior to the "Activate" button being asserted, and it is running after the assertion of the "Activate" button with the expected polling frequency set by the "wait till next ms multiple" vi.
    Can anyone help?  Do I need to post my code?
    -Nic

    It is typically not a good idea to stall an event structure by placing loops inside event cases. What good is an event structure if it is not free to repond to events?
    Have a look at some alternative solutions, such as in the following link:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=224817#M224817
    LabVIEW Champion . Do more with less code and in less time .

  • How can I update cluster items from inside a while loop that does not contain the cluster?

    I have a VI that contains front panel clusters and two while loops. The main cluster contains items such as a doubles "distance" and "stepsize" and boolean "step" (a whole buch of this type stuff). The first loop contains an event structure to detect front panel changes and the second contains code and sub VIs to perform operations based on detected events.
    The operator can enter data into either double or click the boolean. If distance is changed the second loop does what is required to process the change. The same happens with stepsize. If step is clicked the ±stepsize value is added to distance and the result is processed. In each case the front panel should track the result of the input and subsequent processing.
    Because the clusters are outside the while loop, they are not updated unless I click 'highlight execution' which seems to allow updating each time the execution highlight is updated. There are other issues if I move the clusters into one of the loops.
    I've tried referencing the clusters and using local variables and nothing works. It looks like overkill to use shared variables for this.
    Any ideas would be greatly appreciated.
    Thanks,
    Frank    

    Hi Ben,
    Thank you for the response. I followed the link and tried reading everything you posted on AEs but I'm afraid that I didn't understand it all. It seems that each AE example had a single input and a single output (e.g. a double). Is this the case? 
    What I have is a couple of front panel clusters containing (approximately) 18 control doubles, 8 indicator doubles, 5 boolean radio button constructs and 26 boolean control discretes. I clusterized it to make it readable. In addition I'll eventually have a cluster of task references for hardware handles.
    All I want to do is update the front panel values like I would do in a C, VB or any other language. I've tried referencing the cluster and using the reference from inside the loops. I've tied using local variables. Neither works. I'm experimenting with globals but it seems that I have to construct the front panel in the gloabal and then I wouldn't know how to repoduce that on the front panel of the main VI.  Sometimes it seems that more time is spent getting around Labview constructs than benefitting from them.
    I hope the 'Add Attachment' function actuals puts a copy of the VI here and not a link to it.
    Thanks again for the suggestion,
    Frank 
    Attachments:
    Front Panel Reference.vi ‏33 KB

  • Find feature looses focus while typing a phrase, after typing the first space character.

    The find feature now looses focus while I am entering a phrase. After entering the first word of a phrase and the space character, the find box will reposition itself to a possible result on the web page on EVERY CHARACTER and I have to reposition the cursor BACK to the find box to enter every subsequent character in the phrase I am searching for. Is there a way I can turn this useless (for me) *feature* off?
    I used to be able to key the phrase I was looking for, and the box would turn red as I typed if the phrase did not exist. I would really appreciate being able to do this again. It now seems that Firefox 'jumps the gun' to find the phrase before I have completed typing it in.
    Thanks.

    *If you have many extensions then first enable half of the extensions to test which half has the problem.
    *Continue to divide the bad half that still has the issue until you find which one is causing it.

Maybe you are looking for

  • Print in text mode to detect escape sequences

    Hello, We have got an issu, on our .NET print program using Crystal 12 SP3. The issue has concequences on : - Barcode print on matrix printer - Barcode print on thermal printer - Other commands send to a FAX printer driver Using the SDK, the print dr

  • ITunes doesn't recognize IPOD Nano (2nd Gen), but Windows XP does

    I'm a longtime happy owner of an IPOD Mini and bought a second Gen IPOD Nano a few months ago that works great. I have two identical P4 Sony Vaios that I back up/clone from one to the other every so often to keep them as identical as possible. It's b

  • Report error with the input form using the VC BI integration wizard

    Hello All, I've created a report using the BI integration wizard in visual composer. I've configured the query with the 'Free Form' query template also I've defined the filters there. This is working fine and giving me the report output. When I deplo

  • Videos with coverflow

    who would like to see coverflow for the videos in the next update? itunes supports it why doesn't the ipod touch or the iphone support it?

  • FileServlet serving from FTP

    Hello! I'm trying to create a bean that opens a PDF file from another FTP server. I have it open from a local path, but can't get it to open from a FTP host. Your help is appreciated. Thanks in advance! -Tony package aiView; import java.io.BufferedIn