06-01-2014 10:20 AM
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
Solved! Go to Solution.
06-01-2014 10:44 AM
You need to put another property node before the loop to enable the Top button before the loop starts.
Lynn
06-01-2014 03:14 PM
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