LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable button using Property Node

Solved!
Go to solution

I have used a button which counts as the button is pressed again and again, I want this button to get disabled when it counts till 6. I have used a case structure, which compares the value when it is greater than 6, it gets true value and the case structure should disable the button, but as I run the code the button is disabled already. 

 

Can someone please guide me, where I have done mistake.

 

Regards,

Ather

Download All
0 Kudos
Message 1 of 3
(4,273 Views)

You need to put another property node before the loop to enable the Top button before the loop starts.

 

Lynn

0 Kudos
Message 2 of 3
(4,263 Views)
Solution
Accepted by topic author Ather.Iq

If In Range? and Bottom are both True in any given iteration of the loop, you will write to the serial port two times with only about a millisecond between the writes. Is this what you want? Can the remote device handle two sequential writes?

 

The code in the two case structures is identical. It is usually better to make a subVI of duplicated code. Then if it ever needs to be changed, you only need to change it one place.  If you use Number to Decimal String, you only need two cases on the inner case structure.

 

It is not neccesary to have two VISA close functions for the same session. In fact one of them will always generate warning 1073676418: The specified object reference is uninitialized.

 

Here is a version cleaned up a bit with most of the changes above implemented.

 

Lynn

Download All
0 Kudos
Message 3 of 3
(4,238 Views)