04-21-2016 03:10 AM - edited 04-21-2016 03:30 AM
Hello together,
I've a LabView 2012 application, running since years in our production.
For the operator visible, a text indicator "Active State" shows the actual state, e.g. "Press Start Button" ...
From time to time I'm facing following problem: the content of the indicator is wrong. It shows the old state like "Label printed",
although the machine is in the next state "Press Start Button". Attached a simplified piece of code.
Any idea?
Solved! Go to Solution.
04-21-2016 04:36 AM
Whoa! That's a lot race conditions!
1. Why do you write state into property node value?
2. You can't be sure about synchronisation of your loops. For example: the second loop will execute first, the indicator States will change its value, and then the first loop will run, reads the ring text and then it will change value to one that was produced by local variable... But imagine, that the second loop executes in the meantime between property node will read text ring and writes the value into itself (which is pointless).
what was your purpose of writing value into property node?
04-21-2016 04:43 AM
no - of course this is wrong. That was just a test to find out if it eliminates the problem.
Here is the code which is used (in simplified form):
04-21-2016 04:50 AM
I don't see anything obviously wrong in your second example code, but since this isn't your actual system, there might be a bug there which isn't visible in the example.
Other relevant points:
04-21-2016 05:10 AM
Thanks for your answer so far.
The Enum is on the FP, only visible for administrator and when the problem occured I found that Enum display was correct however
the string indicator display was not correct. I too have the feeling that this is a bug.
I'll switch now to "Format Into String", thanks for the tip.
I'll try to give a positive feedback in some weeks.
Thanks.
04-21-2016 07:57 AM - edited 04-21-2016 07:58 AM
In your first screenshot, your property nodes are backwards.
Property nodes execute from top down. So first your are reading the current text state, THEN you are setting a new value. then waiting 100 msec. Only on the next iteration to you read the new value which was set in the last iteration.
Swap the order of properties in that node so you set the value first, then read the text.
PS: Please attach actual VI's when you post examples so we can have a chance to play with it and poke at it to figure out what is going on.
04-21-2016 08:48 AM
As written above. The first screenshot was wrong. Sorry.
04-21-2016 08:54 AM
Then attach an actual VI that demonstrates the problem if you'd like further help.
04-21-2016 08:58 AM
The issue is solved in the first instance, as described above. I have to monitor this and will report in some weeks if the problem is really gone.
I cannot reproduce the failure, I have to wait for it.
So no further help needed - at the moment.
Many Thanks to all of you.