04-13-2009 12:26 PM
In LabVIEW 8.6, I included a set of VIs in vi.lib\UserTags for assigning tags to objects in your VIs (or to VIs themselves). Tags are basically just name/value pairs that you can assign to any VI or any object in a VI. Tag names/values are persisted when you save the VI after assigning a tag. There are several possible use cases for tags, here are just a few:
Prior to LabVIEW 8.6, tags were only available with private VI Server methods...in fact, the VIs in vi.lib\UserTags wrap these private methods, with a few caveats attached:
04-13-2009 12:46 PM
Some quick ideas:
I posted a quick example here which demonstrated attaching size info to controls, so that you could do proper dynamic resizing of the front panel. Of course, a full framework for something like this would require a lot more work.
You could save preset values for controls with the controls themselves (e.g. different default values).
If you had access to the block diagram hierarchy of objects, you could mark all kinds of structures.
04-13-2009 01:29 PM
Are the Tag-Vis working on the runtime engine? Are they saved with the VI?
And for use-cases: I would use tags for any kind of testing/analyzing/validating VIs, including a revision number/checksum (such as individually excluding from some test scenarios, or not performing checks again to save time). But that would require a severe bunch of private functionality, at least in some most cases.
Felix
04-13-2009 01:37 PM
Shouldn't tags be a property node (or invoke) ?
So it would be easier to use.
They are a very nice feature !
04-13-2009 02:01 PM
Pnt: I guess in fact they are nothing else than property nodes. We end users just can't see them, as they are private to NI R&D.
And why? That's clearly explained in Darrens post. Some tools of our IDE use these Tags, and marking ours as 'user' inside the wrapper VI will prevent that we mess things up. Clearly shows why we should not play with private functionality.
Or should we during our easter holiday...
Felix
04-14-2009 05:13 PM
04-15-2009 02:23 PM
04-20-2009 07:01 AM
Darren wrote:In LabVIEW 8.6, I included a set of VIs in vi.lib\UserTags for assigning tags to objects in your VIs (or to VIs themselves).
Let's see if I understood correctly. The tags are assigned to objects within the VI and not to the VI itself. Each object within the VI can have one or more tags assigned to it.
How would someone access these from outside LabVIEW?
R
04-20-2009 07:56 AM
Tags can be assigned to any object in the Generic class hierarchy (which includes FP objects and BD objects), but also to VIs.
As for accessing it externally, since the methods are private, I assume you can't see them in the ActiveX hierarchy and would have to use a wrapper VI to get and return the information (Command line arguments are probably the simplest, but I'm not sure how you would be able to return the info. You might need to implement the VI as a DLL function).
05-14-2009 01:22 PM
Darren wrote:In LabVIEW 8.6, I included a set of VIs in vi.lib\UserTags for assigning tags to objects in your VIs (or to VIs themselves).
I've always used the private scripting nodes to use tags - any chance of the VIs in the new folder appearing in the standard palettes in LabVIEW 2009?