LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
davidpcl

Option To Add Conditional Terminal To For Loop Border

Status: New

Quite often, in order to locate a particular variable in an array I use the For Loop with Conditional terminal and output the last value of the comparison wired to the conditional terminal to identify whether the value has been found or if we've iterated through the array, without finding the value. - i.e. a really basic example which could probably be done better another way (a better example might be with multiple conditions to satisfy which I quite often have), but hopefully gets the point across:-

davidpcl_1-1606474451020.png

It works, but it always looks a bit messy to me, so wondering if there could be an option which would allow you to attach the conditional to the border and allow you to a bit more elegantly pass whether the conditional was triggered out of the for loop.

ConditionalOnBorder.png

Thanks,


Dave

 

 

David Clark
CLA | CTA
IDEX Biometrics UK Ltd
Hampshire, England
3 Comments
AristosQueue (NI)
NI Employee (retired)

This is extremely unlikely to change in LabVIEW. The existing solution works, the need to pass the final value out is not universal, the value of being able to move the conditional terminal around inside the structure is valuable, and having two different syntaxes is generally undesirable. If we could rewind 10 years and reconsider the conditional terminal location, maybe, but at this juncture, I think that ship has sailed.

 

I will leave the idea open to see what kudos it acquires, but I would not hold out any hope of this being implemented.

wiebe@CARYA
Knight of NI

I'd put that stop condition terminal on the wire. 

For Loop Stop Terminal Location.PNG

But I also don't mind wires comping from the top...

davidpcl
Member

AristosQueue, thanks for you reply. All your points against are all very valid and well described.

 

Playing devils advocate with myself I thought it was probably something that would be unlikely to be implemented. One of my first thoughts is that it would significantly diverge functionality, and aesthetics from a while loop which also might not be desirable.

 

wiebe@CARYA  thanks for your reply too - I have previously tried what you have suggested, but am wary of having controls overlapping wires, but agree it is a perfectly valid solution.

David Clark
CLA | CTA
IDEX Biometrics UK Ltd
Hampshire, England