LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Conditionally Indexed For Loop Terminal

Solved!
Go to solution

Dear LabVIEW community!

 

Most of you, I’m sure, know and use in LabVIEW 2012 such useful and helpful feature as conditional terminal in For Loop (see it on the picture below).

Code 1.png 

But if one saves such code in previous versions of LabVIEW, then we see, that code has different look (VI Snippet was made in LV 2012, so don’t be confused – it is really code in LV 2011).

 

2011 version.png

 

The same algorithm is made by using case structure and shift register. But the problem is that this shift register is uninitialized (1) (we have some constant (2) on the block diagram after saving file in previous version, but it is wrong constant for our case), and you know, that it can cause unexpected behavior of the program. So, if you have to convert such a code to previous versions of LabVIEW, don’t forget to check it, and initialize that shift registers.

Message 1 of 6
(3,097 Views)

Wow! I had no idea this little "conditional terminal" existed. I've been doing Example B all this time, and it sometimes really causes my BDs to elongate. I don't know about you, but my programming always to contain the best examples of "The drawing will fill the space available - and then some." Now, I'll get to stick in one or two more bits before I hit the right-hand wall. Thanks.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 2 of 6
(3,082 Views)

What specific version of 2012 are you using?

 

This works properly for me in 2012 SP1 f4.

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 3 of 6
(3,076 Views)

I use LabVIEW 2012 (32-bit) f5. Maybe, really, it is a reason of such behaviour?

0 Kudos
Message 4 of 6
(3,068 Views)
Solution
Accepted by Kosist

Yea, it looks to me like this was fixed in 2012 SP1.

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
Message 5 of 6
(3,055 Views)

Thank you! Now it's clear for me.

0 Kudos
Message 6 of 6
(3,053 Views)