LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple control question !

Solved!
Go to solution

Hello ! I am a newbie in LabView. I am starting to use LabView 8.2.

 

My question is this : How can i make a 3 value control, and how can i change the value of this control on mouse click.

 

Also ... i want this control to be a led button (like a boolean control is) and i want it to change color on value change.

 

How can this be achieved ?... Any ideas ?...I've searched the forum but didn't came across any clear solution.

 

Thank you 4 your time !

0 Kudos
Message 1 of 12
(4,126 Views)
Solution
Accepted by topic author AndreiN2014

Hai,

if you want a control with three states there are number of ways to acheive this.  One simple straight solution is to use system mixed checkbox which has ON, OF, Mixed states and toggles between states on mouse click.

 

The other solutions are create a Enum with three items same can be applied to ring.

 Feel free to post for queries.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 2 of 12
(4,106 Views)

1. You can take a Color Box Indicator for your issue. Than you will need the Event structure to cath the mouse down event on this indicator, there, in this event case you can set any color you want to your color box indicator.

2. Other way is to take  a picture ring control with 3 pictures, foreach state.
Message 3 of 12
(4,101 Views)

Ok ! Thank you 4 all your answers.

The attached vi is my solution to the problem.

My next question is: could this be done in a simpler way ?

 

Thank 4 your time.

0 Kudos
Message 4 of 12
(4,058 Views)
you think it is an better way?Smiley Happy
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 5 of 12
(4,054 Views)

Ahhh...sorry...i've forgot to mention that i use LabView 8.2.

 

Can you please convert the vi so i can view it ?

 

Thanks.  :smileyhappy:

0 Kudos
Message 6 of 12
(4,050 Views)
Find the VI in 8.0
Balaji PK (CLA)
Ever tried. Ever failed. No matter. Try again. Fail again. Fail better

Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
Message 7 of 12
(4,048 Views)
Right on ! Excelent implementation. Thanks ! 🙂
0 Kudos
Message 8 of 12
(4,046 Views)

Ok... another problem ...so let's say we have a few buttons to control, individually.

 

I've tryed to solve this problem, with no luck,  and my solution so far can be seen in the attached vi. 

 

What is the difference between "Mouse down" and "Mouse down ?" in an event structure ? ( beside the  "?" sign, of course 🙂 ).

 

P.S. using labView 8.2.

 

Thank you 4 your time.

 

 

0 Kudos
Message 9 of 12
(4,017 Views)

Any event that has a "?" at the end of it is called a filter event.  What it does is give you a way to programmatically tell LabVIEW to ignore the event.  If you click on the properties at the right hand border of the event case, you'll see one called discard.  If you wire a False to it, the event will behave just like a non-question mark event.  If you wire a True to it, you will have captured the event, but will tell LabVIEW to ignore that the Mouse was clicked down.  If you were clicking on a button, it would be a way to make LV act as if the button wasn't actually clicked.

 

A good use for a filter event is for a Panel Close? event.  If someone clicks on the X of a window, LabVIEW would just go and shut down the window aborting the code.  Often you don't want to do that, perhaps you want to save data and close off DAQ and serial devices nicely.  Think of how if you click on the X in Microsoft Word, it doesn't just shut down and you lose your document.  It asks you if you want to save your changes.  With Panel Close?, you can capture the event of a button being clicked, but wire a False to the discard telling LabVIEW to ignore that the button was pressed.  Then you can move on and execute a sequence of code to initiate a nice orderly shutdown of your VI.

Message 10 of 12
(4,001 Views)