EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-07-29 04:07 PM
I would appreciate if anyone give a clear explanation of "In instance" & " By Expression" difference in template override?
I always running all override by using " In instance" and never have used " By expression" .
as far as I found if I use " In Instance" , that default values in instance will the same value in template.
But about "By Expression" it will be combination of Expression+ Parameter .
Any help that help me to understand this "By Expression" and " Base Address" ,would be highly regarded.
Thanks
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-07-31 01:46 AM
Hi.
Using 'In Instance' overrides lets you set a templated object's field value in the instance's object. The default for the field when the instance is created will be the field value in the template.
The By Expression override lets you write a formula for the field value, and that formula is evaluated when the instance is created or modified. So the field value is read-only, worked out from a string or numeric expression. There are two built-in variables you can use to build expressions - FullName and Name. These are the name of the instance. For example, you can set a field such as AlarmSource to the expression:
'Pump ' + Name
This will add the instance name onto the text 'Pump '.
Another application is to set an address from a number in the Name. So if you have an instance called 'Pump 2' you can set an address field (e.g. DNP3 point number) to the expression:
element( 2, ' ', Name, 0)
This gets the number after the space - element( 1 ... will get the part of the name before the first space.
(You can also pull out elements from the FullName using the ELEMENT function and the '.' delimiter).
Finally you can create Parameters and use them in your expressions. For example, create a parameter called 'BaseAddress' and refer to it in an expression, which might be BaseAddress+10 or some other offset per point. Perhaps use this to set all the addresses of the points in a template to a set of values offset by the parameter.
To set the value of the parameter in an instance, right-click the green instance and select 'Edit Instance'. Edit the parameters in the box below, then save and you can see the values in the override table above.
There's nothing to stop you creating a parameter for any field which you previously used 'In Instance' and then set them all to 'By Expression', This way you can edit all of the customisable properties of an instance on the one form, instead of having to open each item/point and finding the editable fields on the tabs.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-07-31 01:46 AM
Hi.
Using 'In Instance' overrides lets you set a templated object's field value in the instance's object. The default for the field when the instance is created will be the field value in the template.
The By Expression override lets you write a formula for the field value, and that formula is evaluated when the instance is created or modified. So the field value is read-only, worked out from a string or numeric expression. There are two built-in variables you can use to build expressions - FullName and Name. These are the name of the instance. For example, you can set a field such as AlarmSource to the expression:
'Pump ' + Name
This will add the instance name onto the text 'Pump '.
Another application is to set an address from a number in the Name. So if you have an instance called 'Pump 2' you can set an address field (e.g. DNP3 point number) to the expression:
element( 2, ' ', Name, 0)
This gets the number after the space - element( 1 ... will get the part of the name before the first space.
(You can also pull out elements from the FullName using the ELEMENT function and the '.' delimiter).
Finally you can create Parameters and use them in your expressions. For example, create a parameter called 'BaseAddress' and refer to it in an expression, which might be BaseAddress+10 or some other offset per point. Perhaps use this to set all the addresses of the points in a template to a set of values offset by the parameter.
To set the value of the parameter in an instance, right-click the green instance and select 'Edit Instance'. Edit the parameters in the box below, then save and you can see the values in the override table above.
There's nothing to stop you creating a parameter for any field which you previously used 'In Instance' and then set them all to 'By Expression', This way you can edit all of the customisable properties of an instance on the one form, instead of having to open each item/point and finding the editable fields on the tabs.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-08-04 07:14 PM
Thank you so much Stephen
in "In Instance" ,we can choose needed property in TEMPLATE and change it in instance. this is easy but for more variables will be time consuming.
About "By Expression" , I am a little got confused that why we are using it.
For test I have created a template with 2 Digital input and 1 analog input. I have overridden the "Point numbers" of points with " By expression" and assigned them all " BaseAddress". I suppose to give the digital inputs ,2 different point number ( I am using DNP3).I am wondering if we can assign point numbers automatically using "By Expression" ? and if I am correct how we can do it?
Thanks and Regards
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 1 month ago
Hi Stephen
Referring to your explanation about the "By Expression" override, would you please help me with this example:
I want to assign DNP3 point numbers automatically using " expression." I have used this formula: " PointNumber+1. I have 3 pumps that I want to show their status on SCADA. I want to assign them DNP3 points this way: 101, 102, 103. If I used this formula, all points would be 101.
Is there any way that I can assign them automatically?
Thanks
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 4 weeks ago
You can use a second template parameter called PumpNumber that you will set to 1, 2 & 3, etc for the instances Pump 1, 2 & 3, etc. Then your expression will be PointNumber + PumpNumber.
If your starting point number is going to be the same for all instances, then you can hardcode it instead of making it a template parameter. Then you will only need one template parameter (PumpNumber) and your expression will be '100 + PumpNumber'.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 4 weeks ago
If all 3 points are in the same template, use something like BaseAddress+1, BaseAddress+2 etc
If the 3 points are in different instances, each Base Address is to be different for each instance?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 4 weeks ago
Thanks Stephen
Let me break down what is inside of each instance.
The Pump template includes 4 interest points and 3 instances of this template. Points inside the template are:
I am trying to find a way that I can assign these points numbers By using expression, for cases that we have many instances.
for example when I use, "BaseAddress+1" for Pump On/ff, and base address say it 100, all points of first instance will be 101.
Regards and Thanks in advance.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 3 weeks ago
Instead of having a BaseAddress template parameter, have an AddressOffset parameter which is added to a fixed base address. The offset for the first instance is 1, the second instance is 2 and so on.
For example, for the "Pump On/Off" point set the DNP3 point number to be 100 + AddressOffset. For the "Pump Run/Stop" point use 200 + AddressOffset and so on.
NB. As the four points in the pump template are different types they don't need different DNP3 point numbers. For example, all four points in the first instance could have point number 101 giving DI 101, DO 101, AI 101, AO 101.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2 weeks ago
Dear Andrew
Thanks for your help. I have tried as far as I could and tried different ways. The frustrating thing is that I have done this before, and now I am not able to do it.
I have attached screenshots of variables and expressions that I have used for your reference.
My intention is that I define the formula (expression) in a way that when I am adding new Instance , that points assigned automatically.
I would be thankful if you let me know what my my mistake and any guidance to fix it?
Regards
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2 weeks ago
I don't understand what the problem is.
"instances.png" shows you have three instances of the template so the template just needs a parameter that defines which instance is which (1, 2 or 3). You can then use this parameter as an offset for the DNP3 point numbers. The points in the first instance will have DNP3 point number 101, the second instance 102 and so on.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.