Constants or enumerated types for Data Input parameters. [message #1849553] |
Tue, 25 January 2022 00:48 |
Barry Dowdeswell 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 |
|
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 #1849877 is a reply to message #1849569] |
Mon, 07 February 2022 07:48 |
|
Alois Zoitl wrote on Wed, 26 January 2022 00:09Hi 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03387 seconds