# LabVIEW

cancel
Showing results for
Did you mean:

## Boolean grouping

Hello all,

I'm a student and still finding a lot of stuff to practice.

When I read a thread an hour ago, I found something new to research .

Anyway, some people use very many Boolean indicators and connect them together, so they all have the same value.

In text written code you'll get something like this

`#define True=1;#define False=0;for ( x = 0; x < 10; x++ ) {  "Tube_"<<i=True;}`

I don't know if the syntax works, but you'll get the idea.

That's pretty short code right.

Implementing it in Labview is a little harder using a for loop.

I made two different solutions. My question is: Is there a better solution to this problem and why?

Koen

Btw, just found out that Labview forum doesn't recognize it's own brand

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Message 1 of 7
(2,413 Views)

## Re: Boolean grouping

It does if you spell it right: LabVIEW (notice the capitalization)

Cameron

@KoenR94 wrote:

Hello all,

Btw, just found out that Labview forum doesn't recognize it's own brand

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>
Message 2 of 7
(2,378 Views)

## Re: Boolean grouping

No comment

It does if you spell it right: LabVIEW (notice the capitalization)

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Message 3 of 7
(2,372 Views)

## Re: Boolean grouping

I altered your second option to make it a little more efficient.

In general, I go with your first option, but have done things similar to your second.  But I don't like doing this just for the sake of setting values.  I do this type of setup when dealing with many other properties (like Disable, Visible).

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 7
(2,359 Views)

## Re: Boolean grouping

Hello crossrulz,

Pretty neat idea of that conditional for-loop, didn't knew it existed

Your way is a lot faster probably. Just one problem to it, the "To More Specific Class" won't work in the first for loop.

This is most likely due to the other controls?? Anyway changed it to this and now it does function:

What is your reason that you won't do it for values?

Koen

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Message 5 of 7
(2,349 Views)

## Re: Boolean grouping

Crossrulz didn't say he "Would not" he said he would avoid it.  and so would I

Really, think about why you are doing something..... the boolean terminal already exists so the info is already presented to the user.  what do you gain by presenting it ten more times?

"Should be" isn't "Is" -Jay
Message 6 of 7
(2,340 Views)

## Re: Boolean grouping

Maybe when you use it in a bigger program.

It could be possible that you aren't able to reach those ternimals, without the use of local ofcourse.

I think when you use it multiple times in a program it will use less space and keeps things clear.

Any other suggestions are welcome ofcourse

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Message 7 of 7
(2,294 Views)