How to stop a while loop which contains a timed loop

Hi,
I'm a new hand to labview, and I'm using labviw 7.1, NOT 8.x.  I'm trying to do a measurement, in which the flow would look like the attached file (I have stipped all hardware related components to make it easy to read).  My questions are:
1. In Loop 3, when the comparison (x>20.85) is true, Loop1, Loop2 and Loop3 are stopped, why it won't quit the while loop (I have wired it to  while loop stop)?
2. When it is running, I click on stop button, why it won't stop?
Thanks!
Attachments:
SyncTimedLoop32.vi ‏228 KB

hwm wrote:
2. When it is running, I click on stop button, why it won't stop?
The stop button is read outside of the inner while loops.  So the inner while loops will continue to run until their stop conditions are met.
hwm wrote:
1. In Loop 3, when the comparison (x>20.85) is true, Loop1, Loop2 and Loop3 are stopped, why it won't quit the while loop (I have wired it to  while loop stop)?
It seemed to me like it would, but sometimes it seemed like I had to set change the numeric value one more time before it would.  You have a very odd structure there by placing the event structre inside the while loop with the other loops.  I think you may be running into issues where events are getting queued up in the event structure, or race conditions between when the event structure might execute relative to the other loops.  It is all very odd and difficult to predict all the ways these structures might interact and relative timing.  Usually event structures would belong in their own parallel while loop.  I think you need to rethink exactly what you are trying to do here.  It probably isn't event necessary to use the stop timed structure functions.  A local variable or a notified to pass the "Stop status" from loop 3 to the other loops (or the separate event structure loop to the other 3) would probably be better.

