LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Readonly controls

Solved!
Go to solution

Hi Michele,

 


@michele.santucci wrote:

What's the differences? It make sense to use a shared variable within a project?


  • Global variables are accessible within an "execution" (a program running on one target). You cannot access globals in other executions in the same or different targets…
  • SharedVariables are (most often) network-based, so you can access them from other executions/targets. Because of their network background they tend to be (much) slower than globals…
  • To ask for a "project" isn't precise as a project can contain code for different targets (PC, RIO, FPGA), running in parallel. That's why I wrote about "execution"/"target" in the first two items…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 11 of 13
(102 Views)

> To ask for a "project" isn't precise as a project can contain code for different targets (PC, RIO, FPGA), running in parallel. That's why I wrote about "execution"/"target" in the first two items…

 

Ok I got it... I will revert my shared variables to global since I use it only between Vis that belongs to the same target/exe.

Message 12 of 13
(93 Views)

You have a point though, the naming can be a little tricky. Global could very well be the one that all .exe can reach while Shared being shared between VIs in the same .exe ... I guess it leads back to C and the like where you have Local (within a function) reach and Global (within the .exe, reachable to all functions). At that time they probably didn't think too much about other programs having access to it. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 13 of 13
(63 Views)