LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED push button

Solved!
Go to solution

@KEMLab wrote:

Thanks a lot for the inputs. Q1 has been resolved. I just made it into an event case. Something like this:

 

I have a question about the local variable. Do you reset it because you want latching behaviour but cannot set it to latching because of the locals?

 

Are your boolean buttons commands or state changes? If it is a state then the radio button is a good solution as Dennis points out. If it is a command, meaning that you want an action to happen in response to successive presses of the same button then you cannot use a radio button. If it is a command then you can use the event structure just as you are doing but you don't need the local variable. Just change the mechanical action to latching. Placing the terminal in the event case that handles the value change will cause it to reset to false. But you cannot do that if you have locals or value properties for the button somewhere else in your code. That requires the buttons to be switching. But if it is a command button you don't need to read it with anywhere except in the event case that handles it.

 

[Edit: Nevermind most of the above. I see you are writing to a local variable of a different control than the one in the event case]

=====================
LabVIEW 2012


Message 11 of 26
(592 Views)

For Q2, if you are using table, use set cell value invoke node for entering in the same row.

Before that check whether device is there already in the table.

If your sequence is same like each device taking two iterations, then edit only in the multiples of second iteration.

Is this the one you asked???

Aarthi
Message 12 of 26
(570 Views)

Hi Aarthi,

 

I havent checked this option yet. Will post the results as soon as I implement it in my code.

 

Thanks & Regards,

Sushruth.

0 Kudos
Message 13 of 26
(559 Views)

Hi Steve,

 

Have attached the code for reference. Now I am facing with the new problem. As you can see, the event with String as local variable is not happening at all. Have i missed something here? I am not able to see anything in String2 display. Please suggest your inputs on this code. I can include them in the same event which is not my goal. I want two events, the output of one should trigger the input of other.

 

Thanks & Regards,

Sushruth.

0 Kudos
Message 14 of 26
(557 Views)

Why do you think that you need to have two event structures?.  What exactly you want to achieve by using the 2nd event structure?

-----

The best solution is the one you find it by yourself
0 Kudos
Message 15 of 26
(554 Views)

Hi Anand,

 

I would like the output of 1st event act as input to the 2nd. This code is just an example for how i need to form the code. In actual, I have like 2 ports to which different devices are connected(like pressure, temp etc). I need to select the port by push button. When selected port 1, it should take me to a pop up containing the list of port 1 devices for selection. Also I need to create a separate event for selecting type of devices to be chosen from port1..So i thought of this. But its not working. Any other way to make it work? I also need the string output event 1 to form a URL which polls the data from the devices connected to the ports.But am not able to view that string in the 2nd event.

 

Regards,

Sushruth.

0 Kudos
Message 16 of 26
(552 Views)

Hi Sushruth

 

Why don't you use the following concept instead of going in for two event loops. Like Dennis and Steve suggested, radio button will be apt if your purpose is only for selecting the next state.

 

eventstructure.png

 

As seen you can see in above fig., you can feed the "resulting string" to a queue for processing in another loop as it is not preferable to do processing in the event loop.

 

Regards

 

Javed 

0 Kudos
Message 17 of 26
(545 Views)

Hi Javed,

 

Can I make those radio buttons as LEDs? Is there any customisation which can be done on radio buttons to look like LEDs?

 

Regards,

Sushruth.

0 Kudos
Message 18 of 26
(538 Views)

You mean like this

 

radiobuttons.png

 

It can be done by customizing the controls. See here.

 

Regards

 

Javed.

Message 19 of 26
(533 Views)

Yup.....I changed it to LEDs. will try to work on this and implement it in my code. Also, you had mentioned about passing the data to Queue. I havent worked on it. But will give it a try. Thanks a lot for your suggestions.

 

 

Regards,

Sushruth.

0 Kudos
Message 20 of 26
(530 Views)