LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic control disabling

I am writing a program that interfaces with an HP/Agilent 4194a Impedance Analyzer through a GPIB interface. In the interface to the program, I have two options for selecting a frequency range. One is a start-stop option, the other is a Fy-Fz option. Only one option may be used at a given time, so I have the toggle switch set to gray out/disable one pair or the other.
The original problem was that switching the toggle only affects the disable as the run button is pressed. After the program starts running, switching the toggle has no effect on which controls are disabled. After implementing some advice, I'm still having a problem. When using an event handler, it only works once before crashing. The loop implementation doesn't work either. Below I've attached a link to a jpg of the part of the program in question. It includes both non-working solutions.
click here
Please let me know if you have any ideas. Thanks.

Message Edited by cheese on 06-24-2005 12:18 PM

0 Kudos
Message 1 of 8
(3,034 Views)
Duplicate Post. Your question was answered there. If you didn't understand the answers, you should have posted back to the original and not posted again. To repeat - your Boolean has to be inside the while loop along with the property nodes. The event structure has to be inside a while loop in order for it to keep running.

Message Edited by Dennis Knutson on 06-24-2005 11:20 AM

Message Edited by Dennis Knutson on 06-24-2005 11:21 AM

0 Kudos
Message 2 of 8
(3,023 Views)
I assume then that you mean something like the picture in the link below.

Image

This implementation is doing the same thing as before. It will work one time. If the toggle is switched again, the program freezes. Any ideas?
0 Kudos
Message 3 of 8
(3,007 Views)
This is the way to do it.
0 Kudos
Message 4 of 8
(3,001 Views)
Sorry, I'm running 6.1 and can't open it.
0 Kudos
Message 5 of 8
(2,998 Views)
Here it is as 6.1.
0 Kudos
Message 6 of 8
(2,993 Views)
Thanks. The control disable works properly now. I'm still confused about the nature of the beast though. This means that event handling has to be set up for ANY user input change made while the program is running? If you know of a paper or tutorial about this, please direct me to it.
0 Kudos
Message 7 of 8
(2,986 Views)
You would add a new event to the same event structure for any control that you want. Events are explained in the user manual, the shipping examples, the on-line help, and there is additional information and examples here.
0 Kudos
Message 8 of 8
(2,972 Views)