LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Text indicator is not updating

The problem is that a text indicator that is part of a JKI state machine will occasionally display no text when the subVI is loaded. That is the operators' description of the problem - what is actually happening is that the text box will stop displaying changed data and the last thing the code did in the previous run is write an empty string to the indicator. We have put a probe on the wire feeding the indicator. The correct data is on the wire; it is just not being displayed.

 

The zip file has some detailed documentation on what I've been able to determine so far and some code that demonstrates the problem, along with a hack that at least minimizes its occurrance.

 

The real code runs on Windows XP SP1 and I created the demonstration program on a Windows 7 box. The version of LV is 2011, both with and without SP1.

 

Any insights would be welcome.

 

Glenn Larkin

Lawrence Livermore National Labs

0 Kudos
Message 1 of 3
(2,530 Views)

I don't have the JKI state machine so I can't actually run the code, but I notice there is a global updating the strings. I can't find the global being written to more than once, but is it possible there is another writer that is writing a blank string?? This sounds like a classic race condition, especially when you say forcing execution order minimizes the frequence at which it happens. Have you searched the code for all global references to make sure that there is only the one writer, and a blank string isn't being written somewhere? Can you try a functional global to see if maybe its an issue with global variables themselves? You say the wire has the correct data on it but the indicator doesn't show the data. Can you read the value from a property node and see if that returns a blank string? What if you only pass updates via a queue, or notifier, does the problem go away? Basically, a good idea would be to get rid of the current mechanism of updating the string and replace it with something else to see if that remedies the problem. If it does, you know it is some issue with the global. These are all just guesses, but hopefully help somewhat. 

0 Kudos
Message 2 of 3
(2,522 Views)

Thank you for the suggestions. The global in the test application is there to act as a probe on a wire in the state machine. It is not present in the real application. The VI that implements the state machine is loaded into a subpanel by a VI which is itself loaded into a subpanel by the main VI. This is representative of the architecture of the real app. I have observed so far that the failure only appears when the state machine is called this way - move it "up" even one level of subpanel and I do not see the problem occur (if only it was that easy to re-architect the application!).

In an attempt to determine if the problem was in the data in the indicator or some kind of re-draw of the screen, I did add a Value property node read to the diagram. As soon as I did that, the problem stopped occurring. That works as a hack to keep the customer working, but I do not consider a floating, unconnected property node on a diagram to be a fix.

0 Kudos
Message 3 of 3
(2,495 Views)