06-14-2012 08:25 AM
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.
06-14-2012 08:57 AM - edited 06-14-2012 08:58 AM
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."
06-14-2012 09:19 AM
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?
06-14-2012 10:26 AM
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.
06-16-2012 08:09 AM
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.