No update on X-control value change
Posted 18 April 2012 - 08:06 PM
My x-control display then gets out of sync, i.e. if you read the data out (with a property node) immediately after writing it (by directly wiring the indicator), its wrong.
Am I doing something wrong or is this a real bug?
LV2011 No SP1
Posted 18 April 2012 - 09:51 PM
If you update your XControl using the Value property instead of using the FPTerminal, I'm 90% certain that you'll get the synchronous display behavior.
Posted 19 April 2012 - 04:20 PM
I can see that there is a race condition if I modify the Xcontrol data during one of these notify() occurances. In fact, during rapid updates doing this is absolutely awful and results in out of date display very often.
I'll have to rethink how to do this as modifying data in the Xcontrol can't happen fast enough to be practical.
Posted 19 April 2012 - 05:20 PM
Something is still not right about this.
I'm updating an Xcontrol by directly wiring the terminal with a string extremely quickly. I don't actually need the control to update that fast, but its possible that it will get hammered like that every once in a while. The problem is that once execution stops, if it was recently "flooded" with data, the control keeps updating like crazy (like a queue, not an notifier) even after the VI is stopped. Once it finally catches up, its not always the most recent data. It would be nice to know that the last data value displayed is in fact the most recent. Is there any work around for this?
Updating the value upon an execution change event does not work.
Posted 19 April 2012 - 06:20 PM
If Façade is not executing fast enough to keep up with data updates, it causes the updates to queue up. The updates will happen even after the VI stops running. To reduce data updates:
- Open the Xcontrol .xctl file in a text editor like Notepad.
- Add the bolded line shown below:
<Property Name="NI.Lib.Version" Type="Str">184.108.40.206</Property>
<Property Name="NI.XClass.Flags" Type="Int">0</Property>
<Property Name="NI.XCtl.OptimizeDataUpdate" Type="Bool">true</Property>
<Property Name="NI.XItem.DeclaredLeakProof" Type="Bool">false</Property>
- Save the .xctl file.