LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XControl dynamic default value

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

0 Kudos
Message 11 of 16
(1,633 Views)

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

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 12 of 16
(1,617 Views)

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

0 Kudos
Message 13 of 16
(1,607 Views)

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

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 14 of 16
(1,595 Views)

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

0 Kudos
Message 15 of 16
(1,581 Views)

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!

Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
Message 16 of 16
(1,540 Views)