LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Expected Behavior?

In the attached vi and png, you can see that there is a simple program that will update two indicators on the front panel with the current time when the vi is run, and the boolean is true. The thing that I find interesting is that when the boolean is false and the vi is run, one of the indicators gets (unexpectedly) cleared. The indicator that gets cleared is the one that is connected to the connector pane.

 

Is this expected behavior? I could have sworn that it isn't, but I usually avoid this sort of structure by placing all of my indicators outside structures on the block diagram so it's possible that I just never noticed this. If it is a relatively new thing, I'd like to know when it changed.

 

Any help?

 

Chris

 

 

 

 

 

Message Edited by C. Minnella on 08-20-2008 06:16 PM
Download All
Message 1 of 14
(3,708 Views)

C. Minnella wrote:

If it is a relatively new thing, I'd like to know when it changed.


Depends on what you mean by "relatively new". I can confirm the behavior is like that as far back as 7.1.1, which is the earliest I have.

Message 2 of 14
(3,694 Views)
I disagree. I don't know why the false case would reset one indicator but the behavior you expect is the behavior I see in 8.5. Can you post a VI that demonstrates this?
Message 3 of 14
(3,689 Views)

I don't see that behavior at all.  They always both show the exact same time.

From LV8.5 to LV7.0.

 

R

Message 4 of 14
(3,683 Views)

I agree that this is not correct.

 

The indicator connected to the connector pane acts like if "clear indicators when called" is enabled, even though this option is disabled.

Message 5 of 14
(3,677 Views)

The vi is attached to the original post. I'm sorry, I should have mentioned that I tested this in 8.5.1 and 8.6 and I get the same behavior in both. The vi is saved for 8.5, but it is easily replicated from the picture. I should also say that "Clear Indicators when Called" is not checked. This is running in WinXP.

 

If this really is a "feature", then I have to say that I don't like it. If this is the behavior that I wanted, I could place the indicator outside of the case and wire the default value to it like I usually do. In this case, I want it to retain the value from the previous call, and I will have to make significant changes to make it explicitly do that.

 

Chris

Message 6 of 14
(3,649 Views)

Did not see the VI in your original post. I see the behavior in 8.5 as well and it is not a feature at all. It is abnormal behavior. I suspect there is something corrupt with that indicator. It is getting set to it's default value when run. You can change the default and the false case wil then set it to new default. If I copy it and wire it up, it does not clear with the false case. Delete and replace the one that is acting weird and you should be okay.

 

Note: A simple replace does not seem to work.

Message 7 of 14
(3,646 Views)

Dennis Knutson wrote:
I disagree. I don't know why the false case would reset one indicator but the behavior you expect is the behavior I see in 8.5. Can you post a VI that demonstrates this?

 


altenbach wrote:

I agree that this is not correct.


Perhaps I should have been more explicit in my original reply. I never said anything about whether it was right or wrong. All I said was that I could confirm the behavior in earlier versions of LabVIEW and was answering the question about when it had changed. 

 

As for whether it's expected behavior, then yes, it looks a little fishy to me. I don't think it has anything to do with the indicator being corrupt, as the same thing happens when you create a brand new VI with brand new indicators. As soon as you connect an indicator to the connector pane the behavior as described occurs. It's odd that this hasn't been encountered before.

Message 8 of 14
(3,634 Views)

Duh, I never thought to check the connector. You are right, this has been the expected behavior for quite some time and I'm pretty sure it has been discussed before.

Message 9 of 14
(3,626 Views)

Dennis Knutson wrote:

You are right, this has been the expected behavior for quite some time and I'm pretty sure it has been discussed before.


I don't remember this discussion and have never noticed this behavior before. Is it documented in the online help?

 

Apparently, connected indicators get cleared with each call, irrespective of the "clear indicators when called" setting, and that is probably a good and intended feature.

 

It will prevent the accidental appearance of stale data in the outputs (maybe such as seen here).

Message 10 of 14
(3,604 Views)