LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling Interface Items

Solved!
Go to solution

I am attempting to disable an interface after the stop button is pressed. Logically for me, based on experience with line based programs, this should work. However, LabVIEW does not interpret it as such. Any idea where I am going wrong? Attached is the program

menudis.PNG

0 Kudos
Message 1 of 9
(2,941 Views)

Yes - you have a misunderstanding about the way sequences and structures work in LabVIEW.  Try turning on Execution Highlighting (the light-bulb icon in the toolbar), it may help you see what is happening.  The entire Sequence Structure needs to execute before any of its outputs are valid (the wires running from the "Enabled" and "Disabled and Greyed Out" constants), so the enabling/disabling doesn't happen when you expect.  You could move the property nodes into the sequence structure to solve this problem.  In general, sequences are discouraged in LabVIEW.  You could get the behavior you want in other ways, for example connect the error out terminal from the first property node to the edge of the while loop, then put the "Disabled and Greyed Out" constant inside the while loop but leave the property node outside the loop.

Message 2 of 9
(2,931 Views)
Solution
Accepted by topic author shultz58

Your VI seemed to work for me.

 

I move the property nods inside the frames were the constants.

Plus move the Stop terminal inside the Stop event case.

 

But it seemed to work as is.

Omar
Message 3 of 9
(2,930 Views)

@Omar II wrote:

Your VI seemed to work for me.

 

I move the property nods inside the frames were the constants.

Plus move the Stop terminal inside the Stop event case.

 

But it seemed to work as is.


Omar,

 

indeed that is what his issue was.  it wasn't working like it originally was, but after you take those actions you mentioned, it will work.  😉

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 4 of 9
(2,907 Views)

 

It is not always encouraged to use the Sequence structure for the Dataflow, instead see the attached Code that eliminates the need of such structures.

 

 

AshwiN,

Message 5 of 9
(2,902 Views)

But it worked for me just as you had coded it, before I moved the property nodes inside the structure.

It seems for a flat sequence structure, data does exit the frame when that frame completes event it there are more frames to complete.

I almost never use a sequence structure (data flow) so I was not sure how that would work.

 

Omar
0 Kudos
Message 6 of 9
(2,891 Views)

 


@nathand wrote:

Yes - you have a misunderstanding about the way sequences and structures work in LabVIEW.  Try turning on Execution Highlighting (the light-bulb icon in the toolbar), it may help you see what is happening.  The entire Sequence Structure needs to execute before any of its outputs are valid (the wires running from the "Enabled" and "Disabled and Greyed Out" constants), so the enabling/disabling doesn't happen when you expect.  You could move the property nodes into the sequence structure to solve this problem.  In general, sequences are discouraged in LabVIEW.  You could get the behavior you want in other ways, for example connect the error out terminal from the first property node to the edge of the while loop, then put the "Disabled and Greyed Out" constant inside the while loop but leave the property node outside the loop.


Highlight exucution makes debugging so much easier. Thanks for pointing this out to me.

 

0 Kudos
Message 7 of 9
(2,882 Views)

 


@Omar II wrote:

Your VI seemed to work for me.

 

I move the property nods inside the frames were the constants.

Plus move the Stop terminal inside the Stop event case.

 

But it seemed to work as is.


I just realized that I was running it in continuous mode. Making the modification you mentioned, and running it in single pass mode solved the problem. 

 

0 Kudos
Message 8 of 9
(2,878 Views)

 


@Ashwin S wrote:

 

It is not always encouraged to use the Sequence structure for the Dataflow, instead see the attached Code that eliminates the need of such structures.

 

 

AshwiN,


I never realized you could use the error outputs as you have in your VI. In fact, I wasn't completely sure what their use was. Thank you for pointing this out, I will definitely read into them. 

 

0 Kudos
Message 9 of 9
(2,876 Views)