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 » Constants or enumerated types for Data Input parameters.(Is there any way of defining constants or enumerated types for Data Input parameters in 4diac?)
Constants or enumerated types for Data Input parameters. [message #1849553] Tue, 25 January 2022 00:48 Go to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
Does anyone know of a way to use enumerated values or constants within the 4diac IDE?

I have a project that has an SIFB which uses one of a set of enumerated values to specify a configuration parameter. I would like to be able to specify a more user-friendly name such as COMMAND_STARBOARD_LOWER rather than the value 6. Ideally, it would be good for the boot export generator to be able to substitute the correct constant when forte.fboot is being created.

Is there anyway we might be able to do something like that currently? In the IEC 61499 standard Part 1 (2013) it mentions this on page 70:

parameter::= parameter_name ':='
(constant | enumerated_value | array_initialization |
structure_initialization) ';'
<as defined in IEC 61131-3>

Thanks,
Barry

[Updated on: Tue, 25 January 2022 00:52]

Report message to a moderator

Re: Constants or enumerated types for Data Input parameters. [message #1849569 is a reply to message #1849553] Tue, 25 January 2022 21:09 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi Barry,

you are right the best option here would be an enumerated data type. Currently we are not yet supporting it and I don't know when we will. I've once already had a look on constants but not yet sure how to get them in a suitable way into 4diac.

A not as powerfull but maybe for you still workable solution could be our virtualdns infrastructure. You can define there key value pairs which you can then use as inputs for your fbs.
Re: Constants or enumerated types for Data Input parameters. [message #1849577 is a reply to message #1849569] Wed, 26 January 2022 07:53 Go to previous messageGo to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
Thanks Alois,
It's an interesting concept that we only started discussing in our laboratory during the design of our Landing Gear System function blocks. They exchange pre-defined commands between subsystems and it made sense to restrict them in some way to a closed set of enumerations.

Definitely something to think about in the next IEC 61499 standards release.
Re: Constants or enumerated types for Data Input parameters. [message #1849641 is a reply to message #1849577] Thu, 27 January 2022 14:48 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

You are welcome. The more we use IEC 61499 the more we find its limitations or where Eclipse 4diac needs to be extended. Enumerations is definitly something that would be great to have. Maybe someone reading this here has time or an idea how to do it.
Re: Constants or enumerated types for Data Input parameters. [message #1849877 is a reply to message #1849569] Mon, 07 February 2022 07:48 Go to previous messageGo to next message
Lik Lik is currently offline Lik LikFriend
Messages: 32
Registered: February 2017
Location: Russia
Member
Alois Zoitl wrote on Wed, 26 January 2022 00:09
Hi Barry,
A not as powerfull but maybe for you still workable solution could be our virtualdns infrastructure. You can define there key value pairs which you can then use as inputs for your fbs.


Literals are now evaluated upon input but does not include VirtualDNS (v.2.0.0 - 2.0.1).

For example, when the variable names from VirtualDNS are used for parameters UDINT of Function Blocks then error:
Invalid UDINT literal. Valid UNSIGNED literals start with a number and can be interrupted multiple times by a single _ character after a number

https://www.eclipse.org/forums/index.php/t/1109232/
Re: Constants or enumerated types for Data Input parameters. [message #1849897 is a reply to message #1849877] Mon, 07 February 2022 18:49 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Lik Lik wrote on Mon, 07 February 2022 07:48

Literals are now evaluated upon input but does not include VirtualDNS (v.2.0.0 - 2.0.1).

For example, when the variable names from VirtualDNS are used for parameters UDINT of Function Blocks then error:
Invalid UDINT literal. Valid UNSIGNED literals start with a number and can be interrupted multiple times by a single _ character after a number

https://www.eclipse.org/forums/index.php/t/1109232/


We are working on it. See Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=578510 for details. wil definitely be fixed for 2.0.2.

But as written above for me virtualDNS is only an intermediate solution for the problem. IEC 61131-3 has better options which I would really like to have in Eclipse 4diac.
Previous Topic:4DIAC Debugging running application
Next Topic:Modbus - Connection reset by peer
Goto Forum:
  


Current Time: Fri Apr 26 22:24:43 GMT 2024

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

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

Back to the top