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
84645members
353980posts

Changing Template ID of Group Templates

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.

krishnaprasad68
Ensign
Ensign
0 Likes
7
1643

Changing Template ID of Group Templates

I am encountering a problem inside clear SCADA while changing the template ID of group instances.

I have two different templates with Group instance of another template inside them. I have created a group instance (instance 1)of one of them. I have referenced variables from the instance into various ST programs. I have a use case where I have to dynamically change the template ID of the instance 1. I have chosen the names such that the tags in various ST programs are not affected by this change. but every time i change the template ID the ST programs pops an error " Object(s) that this program depends on no longer exists".But on recompiling the ST program the error disappears. can anybody clarify the reason behind this and possible solutions.

 

Thanks in Advance

7 Replies 7
sbeadle
Janeway Janeway
Janeway
6
1632

Re: Changing Template ID of Group Templates

Hi. Logic programs resolve references at compile time, so unfortunately 'pulling the rug' under points which are being (effectively) re-referenced is not going to work. A possible workaround is to use indirectly referenced point objects and a program which fires off the Logic passing string names of the points. Note that you can't expect indirect tags to cause Logic to run on change, so you'll need to consider that.

krishnaprasad68
Ensign
Ensign
0 Likes
5
1630

Re: Changing Template ID of Group Templates

Thanks for the information @sbeadle . 

 

So if i use indirect tags the variables won't get updated quickly. i s that you are referring with the last statement?

BevanWeiss
Spock
Spock
4
1582

Re: Changing Template ID of Group Templates

What Steve was meaning, I believe, is that if you use Indirect Tags, then 'On Input Processed' is no longer applicable.

Since the exact input property is not known at configure time, then the Logic Engine can't subscribe to the 'On Input Processed' event to know when it should execute.

 

Hence, if using Indirect Tags then you can only use 'On Interval' (or I guess more correctly, you can't use 'On Input Processed') as the trigger condition.

 

This may mean that the variables won't get updated as quickly, since On Input Processed is triggered on each (valid) input property change, and you would need to use On Interval which is at a fixed update rate instead.

 

 

It's probably worth you looking into a few other options to keep the fixed references.  If your logic is in a Template then you could try a 'repair instance' to see if that patches up the logic references, although I'd definitely do this on an offline database first to make sure it doesn't have any unwanted side effects.

And you should probably log a case with your local Tech Support.  When performing the Convert To... Instance of... action I would expect that all references to objects within the Template Instance should be 'patched' as required, which would make the logic valid (and re-register subscriptions as required).  It's a bit of a niche situation obviously, and so unlikely to be high up the development fix priority list, but it does seem like undesired behaviour that should ideally be improved in the future (so that these negative side effects are reduced overall).

 


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..
krishnaprasad68
Ensign
Ensign
0 Likes
3
1481

Re: Changing Template ID of Group Templates

@BevanWeiss  Thanks for the reply.

 

Unfortunately, FBD s where I want to use fixed references all are stand-alone ones, they are not part of a template. So the solution did not work for me.

 

I used another way around this problem. I used SQL queries to access and manipulate database objects instead of direct tags. This allowed me to continue using the logic even if the template IDs are changed. But this made the whole system behave in a funny way.  Now even logic programs that use direct tags are not getting executed correctly. Does using SQL queries in St programs affect system performance.? 

 

 

 

 

geoffpatton
Commander
Commander
1
1476

Re: Changing Template ID of Group Templates

Yes SQL in ST can really slow down the system. When you have a lot of complex ST programs, especially if they are executing quickly, you get a bunch of things getting stuck in the queue wanting to be completed.

 

One thing that might help if you are not using it already is to use NOCACHE

 

VAR NOCACHE
Your Query code here
END_VAR

 

BevanWeiss
Spock
Spock
0
1471

Re: Changing Template ID of Group Templates

As @geoffpatton said, YES SQL in ST has serious performance impacts on your database.

I'd suggest that you just don't use it, have this as your rule.

 

If your FBDs aren't in templates, then you should only have a small number of them, so manually updating them alongside the other configuration change shouldn't be too much work.


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..
krishnaprasad68
Ensign
Ensign
0
1254

Re: Changing Template ID of Group Templates

Thanks for the insight @geoffpatton . using Nocache variables improved the situation.