LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple boolean cases

Solved!
Go to solution

Hello everyone. I have a scale with some commands i have to use, but the biologist i'm making the project to, wants boolean buttons of all commands. I have tried to make multiple cases (one case for one command), but i cant connect two "write cases" to the same Visa close. I have made a Open/Close boolean case for opening and closing the scale, and i want to make a boolean OK-button to zero pointing the scale value. So how do i make multiple boolean cases ?. I have uploaded my VI 

Best regards

Oesen
0 Kudos
Message 1 of 7
(2,833 Views)

You need a new architecture.  You should configure the port once.  Use an event structure inside of a while loop for sending the various commands (each button will have its own event case).  Have another button with its own event case for quiting the application (exiting the while loop).  Close the port after the while loop is completed.


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

Oesen,

 

You are going to need to employ some kind of architecture/design pattern for this.  I would probably go for an event driven state machine.  I have knocked up a real quick example.  

 

The producer loop monitors your user interface and then controls the consumer loop.  See if you can understand whats going on.

 

Kind Regards

 

 

Lewis Gear CLA
LabVIEW UAV

Download All
0 Kudos
Message 3 of 7
(2,818 Views)

Thanks for the answers 🙂

 

How do i test it with the Producer/Consumer program Lewis ?. Where can i write my strings and test it ?

Best regards

Oesen
0 Kudos
Message 4 of 7
(2,790 Views)
Solution
Accepted by topic author Oesen

Hey Oesen,

 

The VI I sent over is relatively complicated if you are new. How experienced are you with LabVIEW?

 

The VI is not finished/testable; its only to give you an idea of how you could do it.  You should spend time trying to understand how the design pattern works and finish it yourself.

 

I changed your string controls to constants because  I assumed that these would never be changed at run time.  Look through the cases in the consumer loop to see them.

 

Kind Regards

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 5 of 7
(2,759 Views)

Thanks for the answer Lewis

 

I'm a new Labviewer and I didn't made any program with loops before. The program seems a bit advanced to me, but i will examine it. Thanks for the help 🙂

Best regards

Oesen
0 Kudos
Message 6 of 7
(2,747 Views)

For what you want to do, you will need some kind of design pattern and you will certainly need to get to grips with loops if you want to use LabVIEW.

 

We can help if you have questions and I would recommend taking some time out to learn some basicis.

 

 

Lewis Gear CLA
LabVIEW UAV

0 Kudos
Message 7 of 7
(2,719 Views)