How to run a do-while loop on the 2nd execution after a stop on failure occurs?

I am trying to use the Stop on Failure process model callback from the TestStand Examples.
If a step fails within a Do-While loop and the test is terminated, the second time the test is run (continuing to the Next UUT in the process model), the condition for the do-while loop is checked first before it ever enters the loop. This is incorrect because the Do-While loop should execute once and then check the "while" condition.
Also, If I was to stop the execution altogether and then restart the test (instead of continuing with the Next UUT), it runs the loop once, then checks the "while" condition.
I'm not sure if I am describing this clearly enough. The execution seems to flow like this:
Start test
Do
NumericTest step FAILS  -> terminate
Next UUT starts
While (condition is false and skips over Numeric Test step).
So it seems that TestStand thinks it's still within that Do-While loop on the second execution and whatever runtime variables are not reset correctly.
Is this a TestStand bug?  It happens in both TestStand 3.1 and 3.5.
Is there any way around this?
Thanks for any help.

If it is what I think it is, it is a bug. Try unchecking Sequence Properties>>Optimize Non-Reentrant Calls to This Sequence and please tell me if that fixes it.

Similar Messages

  • How do I make one while loop that runs 1 piece of data at a time?

    I have a question about a while loop.  Currently, I have 4 or 5 dynamic data lines that I would like to run through a while loop that will tell me if the data is within a certain range or not.  However, the ranges are different for each piece of data, and I dont know how to do each one separately.  Do I have to make 5 different while loops? Thanks!

    pg22aw wrote:
    I have a question about a while loop.  Currently, I have 4 or 5 dynamic data lines that I would like to run through a while loop that will tell me if the data is within a certain range or not.  However, the ranges are different for each piece of data, and I dont know how to do each one separately.  Do I have to make 5 different while loops? Thanks!
    Do you want to compare the value with a defined value and also the ranges for the 5 data is different?. What are you doing in the while loop. If the data is in an array of dynamic data you can seperate the amplitude value and check the whole array of value with the ranges that is also build same as the data theh you will get the output as a boolean array.
    The best solution is the one you find it by yourself

  • How to code a parallel 'for loop' and 'while loop' where the while loop cannot terminate until the for loop has finished?? (queues also present)

    I've attached a sample VI that I just cannot figure out how to get working the way that I want.  I've labeled the some sections with black-on-yellow text boxes for clarity during the description that follows in the next few sentences.  Here's what I want:
    1) overall -- i'm intend for this to be a subVI that will do data acquisition and write the data to a file.  I want it to use a producer/consumer approach.  The producer construct is the 'parallel for loop' that runs an exact number of times depending on user input (which will come from the mainVI that is not included).  For now I've wired a 1-D array w/ 2 elements as a test case.  During the producer loop, the data is acquired and put into a queue to be delt with in the consumer loop (for now, i just add a random number to the queue).
    2) the consumer construct is the 'parallel while loop'.  It will dequeue elements and write them to a file.  I want this to keep running continuously and parallel until two conditions are met.
          i. the for loop has finished execution
          ii. the queue is empty.
       when the conditions are met, the while loop will exit, close the queue, and the subVI will finish. (and return stuff to mainVI that i can deal with on my own)
    Here's the problems.
    1)  in the "parallel for loop" I have a flat sequence structure.. I haven't had time to incorporate some data dependency into these two sequential sections, but basically, I just care that the "inner while loop" condition is met before the data is collected and queued.  I think I can do this on my own, but if you have suggestions, I'm interested.
    2)  I can easily get the outer for and while loops to run sequentially, but I want them to run in parallel.  My reasoning for this is that that I anticipate the two tasks taking very different amounts of time. .. basically, I want the while loop to just keep polling the queue to get everything out of it (or I suppose I could somehow use notifiers - suggestions welcome)...  the thing is, this loop will probably run faster than the for loop, so just checking to see that the queue is empty will not work... I need to meet the additional condition that nothing else will be placed in the queue - and this condition is met when the for loop is complete. basically, I just can't figure out how to do this.
    3) for now, I've placed a simple stop button in the 'parallel while loop', but I must be missing something fundamental here, because the stop button is totally unresponsive.  i.e. - when I press it, it stays depressed, and nothing happens.
    suggestions are totally welcome!
    thanks,
    -Z
    Attachments:
    daq01v1.vi ‏59 KB

    I'd actually like to add a little more, since I thought about it a bit and I'm still not quite certain I understand the sequence of events...
    altenbach wrote:
    zskillz wrote:
    So i read a bit more about the 'dequeue element' function, and as I understand it, since there is no timeout wired to the dequeue element function, it will wait forever, thus the race condition I suggested above can never happen!
    Yes, you got it!
    As I've thought about it a bit more, there's a few things that surprise me... first, the reason the 'dequeue element while loop' errors is not because there's nothing in the queue, it's becaues the queue has been released and it's trying to access that released queue...   However the problem I have is this --- Even though there's no timeout wired to the dequeue element, I still would think that the while loop that contains it would continue to run at whatever pace it wanted -- and as i said before.. most of the time, it would find that there is nothing to dequeue, but once in a while, something is there.  however, it seems that this loop only runs when something has been enqueued.  the reason I say this is illustrated in the next code sample MODv2 that's attached below.  I've added a stop button to the "queue size while loop" so the program runs until that is pressed.  I've also added a simple conditional in the "dequeue while loop"  that generates a random number if it a button is pressed... but this button is totally non-responsive... which means to me that the "dequeue while loop" isn't actually continuously running, but only when an element is added to the queue.  this still seems almost like the 'dequeue while loop" waits for a notifier from the queue telling it to run.  can you explain this to me? because it is different from what I expect to be happening.
    rasputin wrote:
    I tried to open your VIs but it doesn't work. LV
    is launched, the dialog box (new, open, configure...) opens and then...
    nothing. Not even an error message. I guess it isn't a problem of LV
    version or a dialog box would appear saying this. Could you, please,
    send a image of the code?
    Thanks,
    Hi Rasputin, I'm using LV8.  I assume that was your problem, but who knows.  I've attached a pic of of altenbach's solution since it's what I needed.
    thanks
    -Z
    Message Edited by zskillz on 10-20-2006 11:49 AM
    Attachments:
    daq01v1MODv2.vi ‏63 KB
    daq01v1MODpic.JPG ‏116 KB

  • How to out from infinite while loop in sub VI

    Dear Sir,
    how to out from infinite while loop in sub VI from main VI
    attached photo for solution but I can't understand it and i can't find the function in photo 
    please help
    Attachments:
    stop_subVI_frm_main.JPG ‏36 KB

    Asking how to get out of an infinite loop is like asking how to find the end of a circle. I'm not trying to be sarcastic but by definition, if there is a way out of the loop, then it is not infinite. I think what you are asking is how to avoid creating an infinite loop. Is there something about the suggestions you have been given that you do not like? My favorite suggestion is the notifier but maybe you just need an example. Turn on context help and read about the notifier functions in the code below.
    This is your top level VI
    And this is your subVI
    If this seems too complex then a global variable will work too. But what seems simpler can cause much more complex bugs. You can code fast and spend lots of time debugging or you can code slow and spend less time debugging. Personally I perfer writing productive code than looking for bugs any time.
    =====================
    LabVIEW 2012

  • How can I make a while loop wait for input boolean?

    Hi.
    I'm trying to control a robotic arm with labview for my undergrad dissertation, and I have a decent polar coordinate control panel made, but there is one problem; it checks for changes in the coordinates every five seconds, while I want it to only check on the touch of a button (ie, go!, I've changed your coordinates!). The changes are calculated with a while loop comparing the last value of theta, x and z in a while loop with the current one. I can't find a way of putting that into a case structure. If there is a way of making the while loop progress at the push of a button, I think it would work. The VI's attached below.
    Thanks in advance for any help.
    Cathal Scanlon
    ps, sorry about the mess, I'm going to reorganise the while loop into 2 if I can get the control button working.
    Message Edited by CatScan on 02-08-2007 02:45 PM
    Attachments:
    Polar coord assignment1.vi ‏142 KB

    Have you tried using an event structure? To use one, right click on the structure to add an event. Set the event as whatever button you wish to monitor and set the event to "Value Change". If you put this inside a while loop any time the button is pressed, the event structure will run the contents inside the loop. There are a number of options to have the event structure activate.
    *** Warning! I'm probably the last guy you want answering your labVIEW questions, but I figured I might be able to help.

  • How to pass a value from inside a while loop outside the loop

    Hello to everybody, I have been searching through the forum but I have not found a certain answer for my problem. I would try to explain my problem as breefly as posible:
    I have to send by a BNC2120 two signals and acquire an other one thats comes from a preassure sensor. That part is done by introducing simulating and acquiring DAQmx inside while loops.It is sycronized by my self, proving such diferent values (is not the optimum, but is only the first prototype) and works as I expected. Well, then I want to sample some of the values of these signals, that is done with relays and local variables to get the value in the instant I want to sample. Here begin my problems: I want to extract the sample values out of the while loops without restarting them, I mean: I do not want to stop the while loops because the acquisition and the generation of the signal must be continuous, but I do not know if it is posible to put the while loops in "standby" until I operate with the values I have sampled and then the signal generator and the acquiere continues from when it has stoped before. Particulary I want to obtain the value of the top while loop (inside a case) when the counter arrives at 15.
    I have proved to do with local variables, global variables, making a state machine, with event cases, with flat secuences...I have been reading about and proving diferent posible solutions for this week and the whole past week and I have not found the solution.
    If any of you know how I can do this thing, I would be loved to listen your opinions. My proyect is above: 
    Thank you a lot in advance.
    Sinceresly,
    Miguel.
    Attachments:
    maq_estados_event_case.vi ‏239 KB

    It definately sounds like what you really want is a Producer/Consumer.  It is an architecture that uses Queues to pass data from a data generation loop (producter, your DAQ loop) and a data processor (consumer).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How do i exit a while loop using event handler

    Hello,
    I have an event handler structure within which i run a while loop for a particular event. I would like to interrupt the execution of this while loop as soon as another event occurs, even if the while loop has not finished execution. I have tried so many ways, the best i could get is exiting one itteration after the new event occurs which is no good for me.
    Any suggestions???
    Thanks
    Me

    Instead of having a task while loop in an event case, put your task while loop in parallel with the loop surrounding the event structure. When the event which should start the task occurs, you can signal the start of the task while loop. You could use local variables of references to start/stop the loop when an event occurs. You could also use notifiers instead of variables to pass signals to start/stop the while loop. In general you should have a while loop for the event structure, and a parallel while loop to do the tasks. The parallel loop is controlled by variables or notifiers which are set in the event cases.
    - tbob
    Inventor of the WORM Global

  • When I add a while loop to the vi "niScope EX Multi-Device Configured Acquisition (TClk)" to acquire data for multiple times, it works but it runs very slowly.

    Because I want to acquire the similar data for multiple times and then take an average to increase SNR, I add a while loop to the vi "niScope EX Multi-Device Configured Acquisition (TClk)".  It works but it runs very slowly (about 1 sec for each iteration). I think I had put the while loop at a wrong position, which makes the vi run from the very beginning in each iteration. So I really want to know where should I put the while loop to improve the speed? I have attached all the vi and subvi.
    Thanks very much.
    Attachments:
    Multi-Device External Clocking (TClk).vi ‏1166 KB
    avgWfm.vi ‏15 KB

    Dear Zainykhas,
    Thank you for posting this to the discussion forums and for uploading some sample code.  I took a lok at the issue you have been having, and it is unclear to me as to why you have placed two for loops around the original while loop.  My understanding is that you want to use the original Sample.vi and want to execute this N times where N is the Max Freq divided by Interval so that you can scan for a range of frequencies.
    Why not just put Sample.vi around one for loop and use the increment counter scaled by the interval to count up towards Max Freq and insert the desired Frequency into the cluster using Bundle By Name?
    Kind Regards,
    Robert Ward
    Applications Engineer, NI
    Attachments:
    Modified - RW.vi ‏48 KB

  • Control a while loop in the sub vi using a button in the main vi?

    Dear all,
      I want to be able to control ( turn on or off) a while loop in the sub vi from a button control in the main vi. How can I use the Control Reference to achieve it?
      Thank you in advance. 

    Like this
    look at attached vi's
    Run the main vi
    Attachments:
    main_boolean.vi ‏12 KB
    sub_boolean.vi ‏16 KB

  • "A critical error has occurred while running the virtual machine and the machine execution has been stopped"

    I have the following error:
    "A critical error has occurred while running the virtual machine and the machine execution has been stopped"
    When I am installing grid clusterware and when is copying files from one node to other I received that virtualbox error and is stop working.
    Can somebody give me any hint how to solve it ?
    Thank you
    Eugen

    I think that is not a Clusterware issue, The clusterware installation may generating a high load on your machine and Virtual Box is not supporting.
    Check vbox.log file to identify root cause.

  • My daq 6008 wil not drop the 5V after the VI is stopped, i have a digital signal going from the error out on the daq in the while loop to the error in on the daq outside the while loop and a boolean going to the data of the daq outside

    my daq 6008 wil not drop the 5V on a digital output after the VI is stopped, i have a digital signal going from the error out on the daq in the while loop to the error in on the daq outside the while loop and a boolean going to the data of the daq outside, but i can t seemto get it to work

    i attached the block diagram so you can have a look
    Attachments:
    PID Temp control.docx ‏120 KB

  • How to run OPatch against Node Manager from the admin server

    How to run OPatch against Node Manager from the admin server

    Hello,
    I'm not sure what you meant by Opatch against nodemanager.You can check the below document about how to apply patches using Opatch
    Oracle Fusion Middleware Patching with OPatch - 12c (12.1.2)
    Refer the section " Common OPatch Commands When Patching an Oracle Fusion Middleware Oracle home"
    /MR

  • HT3743 HT4623 We're sorry, we are unable to continue with your activation at this time. Please try again later, or contact customer care.----How to fix this issue while setting up the iphone for the new ios?

    HT4623 We're sorry, we are unable to continue with your activation at this time. Please try again later, or contact customer care.----How to fix this issue while setting up the iphone for the new ios?

    If you don't have a SIM card in the phone, you must put one in. It's required for activation.
    If you do, then your phone was probably hacked to unlock it from the original carrier. Contact them and see if they will unlock it. If they will not do so, then you can't use that phone.

  • While loop takes control of everything​, i.e. stop a while loop

    Hi everybody,
    I have a problem with a while loop, which I don't manage to stop as it
    takes control of everything.
    So, the problem is the following.
    I wrote a vi to control an Optical Spectrum Analyzer and I need it to
    scan a trace every Ta seconds. The scan must start when the user
    presses the button "Start datalogging!" and must stop when the user
    presses the button "Stop datalogging!" (this button is configured as
    "swith after pression").
    The problem is, anyway, that after starting the datalogging operation,
    the user interface becomes kinda inaccessible, the mouse pointer
    assumes the "hand format" and you can't push any button (actually you
    can't move the scroll bars either, nothing), but the one to abort the
    execution, making thus impossible to stop the acquisition or any other
    operation.
    It seems like the operation of collecting data is so "CPU consuming"
    that LABVIEW can't "listen" to any input.
    The LABVIEW version I am using is the 8.5.1.
    I hope somebody can help me solving this problem.
    Thanks a lot,
    Gianluca

    Hi,
    You may want to try the following:
    1) create a while loop, leave the conditional terminal open for now
    2) inside the while loop, create an event structure (on the same palette as 'while'- and 'for' loops)
    3) Add an event by right-cllicking the top textfield of the event structure, choose your startbutton-control in the left menu, and in the right menu scroll down to 'value change'. Before exiting this menu make sure to uncheck the checkbox for 'lock front panel'
    4 inside the eventstructure for your start-button, put your start-button control - it needs to be read by the program to work properly (unless you chose another form of mechanical action). Wire it through the wall of the event-structure and to the conditional terminal, insert a boolean 'not' to reverse the polarity.
    5) Add a constant to the 'timeout' value on the left upper corner (outside the event structure),give it the value 100 [ms]
    6) select the timeout page in the structure (it was there by default as the first page)
    7) insert your scanning program in here, it will iterate (start) every 100ms (due to your constant in step 5)
    8) add another event, select your stop button control in the left menu, select 'value change' in the right menu
    9) Place your stop-button control inside the new page in the event-structure, wire a line through the frame down to the conditional terminal
    10) you are done
    Brgds
    T

  • Stuck in a "loop" at the login window after upgrading to Leopard

    I bought a new iMac Oct 26. It contained Tiger, and included a disk for installing Leopard. I easily got the machine up and running using Tiger, but last night I attempted to install Leopard. When the installation was complete, I tried to get it running. A screen asking for my password came up. I keyed that in and hit logon. Back came the screen asking for the password. To make long story short, I tried everything I could last night, and then called Apple Support this morning. Took quite a while, but I was back in business this afternoon. The technician who helped me sent me the email copied below describing the solution. Perhaps it will help someone else? Romelle
    Hello from Apple!
    Charles at Apple Service & Support thought that you might find this article useful. We hope that it helps resolve your technical issue.
    Link: http://www.info.apple.com/kbnum/n306965
    Mac OS X 10.5, iMac (Late 2007): Stuck in a "loop" at the login window after upgrading to Leopard
    Issue or symptom
    After installing Mac OS X 10.5 Leopard on a 20-inch or 24-inch iMac (Late 2007) computer, you may not be able to log in at the login window. Your login name and password are apparently accepted, but after a blue screen appears for a few seconds, the login window reappears instead of your desktop.
    Products affected
    20-inch or 24-inch iMac (Late 2007) computer with 2.0, 2.4, or 2.8 GHz processors
    Mac OS X 10.5 Leopard
    Solution
    If Leopard is installed
    Start up from the Leopard Install DVD and perform an Archive and Install installation (and select Preserve Users and Network Settings).
    After the Archive and Install is complete, you should be able to successfully log in. Use Software Update to install any other updates.
    Important: Install the iMac Software Update 1.3 for Leopard after the Archive and Install is complete.
    If Leopard is not yet installed
    If you have not yet installed Leopard on your 20-inch or 24-inch aluminum iMac computer with a 2.0, 2.4, or 2.8 GHz processor running Mac OS X 10.4.x, but previously installed the iMac Software Update 1.2, you should install the iMac Software Update 1.2.1 (Tiger) or later, before installing Leopard.
    Thank you,
    Apple

    If Leopard came pre-installed and this is a new machne, then the disks that came in the box should let you archive install preserving users & network settings. The disks have a grey label, and if you get more than one use disk #1 for this procedure.
    Hold down the "option" (also known as "alt" on the new keyboards) key when starting up with disk #1 in the optical drive. Select the install disk icon on the grey screen and click the arrow. Then when you get to the "select destination pane, click the options button after selecting your hard drive as the destination. In options A& I preserving should be checked by default, if not, select them. Click "ok" to dismiss the options pane, then run the installation.
    If this does not work for you, call apple support. They want everything to work. Be patient, they are real busy these days.
    Slim

