Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » "Internal FBs" in a Basic Function Blocks(How to use the FBs defined in the properties of a Basic Function Block ?)
"Internal FBs" in a Basic Function Blocks [message #1872165] Thu, 24 October 2024 12:53 Go to next message
Guido Piasenza is currently offline Guido PiasenzaFriend
Messages: 17
Registered: October 2024
Junior Member
Dear Experts,

I am defining a Basic Function block starting from the template.

In the "Properties" tab of the new function block there's a sub-tab called "Internal FBs". Here I found I can add function blocks from the library.

My question is: how do I use these blocks ? I imagined I would be able to use it inside a function, such as "internalBlockInstance.IN = TRUE;", however this does not seem to work.

Can anyone shed some light ?

Thanks
Guido
Re: "Internal FBs" in a Basic Function Blocks [message #1872195 is a reply to message #1872165] Thu, 24 October 2024 21:58 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1639
Registered: January 2014
Senior Member

Hi,

internal FBs is an idea that was translated from IEC 61131-3 to IEC 61499. Similar to IEC 61131-3 where internal variables of FBs can also be FBs we added this as additional list. You can call FBs in your algorithms like you can do that in IEC 61131-3.

We destinquish two different call types:

1. if the FB has only one input event:
internalFB(IN := TRUE, OUT => var3);

2. if the FB has more then one event the event name acts as method name:
internalFB.REQ(IN := TRUE, OUT => var3);
internalFB.INIT(QI := TRUE, QO => var2);

I hope this helps.

Cheers,
Alois
Re: "Internal FBs" in a Basic Function Blocks [message #1872234 is a reply to message #1872195] Fri, 25 October 2024 13:27 Go to previous messageGo to next message
Maxim Kufeld is currently offline Maxim KufeldFriend
Messages: 3
Registered: October 2024
Junior Member
Hello everyone!
I'm trying to make a SimpleFB with ST algoritm. I use internal FBs (TON and R_trig in particular) like this:
TON0(IN:= Work, PT:= CommonSwitchTime, Q=> NeedSwitchPLS);
And when I'm trying to export the FB it shows an error of output variable Q:
Unhandled parameter types: [org.eclipse.fordiac.ide.model.structuredtext.structuredText.impl.OutArgumentImpl@5350383e (var: Q) (not: false)]
So I wonder whether my FB_TON instance call is written in a right way or do I miss something?

Thanks
Maxim
Re: "Internal FBs" in a Basic Function Blocks [message #1872237 is a reply to message #1872195] Fri, 25 October 2024 13:44 Go to previous messageGo to next message
Guido Piasenza is currently offline Guido PiasenzaFriend
Messages: 17
Registered: October 2024
Junior Member
Thanks, very clear explanation !
Re: "Internal FBs" in a Basic Function Blocks [message #1872261 is a reply to message #1872237] Fri, 25 October 2024 21:55 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1639
Registered: January 2014
Senior Member

Hi Maxim,

this feature only works correctly in the preview versions of the upcoming release. Please use the 4diac IDE release you can get from here https://download.eclipse.org/4diac/updates/rc/
If you scroll down there are the zip files for the different platforms.

Re: "Internal FBs" in a Basic Function Blocks [message #1872446 is a reply to message #1872195] Thu, 31 October 2024 10:15 Go to previous messageGo to next message
Maxim Kufeld is currently offline Maxim KufeldFriend
Messages: 3
Registered: October 2024
Junior Member
Hallo Alois!

Thank you a lot! I'll try. Do I need to use some new version of FORTE source files either?
Re: "Internal FBs" in a Basic Function Blocks [message #1872479 is a reply to message #1872446] Fri, 01 November 2024 08:18 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1639
Registered: January 2014
Senior Member

Yes please use the latest 4diac FORTE source from our github repository. Here please use the freeze branch.
Re: "Internal FBs" in a Basic Function Blocks [message #1872485 is a reply to message #1872195] Fri, 01 November 2024 13:33 Go to previous message
Maxim Kufeld is currently offline Maxim KufeldFriend
Messages: 3
Registered: October 2024
Junior Member
Thanks!

[Updated on: Fri, 01 November 2024 13:59]

Report message to a moderator

Previous Topic:How to create IEC 61131-3 callable function in 4diac?
Next Topic:Interfacing input-->output with type ANY_MAGNITUDE
Goto Forum:
  


Current Time: Wed Feb 05 15:01:49 GMT 2025

Powered by FUDForum. Page generated in 0.04519 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top