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
84650members
353990posts

Set the value of a Template Parameter on an Instance via Scripting/Logic

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
rlao
Lieutenant
Lieutenant
0 Likes
5
1888

Set the value of a Template Parameter on an Instance via Scripting/Logic

Hi,

 

We have a single pump template that caters to two different types of VSD's that both talk via the built-in SCADAPack Modbus Scanner. The only difference between those two types of VSD's is the Modbus mapping is different. This difference is currently accounted for via a template parameter, i.e. you set this parameter in the site instance to 0 and it will use a certain Modbus map, while setting the parameter to 1 will use a different Modbus map. This allows the single template to cater for both VSD configurations.

 

The issue is if maintenance crews change the VSD out on-site from one type to another, then we have to be engaged just to toggle that one parameter. Is there a way to expose template parameters somehow so that it can be changed by an operator from a mimic? Such as through scripting and/or logic?


Accepted Solutions
JChamberlain
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
1
1860

Re: Set the value of a Template Parameter on an Instance via Scripting/Logic

They aren't exposed internally, you'd have to use the .NET API. There's a method in Client.Simple; DBObject.SetInstanceVariablesMethod.

See Answer In Context

5 Replies 5
JChamberlain
Schneider Alumni (Retired)
Schneider Alumni (Retired)
0 Likes
1
1861

Re: Set the value of a Template Parameter on an Instance via Scripting/Logic

They aren't exposed internally, you'd have to use the .NET API. There's a method in Client.Simple; DBObject.SetInstanceVariablesMethod.

rlao
Lieutenant
Lieutenant
0 Likes
0
1857

Re: Set the value of a Template Parameter on an Instance via Scripting/Logic

Thanks Jesse, probably too much complexity and trouble for our particular situation but definitely good to keep in mind for future.

geoffpatton
Commander
Commander
0 Likes
2
1851

Re: Set the value of a Template Parameter on an Instance via Scripting/Logic

@rlao  You can allow writing to a Variable object in the template.

 

Just put it on a mimic and set the pick action to the method.

 

One gotcha with Parameters is that if you export it, you don't get the value because it is not part of the configuration. I have gotten around this by using a Constant Variable.

Set the override on Variable Value.

The user needs configuration rights to be able to write to it. Also, you have to use a script to set the Value.

 

Edited: to be more clear on the override and what is being set.

rlao
Lieutenant
Lieutenant
0 Likes
1
1835

Re: Set the value of a Template Parameter on an Instance via Scripting/Logic

Hi Geoff,

 

Yes that's the way we've always done it, but I am trying to embrace the use of template parameters. Works very well in some cases but I've also encountered shortcomings such as this. I think if there was a way to expose template parameters to the end-user rather than just have it as an engineering thing, it would be a lot easier to adopt.

Hardin4019
Lieutenant
Lieutenant
0 Likes
0
1830

Re: Set the value of a Template Parameter on an Instance via Scripting/Logic

+1 to what Geoff said. 

 

I'm assuming two things. One is your operators have the ability to Control. The second is that your "single pump template" has within it, everything that it needs for both VSD's and, you aren't changing from one instance of a template, to an instance of a completely different template. 

 

I would use a Variable (Boolean) or Internal Digital Point inside of your template that your operators can Control. The Internal has the added bonus of having history so it can be added to a Trend. Have your Variable or Internal Digital run a ST or FBD program set to either run On Input Processed, or Set to Timed but with a time limit of 0, then give your operators a button to Execute the program. Then have the program change the  the same parameter you are already using. This way when you export or backup your Database, you have the parameter in the current state.