LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

property nodes to disable item

Hi

 

I'm having a somewhat similar problem. I have a VI that is supposed to disable and grey out the controls on the front panel while acquiring data and then re-enable those controls afterwards. When I run the VI, the front panel appears to lock; the stop button won't work and I can only stop the VI using Abort execution.

 

Please, can someone take a look at the code and see what I'm doing wrong. I've attached the VI below.

 

Thanks  

0 Kudos
Message 11 of 18
(1,051 Views)

Wadel,

 

It does just what you told it to do.  The front panel is not locked: The indicators work and the controls are greyed out.

 

Actually it does re-enable the controls briefly on each iteration of the while loop.  You need to be quick and lucky to hit the stop button during the brief time while it is enabled.

 

What do you really want it to do?

 

Do you want it to run one cycle of waveform generation and then wait until the button is pressed again? Try Mechanical Action = Latched when Released.

 

Do you want to be able to press Stop at any time? Try excluding the stop button from the control disable loop or at least re-enable it immediately after the left for loop.

 

Lynn

0 Kudos
Message 12 of 18
(1,045 Views)

Wadel wrote:

I have a VI that is supposed to disable and grey out the controls on the front panel while acquiring data and then re-enable those controls afterwards. When I run the VI, the front panel appears to lock; the stop button won't work and I can only stop the VI using Abort execution.


In addition to Lynns excellent comments, you are dragging along way to much baggage. For example the array of references needs to be generated only once at the start of the program, and not with every acquisition.

 

Here's a quick rewrite (LV 2010), showing some of the improvement suggestions. Modify as needed.

0 Kudos
Message 13 of 18
(1,037 Views)

Johnsold,

 

Did you run the VI? When I try to run it, I can't even get it to start generating data. The Generate WF boolean button doesn't respond at all when I click on it. It didn't matter if I changed the mechanical action. The button just doesn't respond. Also, the controls aren't greyed out when the VI runs. 

 

I don't really understand why it is executing this way on my computer.

 

I would just like the VI to disable and grey out the controls while the sine wave is being generated and then re-enable the controls again. I'm not able to use that control once the VI starts running and the sine wave is not generated. The only way I got around it was to set the boolean to True before runing the VI and that's not the way I want it.

 

0 Kudos
Message 14 of 18
(1,034 Views)

@Wadel wrote:

The Generate WF boolean button doesn't respond at all when I click on it.


Your "generate" button is disabled, but not greyed out, thus it will remain disabled for the duration of the run.

Do the following to fix: right-click button..advanced...enabled state...enabled

0 Kudos
Message 15 of 18
(1,032 Views)

Hi Altenbach,

 

I like your modification. The VI works I intended.

 

Thanks very much

0 Kudos
Message 16 of 18
(1,031 Views)

Wadel,

 

As Altenbach pointed out, your controls were disabled but not greyed out.

 

I reset all of them before running.  Sorry that I forgot to mention that.  They probably got that way during some of your testing and then you aborted the run followed by Save.

 

Lynn

0 Kudos
Message 17 of 18
(1,027 Views)

Johnsold,

 

Thanks

0 Kudos
Message 18 of 18
(1,022 Views)