Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts. Register and secure your Critical IT infrastructure
Is it possible in structure text to implement a function within a Derived FB type section
Industry Automation and Control Forum
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2023-12-2210:33 AM
Is it possible in structure text to implement a function within a Derived FB type section
Hi,
I'm on control expert classic. I implemented a section of a Derived FB Type in structure text.
There are some pieces of code that are repetitive in the code and I like to put them inside of a function
ex :
FUNCTION Foo : REAL
VAR INPUT
BAR : REAL;
END_VAR
BEGIN
Foo := BAR ;
END_FUNCTION
(*BEGING OF THE DFB*)
OUT_DFB_1 : = Foo(IN_DFB_1);
OUT_DFB_1 : = Foo(IN_DFB_2);
So is it possible to nest function inside of DFB sections? Can't find any documentation on this topic.