07-02-2010 12:47 PM
07-02-2010 01:13 PM
I would think that 2000 shared variables would be a wee bit too much, wouldn't you?
\
What did you use as the datatype of your shared variable? If you created 20 shared variables for just one machine then I'm guessing you made each one an integer or a double. Instead, you could use an array. That way you'd only need one shared variable for one machine. The array would contain 20 elements - one for each register.
With 100 machines I'd use a 2D array. Rows = machine, columns = register. You can't create a shared variable that's directly 2D, but you can create a custom control that's a 2D array and create a shared variable from that. See How Do I Make a 2D Shared Variable?
07-02-2010 01:40 PM
Are you planning on having LabVIEW code that writes the data to these variables, or are you going to have the shared variables bound to their respective registers in each PLC? The answer to that question will determine whether S-mercurio's solution is feasible or not.
I'm thinking that one master 2-D array where 1 (row or column) is dedicated to the machine, and the other dimension is for each variable (so 20 x 100, or 100 x 20) would be difficult. If each PLC is an independent entity, which sounds like it is, I think you would be struggling against some kind of race condition as each machine tries to update its respective row (or column) of a 2-D array. So I think at the minimum, you would need at least a 1-D array for each machine thus 100 shared variables. Whether each machine can update an array of 20 registers, or whether it will require 20 variables for each machine, I don't know.
I don't know if 2000 variables would be too much for LabVIEW to handle. I bet Ben would know the most about this. I think he has a lot of past experience with machines that required a high number of nodes, or variables, or tags, or ....
Let's say you do need to create 2000 shared variables. I wouldn't go through the process of manually creating each one. LabVIEW used to have some tools to be able to import and/or export configuration data. I'm not sure if it still exists. I think it was a "tag manager" or something like that. With that, you would be able to create a text file (something you would have exported from Excel) that you could import into the manager.
But recent versions of LabVIEW do have some library and shared variable functions under DSC >> Engine control that would allow you to use LabVIEW to programmatically built your variables and libraries.
I don't think I can offer much more than that. I know in an older version of LV (I think 7.1) I exported some of my tag information. But I haven't needed to play around with with any of the new SV library building VI's lately because most of my libraries only consisted of a dozen or so variables that I could manuall create or copy from each other.
07-20-2010 10:30 AM
Hello all,
To monitor the machine status,now I need to create about 60 shared varibles for each machine ( the same register address in PLC ) , to monitor 100 machines ,what should I do ? I attach OPC configure file (file name Cycle_Time_V2010.07.opf) and LV project here, I have created one machine's share varibles and drag them to front panel ( in CBM1010A.LIB), OPC configure can be open with NI OPC SERVER.
Please show me how to solve this trouble .
07-20-2010 12:04 PM
Hello,
if anyone can help me out ?