LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Variable - Run Node first?

Not to revive an old thread, but searching for answers myself and having posted questions before, I can appreciate the EXTREMELY LONG time it takes for anyone to ever respond on this forum. It is really sad. Most other boards I am a member of provide responses, whether complete or not, the very same day. I can't believe it took a " Proven Regular " about 5 days for a response to this very specific and general comment. One in fact based on a NI "Note:".
PXI-1045,PXI-8196 RT,PXI-4220 (slot 2),(2) PXI-6259 (slot 3 and 4),PXI-5152 (slot 5),PXI-2585 (slot 6),PXI-5404 (slot 7)
LV 8.2.1, RT 8.2, DAQmx 8.5, MAX 4.2, VISA 4.1,
Pharlap OS ver.12.0, PH_EXEC ver. 8.2
0 Kudos
Message 11 of 16
(1,434 Views)
" I can't believe it took a " Proven Regular " about 5 days for a response ..."
 
All contributors with Gold bars are volunteers.
 
Replies from such should be viewed as a gift.
 
With that having been said, a free gift in only five days is good. I have posted many questions that were NEVER answered (by Blue or Gold).
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 12 of 16
(1,424 Views)

Ben,

You can not be serious with that reply? This is a forum, a community of people sharing an interest in a specific topic (the key there is sharing). I have never been on any other forum out there created of nothing else but volunteers. That's what makes the internet different, free flow of information, from volunteers. People join these types of groups to share knowledge with each other, willingly, and your comment just totally dissolves you of any and all respect with that regard. I'm sorry I got the wrong impression by mistakingly joining this community of elitist.

And to clarify, the original author of the post had the Gold bars not the person who replied to them. So what in the world would that person being a volunteer have anything to do with your diatribe?

PXI-1045,PXI-8196 RT,PXI-4220 (slot 2),(2) PXI-6259 (slot 3 and 4),PXI-5152 (slot 5),PXI-2585 (slot 6),PXI-5404 (slot 7)
LV 8.2.1, RT 8.2, DAQmx 8.5, MAX 4.2, VISA 4.1,
Pharlap OS ver.12.0, PH_EXEC ver. 8.2
0 Kudos
Message 13 of 16
(1,413 Views)

I'm looking to clear out old value in a shared variable me too.

Is there some solutions more 'elegant' than deploy/undeploy variable ?

Thx,

Paul

0 Kudos
Message 14 of 16
(1,323 Views)
You might consider having an Initialize phase in your block diagram. Use the error clusters from the shared variable to ensure the order of execution.
But put simply: Write an intialization value to your shared variable in the beginning of your code. You won't have to redeploy your shared variable this way. You can simply run your application, making sure the write the initialization value first.
Cheers,
Emilie
0 Kudos
Message 15 of 16
(1,299 Views)

LV 8.5:  Warm up read necessary

LV 8.6:  Wait 50 ms after first running your application.  Then, conduct Shared Variable operations.

 

NI had this to say about warm up reads:

 

"It seems that the way shared variables works has changed from version 8.5 to 8.6. In 8.5, the variable connection is not set up until the first node is executed. This is why a "warm up" read is necessary in 8.5. In 8.6 however, the connection is set up as soon as the VI is executed. However this connection can still take some time, so in 8.6 all that really matters is that there is a large enough delay between when the VI is run, and when the shared variables are used. Therefore either method of the warm-up read or initial delay should give the VI enough time to create a connection."


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 16 of 16
(1,054 Views)