11-12-2008 02:09 PM
In any case, bug or not bug, the time delay seems essentially unpredictable. I previously rejected this solution because of its theoretical unreliability. Race conditions are painfull to deal with but are acceptable when they can be controlled and prevented in a deterministic way (i.e.. no randomness, one will be 100% sure it is avoided).
Is there any event/value/trigger... that can be used to change the value of the XControl before it is first used in the Block diagram ? Or should we all conclude that there is no way to make a deterministic XControl-based Tick Count (ms)-like node ?
Best regards
11-12-2008 04:10 PM
Julian3 wrote:In any case, bug or not bug, the time delay seems essentially unpredictable. I previously rejected this solution because of its theoretical unreliability. Race conditions are painfull to deal with but are acceptable when they can be controlled and prevented in a deterministic way (i.e.. no randomness, one will be 100% sure it is avoided).
Is there any event/value/trigger... that can be used to change the value of the XControl before it is first used in the Block diagram ?
Best regards
Yes, you could do it with the init ability, when the previous version info shows 0.0.0.0 you have a fresh drop.
As I said earlier the following two events should be triggered before the VI finishes loading:
There is a specific event triggered when a VI is loaded into memory (Display State Change) and one when the VI started executing (ExecState Change).
Both of them should update the BD value of the XControl.
Ton
11-12-2008 06:26 PM
Sorry Ton, your solution eludes me, even after having written more than 1000 VIs myself.
In the attached file in my first post, in the Facade VI, the Data Out is always Tick Count (ms). Yet the "Run when opened.vi" always returns 0.
Also the init ability cannot set the XControl value directly. Can you be more specific on your solution to make a Tick-Count XControl ?
Regards
11-12-2008 11:59 PM
What happens if you put the MS timer inside the timeout event?
It might be that LabVIEW assumes that the Data In and Data Out are at the same memory position and not looks at the terminals but at the Data In position.
Ton
11-13-2008 02:19 AM
Placing the Tick Count node inside the timeout event of the XControl facade VI still make the XControl return 0 in the "Run when opened" VI.
I also tried to set the value of XControl through the Refnum of the Container State, assuming some internal other way of setting the XControl value, but the result is again 0.
Regards
11-14-2008 04:08 PM
Hi Ben,
This was reported to R&D (# 133433) for further investigation. I do not know whether they will consider it a bug or simply update the documentation, but they have been made aware of the issue. Thanks for the feedback!