Remote Operations Forum
Support forum for Schneider Electric SCADA systems, radios and RTUs. From commissioning integration devices and software, to enhancing existing installations or troubleshooting.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-01-26 07:10 AM
Hi
I created a function block and I want to use it in a program / section in structured text (ST)
The code of my function in the section is:
FB_Division_0 (Numerateur := A,
Denominateur := B,
Division => C);
I am looking for best and simple way to write this function in my section, like:
C := FB_Division_0(A,B)
But it gives me the Error E1064 call of non-function.
Can someone tell me please what I am doing wrong?
Thank you.
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: 2022-01-27 02:15 PM
The error message has it spot on:
Error E1064 call of non-function.
You are trying to call something that is not a function, as though it were a function.
You have created a Derived Function Block. The Function Block may only have a single 'Output', but this doesn't matter, the format of a Function Block is such that it shouldn't be expected to 'return' a value that can be assigned like this.
So the way that you should probably be calling this is:
FB_Division_0(A,B);
C := FB_Division_0.Division;
I actually may even be wrong on the parameter passing, it's possible that you have to set the inputs individually, i.e.
FB_Division_0.Numerateur := A;
FB_Division_0.Denominateur := B;
FB_Division_0();
C := FB_Division_0.Division;
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: 2022-01-27 02:15 PM
The error message has it spot on:
Error E1064 call of non-function.
You are trying to call something that is not a function, as though it were a function.
You have created a Derived Function Block. The Function Block may only have a single 'Output', but this doesn't matter, the format of a Function Block is such that it shouldn't be expected to 'return' a value that can be assigned like this.
So the way that you should probably be calling this is:
FB_Division_0(A,B);
C := FB_Division_0.Division;
I actually may even be wrong on the parameter passing, it's possible that you have to set the inputs individually, i.e.
FB_Division_0.Numerateur := A;
FB_Division_0.Denominateur := B;
FB_Division_0();
C := FB_Division_0.Division;
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: 2022-02-14 05:17 AM
Hi BevanWeiss
Yous solution works well
.
FB_Division_0(A,B);
C := FB_Division_0.Division;
Thanks for the answer.
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.