LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

global problem

Hi

 

Can someone help with this.

 

I have upgraded some  Vi's for Labview 4 to Labview 2009.  I am having one problem though with Globals that have been working fine in old VI's for the last 12 years approx created in Labview 4.

 

A sequence of VI's are run where the first VI asks the user to select some parameters that are written to different items in a Global Vi in same folder.  Every subsequent VI only reads these vales from the Global.   There are actually number of different Globals used that are initially written to.

The problem is that unless the Global VI is actually open on the desktop when the first VI writes values to it,  The values read may be the default values. It does not always happen. But the longer Labview is open and the more Globals read from the more frequent the problem.

 

I have tried recreating Global VI in case problem was due to resaving a VI originally created in LV4 (To upgrade VI's to Labview 2009  aniother version of Labview in between had to be used as Labview 2009 cannot read a Labview 4 VI directly.)

 

Thanks for any help

 

0 Kudos
Message 1 of 7
(3,268 Views)

LV 4 to LV 2009 is a very big jump!

 

In LV 5.1 (or was it LV 5.0 ?) multi-threading was introduced. Wht this meant is that code that previously only ran in a single thread is now run in parallel in multiple threads.

 

We used to be able to control if multiple threads was used by using the Option "Run in multiple threads" but I believe that option is no longer exposed.

 

AS a shot in the dark to detemine if this theory is valid (and possibly help you get over this issue) try adding the following line to your LabVIEW.ini file.

 

ESys.StdNParallel=0

 

THat was the token that was added when we clicked that option in LV 7.1

 

If that clears up your issue then the issue you are dealing with is probably a race condition in which case those can often be cured by switching oer to Action Engines as I describe in this Nugget.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 7
(3,253 Views)

Hi Ben

 

Did as you suggested and I've not seen this problem in a couple of hours. So far so good.

 

I'm thinking you may have been spot on !

 

 

Many Thanks

0 Kudos
Message 3 of 7
(3,229 Views)

kenley wrote:

Hi Ben

 

Did as you suggested and I've not seen this problem in a couple of hours. So far so good.

 

I'm thinking you may have been spot on !

 

 

Many Thanks


Smiley Mad

 

Grrrr...

 

A problem that subtle should have taken more than 15 minutes to ID let alone find away to fix it in LV 2009!

 

Smiley Tongue

 

Thanks for the update Kenley!

 

I have been sitting on that answer for about 11 years waiting for a chance to use it.

 

Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 7
(3,211 Views)

Ben

 

Spoke too soon!   

 

I can leave Global VI open on desktop and continue working without the the problem occuring but would like to have a permanent solution.

The thing is that the Global was recreated in LV2009 and is only being used in a very basic way.

 

Any more ideas ?

 

 

0 Kudos
Message 5 of 7
(3,163 Views)

Then move on to the link I included that talks about Action Engines.

 

Brace yourself, it will take some coding.

 

Can you narrow down the issue to a limited set of the globals or is the issue all over the place?

 

can you post the code?

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 7
(3,155 Views)

Hi Ben

 

This sounds like it would take some doing to resolve properly, Very likely beyond my capabilities, and requiring an expert to debug problem with entire equipment set-up in front of him.

 

I've found a simple and crude workaround.

 

I've called up the Global in the Test sequencer program which we use to run out product Test VI's.  That was then included that in PC Start-up menu so that on boot up, The Global is always loaded into working memory.

 

 

0 Kudos
Message 7 of 7
(3,037 Views)