From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-29-2011 01:16 PM
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
Solved! Go to Solution.
03-29-2011 01:34 PM
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.
03-29-2011 01:40 PM
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.
03-30-2011 02:22 AM
@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. 😉
03-30-2011 02:34 AM - edited 03-30-2011 02:36 AM
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,
03-30-2011 07:59 AM
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.
03-30-2011 10:22 AM
@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.
03-30-2011 10:30 AM
@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.
03-30-2011 10:32 AM
@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.