From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to operate a case loop using boolean

I'am posting one program . In this program I need to start a case on switching on the bulb but that's not happening . Can you find a solution for this if possible please help me

0 Kudos
Message 1 of 9
(2,608 Views)

Please post your VI so that we can deal with it. Use "Boolean To (0,1) may help you.

But instead of trying solution in air, first send your VI.

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 9
(2,599 Views)

i send it in the next message .

0 Kudos
Message 3 of 9
(2,594 Views)

A boolean can be wired direcly to a case structure which will then have a True and a False version. It's probably a simple problem as reading a control outside a loop, but send the vi and we'll see.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 9
(2,572 Views)

the program is this

0 Kudos
Message 5 of 9
(2,568 Views)

Dont use Run continously.

So, what bulb, what's not happening, and what's supposed to happen?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 9
(2,565 Views)

Where to begin...

 

You're outer case structure makes no sense.  It is obvious you are using the Run Continuously button.  Don't!  That button is for debugging purposes.  Remove the outer case structure and replace it with a WHILE loop.  Have the loop stop with your stop button.

 

A lot of your inner case structures are errors waiting to happen.  You need to wire the error and VISA references through the false cases.

 

You FOR loop doesn't need anything wired up to the N.  With the array autoindexing, that will determine how  many loops will be done.


GCentral
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
0 Kudos
Message 7 of 9
(2,545 Views)

the button when I put it to on position the case loop never works and I don't know how to integrate for loop with case loop such that when click the button only the case loop will work otherwise the program will stop by the for loop.

0 Kudos
Message 8 of 9
(2,523 Views)

@perumpadapu wrote:

the button when I put it to on position the case loop never works and I don't know how to integrate for loop with case loop such that when click the button only the case loop will work otherwise the program will stop by the for loop.


Which button? Read 5? Stop? Write 6?

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 9
(2,503 Views)