11-25-2020 09:04 AM
Hello forum
I have an issue with looping through the UUT loop. Even though I configured the loop to start at 0 it starts at 1 from the second time I start the test without stopping and restarting the sequence. I attached the modification to the process model as a screenshot.
Thanks for any help!
Raphael
Solved! Go to Solution.
11-25-2020 03:41 PM
What is you purpose exactly ?
Test only 3 UUT on a socket, and then stop the socket execution ?
11-26-2020 01:49 AM
yes, loop three times then stop and wait for the next start command from the GUI.
11-26-2020 08:11 AM
Why do you keep the counter in a SG ?
This loop is for a specific socket to run as much as needed. If you keep a counter as normal, but use a variable (local) to set the max number of loops I guess you won't have any problems.
From what I see, it should work, but keeping the counter in a SG sounds weird to me.
11-26-2020 08:18 AM
The idea behind the station global was that after a crash the sequence would start with the right batch, but as it is now I don't need this functionality. I will try a normal local variable and see what happens.
Thanks!
11-26-2020
08:46 AM
- last edited on
11-04-2024
02:13 PM
by
Content Cleaner
HI Raphael,
just ran into this few days ago : in case of a crash (meaning complete app crash or PC being unplugged for example) there is a chance that your SG won't be saved !
Indeed SG are saved whne the Engine shuts down or if you call a specific Commit method.
See here : https://www.ni.com/docs/en-US/bundle/teststand/page/station-global-variables.html
11-26-2020 08:52 AM
I tried locals for this counter and propagated it through the sequences, unfortunately this has the side effect that the sequence starts running without user input. I undid the change since this seemingly breaks other things.
I will need to find a point to reset this counter since the loop does not work as I expected, probably right after the GUI is called.
11-27-2020 06:51 AM
I tried today reinitialising the for loop after the GUI gets called, unfortunately this does not change anything. The "first" iteration still is 1 instead of 0 on the second pass. On top of that I noticed that the loop counter goes up to 4, which should be impossible with the parameters from above.
11-27-2020 08:00 AM
the solution was to use Locals.xy and propagate them into and from the sequences. What was missing the first time I tried was the parallel model was still using the state from the station global instead of the local which led to unexpected behaviour.
Thanks for your help!
11-27-2020 08:06 AM
I didn't do much !
Glad you found a solution ! 🙂