LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buttons Connect/Disconntect

Hi all,

i'll need two buttons for connecting and disconnecting to the rs232. But whic structure i need for this, when only the disconnect button is shown, if it's not connected. Than you push the button and the connection is ready. After this you only see the disconnet button at the same place, like the connect button. At if you push the disconnect button, the connection is finished.

Do you know what i mean.

Thanks Thomas
0 Kudos
Message 1 of 5
(3,683 Views)
It isn't exactly clear what you are refering to. Can you post some of your code, or a screen shot of the front panel and diagram (NOT .bmp, [lease use .png, or jpeg format or those with slow connections will be really annoyed). If you are trying to have two buttons that are mutually exclusive, in LabVIEW 7.1 they have provided a "radio button" and then you could configure an event structure to handle it.

P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 5
(3,669 Views)
Thomas,

I think one button will work. If you really need two, you can use property node to make one invisible when it is not needed. Look at the attachment for a single button example. I used the Labeled boolean from the Classic controls palette.

Lynn
0 Kudos
Message 3 of 5
(3,665 Views)
Why do you want to use 2 separate buttons? You can have a single button with different text on the true and false states. A simple event structure will handle the value change and a case statement inside will do the connection/disconnection. If you want to use two separate buttons, then put them on top of each other and control their visibility with a property node. The radio button could also be used.
0 Kudos
Message 4 of 5
(3,664 Views)
hi,

here is my vi. i should work, if you push the connect button. the program send a "D" to my µC and if the µc returns "D" the connection is okay. And now if the connection is okay, i'll that the connect button disappears and at the same place there is a disconnect-button to finish the visa-connection. Which structure i need fot this? Can you show me? Because i want add some other buttons that only works, if the visa-connection is open. Do you understand?

Thanks thomas
0 Kudos
Message 5 of 5
(3,657 Views)