LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Global Variables Question

I do not see a problem with "LV2_GLB.VI" off hand.

As long as you are managing the "Slave" values properly.

Beyond that I could see an issue with multiple "Set - Value" combinations. If there exists the possibility that a "Set  - Value" operation can occur at more than one place in the code, would be another race condition.

Show us how you are using this LV2 in context if you wan thelp with that investigation.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 14
(841 Views)

One possible issue I'm seeing is with the Init action - if you call init from several VIs, you can overwrite some of your older data.
This is where the power of a functional global comes into play. Instead of using an init action, you can use the First Call? VI (in the Advanced>>Synchronization palette) to only initialize the USR at the first time you call the VI.

BTW, unless you need the index to be a DBL, I would suggest changing it to an I32, because the data type of the array index.


___________________
Try to take over the world!
Message 12 of 14
(831 Views)

HI

 

Iam in Remote Front panel based project.

Is it required all the variables in the project must be global.

 

 

Regards,

Hari

0 Kudos
Message 13 of 14
(505 Views)

@thinnker wrote:

HI

 

Iam in Remote Front panel based project.

Is it required all the variables in the project must be global.

 

 

Regards,

Hari


No.

 

If you have more question you would be beter served by starting a new thread and including more details. If English is not good for you then use your prefered language. (we're big, we're bad, we're international).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 14
(485 Views)