Similar Messages

  • How to stop a while loop in LabVIEW from a C program

    How to stop  a while loop in LabVIEW from a C code

    hi
    I think by creating dll you can stop the while loop from your C program.For that you just create dll (Dynamic Link Library) for the VI which has that while loop.
         Anyway can u please explain ur requirement clearly.

  • How to stop a while loop after certain time using Elapsed time vi

    how to stop a while loop after certain time using Elapsed time vi.

    Hi Frankie,
    Just place the Elapsed Time VI inside the WHILE loop, and wire the 'Time Has Elapsed' output to the conditional terminal in the lower right corner (which should be set to 'stop if true' by default).
    In the future, please post your LabVIEW questions to the LabVIEW Forum.  You have a much better chance of getting your questions answered sooner, and those answers can then help others who are searching the LabVIEW forums.  Thanks!
    Justin M
    National Instruments

  • HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING IN THE PRODUCTION?

    HI ALL,
    CAN ANYONE TELL ME HOW TO STOP THE PROCESS CHAIN WHICH IS RUNNING DAILY AT 5.00 PM. I NEED TO STOP THE PROCESS CHAIN FOR COUPLE OF DAYS AND THEN RESTART IT AGAIN.
    cAN ANYONE TELL ME THE PROCEDURE TO STOP THE ENTIRE PROCESS CHAIN RUNNING IN THE PRODUCTION.
    THANKS
    HARITHA

    Hi,
    First and foremost let me advice you to be very careful while doing this.
    For Rescheduling
    RSPC> chain > Goto > Planning view and
    click on Execution tab > select > Remove from Schedule and then in Maintain variant of start process reschedule for the day you require it to run.
    For terminating active chain
    You can start from SM37, find the process WID/PID then go to SM50 or SM51 and kill it. Once its done come back to RSMO and check the request, it should be red but again manually force to red and save by clicking on the total status button in the status tab. This shuld ensure that the process is killed properly.
    The next step will be to go to targets that you were loading and remove the red requests from those targets.
    Note: For source system loads you may have to check if the request is running in the source system and kill if needed and pull it again.
    But for BW datamart delta loads u may have reset the datamarts in case u are going to pull the delta again.
    Re: Kill a Job
    Re: Killing a process chain.
    Regards,
    JituK

  • How to call a Oracle Proc,which contains Object Type as in Param, from java

    Hi
    Would like to know how to call a Oracle Procedure which contains the Object Type Parameter from java.
    Here is my code will look like...
    1. CREATE OR REPLACE TYPE emp AS OBJECT
    Empno NUMBER,
    Ename VARCHAR2(50)
    [COLOR=royalblue]In step1 I have created object type.[COLOR]
    2.CREATE OR REPLACE PACKAGE ref_pkg IS
    TYPE tab_emp IS TABLE OF emp;
    END ref_pkg;
    [COLOR=royalblue]In step2,I have created a table type which is of type emp;[COLOR]
    3. CREATE OR REPLACE PROCEDURE p_emp(p_emptab IN ref_pkg.tab_emp) as
    BEGIN
    FOR I IN 1..p_emptab.COUNT
    LOOP
    Some code written here
    END LOOP;
    END;
    [COLOR=royalblue]In step3 I have passed tabletype which is of type emp as argument.[COLOR]
    Now I need to invoke this procedure from JAVA.
    Calling a procedure doesn�t matter.
    But how I can map objecttype ? how will java recognize oracle object ?
    How can I implement this ?
    Any Help/Clues is Appreciated.
    Thanks
    Krishna

    Hi Bob
    You can call a stored proc from a database control with the jc:sql annotation itself.
    Assume a stored proc taking one In parameter
    * @jc:sql statement="call sp_updateData({id})"
    void call_sp_updateCust(int id);
    You can even call stored proc with OUT parameters using
    * @jc:sql statement="{call sp_MyProc(?, ?)}"
    void call_sp_MyProc(SQLParameter[] params)
    You can also call stored functions via db control.
    More info and diff ways to call at
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/guide/controls/database/conStoredProcedures.html
    Thanks
    Vimala

  • I should have said in my previous message that the iphoto program I am using is for an ipad 2.  I simply want to know how to delete an edited album which contains one photo that I do not want taking up space.

    I should have said in my previous message that the iphoto program I am using is for an ipad 2.  I simply want to know how to delete an edited album which contains one photo that I do not want taking up space.

    OK....I'm stumped.  The message you are seeing is typically there to protect someone from syncing with a different computer/iTunes account.  Is there any way anyone else has used your iPad and possibly connected it to their computer?

  • How can I Sync a folder (which contains all types files, sub folders and weighs some gigs) through wifi or USB ( and not using cloud services) between my New Ipad and Win 7 PC? Any apps available? Kindly help

    How can I Sync a folder (which contains all types files, sub folders and weighs some gigs) through wifi or USB ( and not using cloud services) between my New Ipad and Win 7 PC? Any apps available?
    kindly suggest a solution.
    Thank you inadvance!

    You can only import photos/videos via USB and the camera connection kit.
    ITunes: Syncing media content to your iOS devices
    http://support.apple.com/kb/ht1351
     Cheers, Tom

  • How to stop a while loop of event structure from a main vi

    Hello;
    sorry for my english
    I have to stop a subvi from my main vi, the subvi contains a while loop and an event structure so I need to stop this loop while directly from my main vi I have tried global variable but it did not work
    any help please or example !!!   
    Solved!
    Go to Solution.
    Attachments:
    stop a while loop and event structure from main vi.png ‏16 KB

    IYED wrote:
    Hello;
    sorry for my english
    I have to stop a subvi from my main vi, the subvi contains a while loop and an event structure so I need to stop this loop while directly from my main vi I have tried global variable but it did not work
    any help please or example !!!   
    If this is an example of how your code looks, I'd clean it up before the developer who has to work on it next hits you over the head with his LabVIEW Style Book. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • How to stop a while loop with long delay

    Hi everyone,
    I am building a simple program for turning on and off a single Bit.  The task is to turn ON the Bit for a period length T1, and OFF the Bit for a period length T2. T1 is normally different from T2, and can be controlled  by users. 
    Since T1 and T2 can be variable, they sometimes can be very long.
    If I use a Wait function inside a While loop, it needs long delay to be able to Stop the Main program.
    The same situation happens when I use Timed loop.
    Can anyone suggest me how to do this task?
    Thanks a lot. 
    Message Edited by tatuan on 04-12-2010 12:56 AM

    Here's another possibility using OpenG Wait ms:
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How to load file thru reader which contains non-english char in file name

    Hi ,
    I want to know how to load file in english machine thru reader which contains non-english chars in file names (eg. 置顶.pdf)
    as LoadFile gives error while passing unicode converted file name.
    Regards,
    Arvind

    You don't mention what version of Reader?  And you are using the AcroPDF.dll, yes?
    Sent from my iPad

  • How to Stop HP C5580 printis page containing the filename, directory etc along with my primary doc

    HP C5580 All In One Printer started printing an additonal page document properties every time i print my master document.  This never happened before and i can't figure out how to stop it...it's waisting paper and ink.  Please Help
    Windows XP Version 5.1.2600 Service Pack 3 Build 2600
    Computer System Manufacturer Dell Inc.
    Time Zone Eastern Daylight Time

    Are you printing from Word?  Generally Word has an option to print document properties, which would include the date created, the edit date, number of words and some other information.  In Word 2003 this would be found in Tools, Options, Print, Include with Document and uncheck the "Document Properties" box.  In Word 2010 it would be found in File, Options, Display, Printing Options, Print document properties.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • How to display an HTML data which contains images in CR

    Hi Experts,
    I have a HTML file which contains images and text. I will store all this data in to the database as binary data(SQL server 2008). How can I display the whole  data in report.
    Thanks in advance,
    Salah

    hello all,
    most times when HTML is stored in a database there are many tags that will not work. the tags that will work are very basic and limited to the formatting types that you can do within a Text Object...so not much.
    if you need all of the HTML from a database interpreted, you need to activate pass-through html on your system. then if you put the field into a formula (one line in height) the HTML should be properly displayed. for more info on activating pass-through html see the beginning of the Users Guide for webelements that is in the main download [here|Crystal Reports webElements].
    please note that there are some major limitations in this method:
    1) you cannot print the html displayed when using the print button on the crystal reports toolbar as it will show up as text...you can try the browsers print functionality to see if that works for you
    2) you can not export the report and see the html displayed...it will show up as text
    3) pagination may not work for you...i.e. if you have an especially long section of html in your database, the page may not break where you want it to
    best of luck,
    jamie

  • JDBC: How  to select only those records which contains col1 is NULL

    Hi All,
    In JDBC SELECT scenario.
    I wants to select only those records which contains col1 is NULL.
    I am trying as follows:
    <key>
    <col1 isNull="TRUE" />
    </key>
    but in moni/monitoring i am getting Following Error
    006-12-01 19:35:20 Error Unable to execute statement for table or stored procedure. 'BG_SALARY_SEND_SAP_D' (Structure 'SELECT') due to java.sql.SQLException: FATAL ERROR document format: structure 'SELECT', key element 'key' contains no values
    2006-12-01 19:35:20 Error Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'BG_SALARY_SEND_SAP_D' (structure 'SELECT'): java.sql.SQLException: FATAL ERROR document format: structure 'SELECT', key element 'key' contains no values
    Please suggest how to do select rows with col1 is null.
    Regards

    Rohan,
    isNull= true is used to make the KEY element not mandatory.
    In your case, if the select query is
    select emp from emptest where empno is null
    , then the datatype will be,
    <root>
    <StatementName>
    <dbTableName action=”SELECT”>
      <table>emptest</table>
    <access>
    <emp></emp>
    </access>
    <key1>
    <b><empno hasQuot="NO">is null</empno></b>
    </key1>
    </dbTableName> 
    </StatementName>
    </root>
    I dont have a DB access to try this, but I think this should work.
    If this doesnt work, then you would need to use SQL_QUERY,
    <root>
    <StatementName>
    <anyName action=” SQL_QUERY”>
    <access>select emp from emptest where empno is null</access>
    </anyName > 
    </StatementName>
    </root>
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Regards,
    Bhavesh

  • How should I create JAR file which  contain JMF library and project classes

    Hi,
    I installed the JMF windows pack. I compiled and ran successfully myApplet (which use JMF librarie) in Internet Explorer on my machine. When I run this applet on some different machine, where JMF isn�t installed- it�s not running.
    There is an error:
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
    I was trying to create jar file, which contain librarie JMF.jar and all other files which are require to run myApplet (*.jar, *.class, the files from folder �MyApplet�) and run it on the other computer. It still doesn�t work.
    Also I ran a JMF Customizer and created customize.jar but this file contains only JMF classes. I don�t know how add other files to it.
    How should I create a jar file which will contains all essential files to run myApplet on other machine (something like �All In One� J )
    I�m using Eclipse.
    Can somebody help me?.
    Thank You!
    Best regards:
    Peter

    Hi
    i want to make a jar file of application which is using JMF to play audio
    and video. it works well during compilation and execution but doesn't
    works in jar file.
    please help me how i make a jar file whic will run audio and video too
    your's truely
    abdul

  • How can I count the number of times a timed loop finished late?

    I am getting occasional timing errors in a timed loop under windows XP and would like to count the number of errors, but I can't find a simple software counter vi

    The timed loop has a terminal (boolean) to indicate if the previous iteration finished late. Just increment an integer shift register if this happens.
    The attached shows a very simple demo (LabVIEW 7.1).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    LateCounter.vi ‏76 KB

Maybe you are looking for