04-27-2012 08:49 AM
Hi.
I have to exclude a value from an forloop, and i don't how to do..
I've done an example of what I want to do on the vi that i have join
Explication :
when the iteration 5 appears, we go directly to the value 6 without take care about what we are supposed to do for the value 5.
Thanks
Solved! Go to Solution.
04-27-2012 09:00 AM
04-27-2012 09:10 AM
Hi,
Thanks for your answer.
In this solution it duplicate the iteration #6 . And I just want one opération by iteration. ![]()
04-27-2012 10:04 AM
If your need only to remove an element from array, it is better to use delete from array
If you plan to add more actions on array elements and want to skip an iteration, then you need to do nothing on "skipped" iteration. Autoindexing does not have "Disable terminal" to skip it, so number of your elements will not change - it does not suit you.
04-27-2012 10:22 AM
Sorry my vi's example seems to be not clear, so I join you the original VI;
In fact, the problem come from this part of the VI
The SubVi has some parameters whose one is the adress of the device. The device at the adress 6 is missing, so I don't want to call him thus skip the iteration #6.
.
04-27-2012 10:28 AM
Place a case inside the loop which does nothing if the loop i is 6, defaul the current code.
/Y
04-27-2012 10:34 AM
What should I put in the case ? Sorry I'm a notice on Labview
04-27-2012 10:40 AM
If you want to go with your code, you need to reduce the iteration count by one and change the "=5" to ">=5", else you are doing one operation twice.
Why is there a delay in the loop? Does it matter what happens in the loop or is only the output array important?
Here are some possible interpretations, assuming you want the loop with the delay. If only the output matters, used the second option and delete the loop.
04-27-2012 10:45 AM - edited 04-27-2012 10:47 AM
@Peter Saraiva wrote:
The SubVi has some parameters whose one is the adress of the device. The device at the adress 6 is missing, so I don't want to call him thus skip the iteration #6.
Maybe like this?
Also:
04-28-2012 03:48 AM
Hi Altenbatch,
Thanks a lot of your investment .
I can't open your VIs because on this computer I have the 2009 version of Labview. I shall inform you on monday when I shall have tried it on my desktop computer
Stay in touch.
Regards.