LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared variables

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

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 1 of 8
(3,135 Views)

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

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

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 8
(3,113 Views)

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

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 3 of 8
(3,102 Views)

@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

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 8
(3,095 Views)

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

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 5 of 8
(3,091 Views)

All decently structured programs have sub-vi's. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 8
(3,080 Views)

But "debugging" those schematic with sub-vi is so difficult; also if you want something change in code.... 😕

_________________________
Rookie; LV 2011 on WIN 7
0 Kudos
Message 7 of 8
(3,078 Views)

@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.

Message 8 of 8
(3,069 Views)