Skip to main content



      Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Can I connect function block input or output with variable? Like IEC61131-3(Can I connect function block input or output with variable? Like IEC61131-3)
Can I connect function block input or output with variable? Like IEC61131-3 [message #1791284] Wed, 27 June 2018 11:08 Go to next message
Eclipse UserFriend
Hello, does 4DIAC IDE support local or global variable like IEC61131-3, for example, I can use variable in F_ADD IN1/IN2/OUT, use variable is much flexible, IEC61131-3 support it, but I can not find in 4DIAC IDE, or I may have mistake to use 4DIAC IDE ?
Re: Can I connect function block input or output with variable? Like IEC61131-3 [message #1791290 is a reply to message #1791284] Wed, 27 June 2018 12:22 Go to previous messageGo to next message
Eclipse UserFriend
IEC 61499 does not have global variables. Therefore 4diac also does not support them. You can have local variables inside of FBs, which are called internal vars in IEC 61499.

Cheers,
Alois
Re: Can I connect function block input or output with variable? Like IEC61131-3 [message #1791955 is a reply to message #1791290] Sun, 08 July 2018 23:18 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alois,

From the programming point of view, it is better have global veriables to connect to FBs, not only connect FBs to constant value or connect between FBs.

If I want to extend it, could you give me some suggestion for that?

Best Regards,
Henry
Re: Can I connect function block input or output with variable? Like IEC61131-3 [message #1791971 is a reply to message #1791955] Mon, 09 July 2018 04:45 Go to previous messageGo to next message
Eclipse UserFriend
Hi Henry,

I disagree strongly that global variables are either needed, or improve something from the programming point of view. If you REALLY NEED to get a similar effect, you can also use PUBLISH/PUBL and SUBSCRIBE/SUBL, although I would recommend to restructure your program to eliminate the need for a global variable!

Best regards,
Martin

[Updated on: Mon, 09 July 2018 04:45] by Moderator

Re: Can I connect function block input or output with variable? Like IEC61131-3 [message #1791975 is a reply to message #1791971] Mon, 09 July 2018 05:30 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I agree here with Martin and would add a strong warning towards the PUBL/SUBL approach as in my experience I noticed that these leads to very hard to understand and maintain programs.

There is a very good reason that IEC 61499 does not provide global variables: in distributed systems global variables are very hard to implement and to use correctly.

As I pointed out above maybe Basic Function Blocks with their internal vars and with the algorithm local vars (i.e., BEGIN_VAR i:INT; END_VAR) are the solution you are looking for.

Cheers,
Alois
Re: Can I connect function block input or output with variable? Like IEC61131-3 [message #1792003 is a reply to message #1791975] Mon, 09 July 2018 12:03 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alois, I start to understand your suggestion by using Basic Function Blocks, I will change the concept of application programming. IEC61499 is really different concept than pure IEC61131-3 programming, even IEC61499 extend lots of feature from IEC61131-3.
Re: Can I connect function block input or output with variable? Like IEC61131-3 [message #1792036 is a reply to message #1792003] Tue, 10 July 2018 07:51 Go to previous message
Eclipse UserFriend
Hi Henry,

Great that this is of help for you.

Cheers,
Alois
Previous Topic:E_DELAY/wait in ST
Next Topic:Guide from migrating from 61131-3 ST application to 61499
Goto Forum:
  


Current Time: Mon Jul 14 02:12:48 EDT 2025

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

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

Back to the top