11-24-2011 02:21 PM - edited 11-24-2011 02:25 PM
How can I import several "shared variables" from OPC into project; I have more than 100 tags at OPC server. I don't want to see these 100 variables at labview "schematic" , maybe just one block which will present group of these shared variables(not as subVi)...It exist something like this?
thanks
11-25-2011 03:44 AM
Cluster/Action Engine sounds like an answer to your question. You can create a cluster of information and with Unbundle access a names variable. You can place this Cluster in an Action Engine to almost completely remove it from the diagram. Then you'll end up with a small AE-icon which sends a cluster thread out which can be unbundled.
Add a Get/Set boolean connector to the AE and you can easily update the information when needed.
/Y
11-25-2011 05:42 AM
Hmm, I never use AE, which block in LV must I insert; I read this topic(http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801?view=by_date_as... but don't find which block represent AE?
The I just insert this block and add all "shared variables", and it will be then just one block in diagram?
thanks
11-25-2011 10:34 AM
@hlod wrote:
Hmm, I never use AE, which block in LV must I insert; I read this topic(http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801?view=by_date_as... but don't find which block represent AE?
The I just insert this block and add all "shared variables", and it will be then just one block in diagram?
thanks
An AE is a small sub-vi you create yourself, you can lookup Darrens nugget (if memory serves), else it's basically just a shift register which hold the information and a case for the different commands, the simplest being Read/Write, where one puts into the register and the other reads it out.
/Y
11-25-2011 10:45 AM
Hmmm, well I don't want subVi; I was looking something to select more input (shared variables) at once...without subVI, that one I already know how to create;
t
11-26-2011 04:48 PM
All decently structured programs have sub-vi's. 🙂
/Y
11-26-2011 04:51 PM
But "debugging" those schematic with sub-vi is so difficult; also if you want something change in code.... 😕
11-26-2011 08:18 PM
@hlod wrote:
But "debugging" those schematic with sub-vi is so difficult; also if you want something change in code.... 😕
No. It makes it easier. Once you know you have the subVI working properly, then you can forget about it. The subVI hides the details that you don't have to worry about in the larger program. And if you do need to change something, it's in a nice little compartment so you don't have to worry messing up the larger VI.