- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-01-26 07:10 AM
SCADAPack X70 logic Functions Blocks in ST
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.
- Labels:
-
SCADA
Authentication Failed.
- Authentication Ticket Mismatched, failed authentication.
Link copied. Please paste this link to share this article on your social media post.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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;
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..
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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;
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..
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.