Maybe you are looking for

  • Issue with spamassassin, now mail not working

    Hi ! I installed spamtrainer almost two months ago. Been feeding the [email protected] for several weeks now , 700 emails each day at least . There was very little improvement if none at all. Tried to add "@local_domains_maps = (1)" to amavisd.c

  • Did you know that the Ipad 1 will not be able to upgrade to 6.0 so it will be obsolete within 6 months?

    I am pretty upset.  Not very cool of Apple to not annouce that they have Obsoleted the Ipad 1. No upgrade process or anything.

  • Oracle HTTP Server Crash

    Hi all, i have an application deployed in OC4J, this application, due to dabase locks, its started to respond very slowly (i had some JSP with 102 seconds response time) about 12:50 i had 175 active connection in that OC4J container, some moments aft

  • Update Master Item - primary UOM - Backend

    HI All User has wrong UOM and done couple of transaction on it. We want to update it from Pk/100 to Each. From front end only thing possible is renaming and creating new item. Can we update the Primary UOM of item from backend ? I tried up updating f

  • Why won't my FaceTime toggle 'on'?

    It keeps sliding back to 'off' as soon as I release my finger, I've tried lots of times. Also when I go to 'use Apple ID for FaceTime' it says it can't find network connection. But my wifi working fine, it also does same thing if I switch to using mo