LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED Button Question

Well let me ask you another question after seeing that code. My vi and all of it's code is contained within an Event Structure. The button in question here is in one event and is hooked up to a case structure. The code works on both true and false cases. After seeing your code, would it still be a problem with an event in an event?


I tried wiring your button up to a blank case structure and ran the vi, and this seemed to work fine. But in my vi this didn't work correctly. Again i use event structures in my vi. But first I would press the button in question and then press another button which would activate the event I need. The button in question performs subtraction of data that I am working with.

I've attached a picture of a portion of my code with the case strucutre. The code within this case structure is off screen, but I don't think that is really an issue. I just wanted to provide you with what I was working with.
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 21 of 41
(1,885 Views)
I see what got you confused. The button doesn't turn into a wrench until after you click it. It starts as tweezers. It can be found to the left of the type of the control (it will probably say "control") on the menu bar.

___________________
Try to take over the world!
0 Kudos
Message 22 of 41
(1,835 Views)
You could have a local for the LED with each local for the button. Then when one is set to off, the would be as well.

Another thing you could do would be to take images from this and use them to import onto a custom boolean switch (as described above). If this image is a good one for you, that is.

Good luck
0 Kudos
Message 23 of 41
(1,879 Views)
Thanks tst. I'm going to have to spend some time tweaking it a bit, to see if I can use it. I have to use my vi on several different computers, so I might have to change it up often. And what I decide on may not even be the final version of what my co-worker wants. Thanks for your help though. I get the idea now, I just need to try and play with the LED/text issues to get them to look alright when the button is at the size I need it to be at.

I'm still trying to get Chaos' button working though. That would make my life a lot easier, I just can't seem to get it working right. Like I mentioned earlier, that's the idea I thought of earlier, but it didn't seem to work either, which is why I came here. Perhaps it has something to do with my event structures?
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 24 of 41
(1,832 Views)
I'm not sure why you'd prefer Chaos's way. My suggestion gives a real boolean button with all the properties and with no additional code. You will have problems with the text for both ways, but customizing the control and moving the text is easy. You can change the size of the text, and for each boolean you place, you should change its size when you place it to hold the text it will have. If the text changes, the button should be resized to hold the longest string it will have.

___________________
Try to take over the world!
0 Kudos
Message 25 of 41
(1,827 Views)
Hi tst,

I was trying the button out this morning and I seemed to have gotten it how I wanted it using your button. I think that will do the job for me, as far as I know. If I have any other troubles or need any help, I'm sure I'll post a note here, and ask for some advice. But I just wanted to say thanks for all of your help and guidance on this problem and for everyone else that offered help and suggestions as well. I've only been working with Labview for a few months now, so any knowledge I can gain from folks is always appreciated.


Thanks again....
Using Labview 7.0 and 2010 SP1 with Windows XP and 7.
0 Kudos
Message 26 of 41
(1,813 Views)

tst
Proven Active Veteran


tst

Reply 20 of 26

Viewed 112 times
03-03-2005 03:57 PM


How's this?
Took me about 2 minutes to create.
I hope the text is OK. If not, you can customize the control and move it.

Attachment button.ctl (6 kb)


Could any one explain in details how to create same button?  I have tried many ways but without success
.
0 Kudos
Message 27 of 41
(1,727 Views)

Have a look at Application Note AN159C: LabVIEW™ Custom Controls, Indicators, and Type Definitions 

Page 7 describes what you want to do.

Message Edited by altenbach on 08-04-2005 09:28 AM

0 Kudos
Message 28 of 41
(1,721 Views)
Dear altenbach ,
 
I have read the document you advised. On a page 7 it is described how to change an existing graphics. However i need to add additional "Cosmetic Parts with Multiple Dependent Graphics" . I haven't found the description of the way how ti can be added. Could you please advise how it can be done.
 
Thank you.
0 Kudos
Message 29 of 41
(1,709 Views)
I'm not sure what "multiple dependant graphics" are, but this button was created based on an existing button. I did not create new graphics. Read the earlier posts (specifically 15) for details.
Actually, it's easier now because now I know that you can customize 2 controls at the same time - you just need to create one of them by going to File>>New>>Control Template.

___________________
Try to take over the world!
0 Kudos
Message 30 of 41
(1,703 Views)