LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

limit to the number of shared variables

Is there a limit to the number of netword shared variables I can use?  I'm working on a real-time system with a large I/O count.

0 Kudos
Message 1 of 5
(3,361 Views)

See this reply from Ben: (item 2)

 

http://forums.ni.com/t5/LabVIEW/Maximum-no-of-plots-allowed-in-Graph/m-p/1831773#M626899

 

or I will simply quote his answer:

 

Question: "How many shared variables can be configured in a single Labview project?"

Ben: "As many as you want (maybe limited to 65K if not 2 Gig) but unless you are running on a Cray (is that a dated term?) you may run into performacne issues."

0 Kudos
Message 2 of 5
(3,352 Views)

It's too vague of a question to give concise answers but I've had apps with 3000+ shared variables that worked fine - but the data rate was only 1Hz or 1 sample/sec. I also used a lot of arrays in the PLC to simplify and consolidate data types. This was a LV application working with a PLC via RSlinx. You will probably get acceptable performance from an RT system - depending on your acquisition rate, etc. What do you want to do?

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 3 of 5
(3,345 Views)

The system I am building has about 350 actual I/O points.  I have both a real-time app and a user interface that will run on a PC.  I'm using the shared variables to move data back and forth.  Aside from the I/O points, I have limits tied to most of the analog inputs, as well as values necessary to operate each of the 6 PID loops.  So I have PID parameters, set points, data rates, process variables, enable/disable and PID outputs.  I've built some controls using clusters to manage repeated data, such as the PID parameters and the high/low limits.  I will also be running 6 VFD's, each having their own set of operating parameters, manual/auto, speed settings and feedback.  Those are all in a single control.  I also have to allow the users to operate some valves directly, so I have open/close discretes.  I'm in the neighborhood of 450 shared variables right now and wanted to make sure I wasn't getting into a grey area.  The most I had ever used in a similar system was 250.  The data rate should not be a problem. These are all pressures, flows and temperatures that have slow rates of change, so I don't need to sample the data at a very high rate.  It seems like I'll have no problems.  Thanks.

0 Kudos
Message 4 of 5
(3,339 Views)

Not sure how your program is set up but one trick I really like is that you can bind a NSV to a custom control, 2010 and later.  Therefore, you could make a costume control that's a cluster that contains for example, all of your PID Settings.  You could then bind your NSV to this control, and you would only need one variable for each PID.  Something to consider that might simply you code and the # of variables you have.  

 

As far as performance goes, I'm not sure if this speeds things up.  

0 Kudos
Message 5 of 5
(3,319 Views)