Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84248members
353348posts

Metadata field reference returns point ID instead of point fullname

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
Hardin4019
Lieutenant
Lieutenant
0 Likes
7
2419

Metadata field reference returns point ID instead of point fullname

I am working on getting a mimic animation to work the way I want it to. I am trying to use a Metadata field that is referencing another point to change the visibility of a text box, and when I call that Metadata field, the result returned is the ID of the point listed in the Metadata field instead of the FullName. Is there any way around getting the ID instead of the FullName?

 

Long version, I have a Valve Mimic that is heavily used. The point "Valve Position" is configured to the valve mimic on many screens, and my valve symbol has an animation for a box to represent the valve is in "Manual", which is another point. I'm trying to get the Valve Mimic to have a yellow box with an M inside it if the Manual point .CurrentStateDesc contains 'Man', without needing to go to every screen and configure another point to the valve mimic. 

 

Using a Metadata field configured as a String instead of Reference sort of works, but the STRING has to be manually entered in each instance of a template (which I'm trying to avoid the extra steps), and a Reference data field automatically updates to the correct point, but only returns the point ID.


Accepted Solutions
BevanWeiss
Spock
Spock
0 Likes
0
2397

Re: Metadata field reference returns point ID instead of point fullname

Sorry, I probably should have read the full issue that you have.

 

My recommendation here is to have an entire mimic 'symbol' (which takes no parameters) within the template.

Then you drag and drop the template instance version of the symbol onto each mimic as applicable.

 

This template instance version would also be where the 'shared with other embedded mimics' linkage would be broken.

 

Whilst the idea of having a single standard mimic which is dragged and dropped on each screen, and then configured for the appropriate device instance sounds good (only 1 DB object shared for all devices), as you're learning, when you make enhancements to this that require another parameter then it's painful work to add these in.

 

Whilst having 1 DB object (mimic) per Template Instance (since it's defined in the Template) does add lots of extra DB objects over time, the impact of these is typically very small.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..

See Answer In Context

7 Replies 7
BevanWeiss
Spock
Spock
0 Likes
0
2404

Re: Metadata field reference returns point ID instead of point fullname

There is a terribly bad way to do something like what you're after...

 

NOTE: AVOID USING THIS IN A PRODUCTION DATABASE... HERE LAY DRAGONS.

 

So there is a hidden little trick in the expression world, where you can perform an SQL Query as 'a tag'.

Then you can nest this as an indirect tag reference and get something similar.

 

So, assume that you have a Metadata field called 'ReferencedObject' which is of Reference type.

Then you could do the following

 

['?SELECT FullName FROM CDBObject WHERE ID = ' + Str(".Overview.ReferencedObject")]

To get the FullName for the object based upon the ID field for it.

Obviously if you want to start doing additional things, like animating a value based upon the value of the point pointed to by the reference field, then this is possible also.

Something like 

['?SELECT CurrentValueAsVariant FROM CDBPoint WHERE ID = ' + Str(".Overview.ReferencedObject")]

 

But you have to keep in mind that this is performing a query, plus all the database transactions for this, each time any of the referenced objects has an Update triggered for it.  So it will lead to bad database performance.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Hardin4019
Lieutenant
Lieutenant
0 Likes
5
2402

Re: Metadata field reference returns point ID instead of point fullname

So it sounds like the better option is one of a few possibilities that require me to go through and edit every instance of a template.

 

  1. Add a Parameter to my valve symbol mimics, then go to every mimic where the symbol is used and configure the Auto - Manual CMD parameter.
  2. Use the string Metadata field, and edit the Metadata on every instance to have the correct Auto - Manual CMD FullName.
  3. Make a new or combine symbol mimic that contains both the valve position and the Auto - Manual CMD symbol inside my template. Then replace the original valve symbol everywhere with the one from the template. 
BevanWeiss
Spock
Spock
0 Likes
0
2398

Re: Metadata field reference returns point ID instead of point fullname

Sorry, I probably should have read the full issue that you have.

 

My recommendation here is to have an entire mimic 'symbol' (which takes no parameters) within the template.

Then you drag and drop the template instance version of the symbol onto each mimic as applicable.

 

This template instance version would also be where the 'shared with other embedded mimics' linkage would be broken.

 

Whilst the idea of having a single standard mimic which is dragged and dropped on each screen, and then configured for the appropriate device instance sounds good (only 1 DB object shared for all devices), as you're learning, when you make enhancements to this that require another parameter then it's painful work to add these in.

 

Whilst having 1 DB object (mimic) per Template Instance (since it's defined in the Template) does add lots of extra DB objects over time, the impact of these is typically very small.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
geoffpatton
Commander
Commander
0 Likes
3
2394

Re: Metadata field reference returns point ID instead of point fullname

Your option 2 may not be as bad as you think. Use the Bulk Edit tool to get the Metadata fields, exported to an excel file then you can update them. If the fullname of the object that contains the Metadata field is similar to the actual full name you need, you could copy those and then do a quick edit of them.

Hardin4019
Lieutenant
Lieutenant
0 Likes
2
2386

Re: Metadata field reference returns point ID instead of point fullname

I had come up with a similar plan for option 2 late yesterday afternoon. I am considering using a ST or FBD within the template to fill in my Metadata string field that can be executed manually or from another ST program that can query and located all of the logic programs of a particular name and execute them all.

 

Fortunately, my Valve Position and Auto - Manual CMD are in the same group template, so either my idea above our Geoff's idea would be fairly easy to complete.

tfranklin
Lt. Commander
Lt. Commander
0 Likes
1
2382

Re: Metadata field reference returns point ID instead of point fullname

A new option has entered the thread!

 

Option 4 is something I've done in the past where instead of using a reference field, convert it to a link field.  Links will provide the reference and a full objectlink to the object.  You can use the object in an animation if you do something super clever and not recommended on a base object, but on the top layer of something it seems fine in my experience.

 

If you're familiar with object links, you know that it'll return something like SCX:///objecttype/Somegroup.somepointhere

 

In an animation, to get the object you want, you can use ELEMENT(1,'/',linkmetadatahere,1) to have it return the full path to the object. 

 

If you do what most frown upon and use an indirect animation, you could then do:

 

[ELEMENT(1,'/',linkmetadatahere,1) + '.thepropertyyouneed']

 

Use of indirect animations should be limited, as you may already know.  It's a touchy subject and you'll find a lot of content around them in these forums.

tfranklin
Lt. Commander
Lt. Commander
0 Likes
0
2380

Re: Metadata field reference returns point ID instead of point fullname

I should probably have made the following point a littler more clear:

 

If you use this method, be sure to only do it on the top layer of something.  An indirect animation on the base level of an embedded mimic will cause significant performance issues if not implemented properly.