08-08-2016 09:24 AM
For some XControls, I can easily set the default value for the data in the "Direction Change" event of the Facade.vi.
However for some XControls, that doesn't work because an extra "Data Change" event is received with the data value being the default for the type (not the default of the typedef Data.ctl).
Here is the sequence of events:
Data Change (value received = default for type)
Direction Change
Display State Change
Exec State Change
Timeout
Data Change (value received = default for type)
Timeout
I can't figure out why some XControls get an extra "Data Change" event.
Solved! Go to Solution.
08-09-2016 03:21 PM
Can you attach a simple project that shows the behavior? It would be useful to be able to see the behavior and try to reproduce it.
Ryan D.
Applications Engineering
08-10-2016 07:33 AM
It turns out that the 'Direction Change' event in the Facade.vi is the wrong place to set the default value.
A 'Data Change' event can happen after 'Direction Change', depending on what's going on in the 'Facade.vi'. The correct place to set the default value is in the 'Init.vi'. Here is the template I use:
08-10-2016 07:38 AM - edited 08-10-2016 07:38 AM
Did you just "solve" your own problem? If so, please mark your post as the Solution to help other Forum readers who might be interested (it's really OK to do that).
Bob Schor