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 » Array deceleration returns BAD_PARAMS
Array deceleration returns BAD_PARAMS [message #1777740] Mon, 04 December 2017 01:48 Go to next message
Awais Tanveer is currently offline Awais TanveerFriend
Messages: 30
Registered: April 2016
Member
Hello,

I am trying to create a basic function block which takes an input of 64 DWORDs. In the FB interface UI, I am adding an input of DWORD type and setting its "Array Size" to 64. When I try to download it to FORTE, it returns an error with "Reason=BAD_PARAMS" in the resulting XML. Even a two elements size array returns the same error.

How can I set an array of DWORD as an input data?

Any help would be appreciated.
Re: Array deceleration returns BAD_PARAMS [message #1777766 is a reply to message #1777740] Mon, 04 December 2017 12:43 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Hi,

IEC 61499 utilizes the datatypes of IEC 61131-3 for its in and outputs. When you specify parameters in 4diac you need to comply to the IEC 61131-3 rules for literals. For array this means that you have to encapsulate the array values in square brackets. If you have an array of size 64 you can also give less values then the size of the array but not more. So if you give the value [23, 16#AFFE, 34, 16#ABCD] should initialize the first 4 values of your array.

Re: Array deceleration returns BAD_PARAMS [message #1777905 is a reply to message #1777766] Wed, 06 December 2017 00:01 Go to previous messageGo to next message
Awais Tanveer is currently offline Awais TanveerFriend
Messages: 30
Registered: April 2016
Member
Thanks. That helped. One more issue though. On the data out port, If I declare a large array, say of 60 DWORDs, the debugger does not show anything on the interface although I have confirmed that array itself works fine.
Re: Array deceleration returns BAD_PARAMS [message #1777929 is a reply to message #1777905] Wed, 06 December 2017 10:12 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Just to check. Does a smaller array work?
Re: Array deceleration returns BAD_PARAMS [message #1777964 is a reply to message #1777929] Wed, 06 December 2017 22:28 Go to previous messageGo to next message
Awais Tanveer is currently offline Awais TanveerFriend
Messages: 30
Registered: April 2016
Member
Yes, it does. I can see the output of 8 or 16 bytes USINT array but when I try to watch the values of a bigger array, say of 60 DWORDs or UDINTs, the debugger shows N/A, although array works fine internally. I am using 4DIAC 1.8.4 on CentOS. FORTE is running on a separate Raspberry Pi.

[Updated on: Wed, 06 December 2017 22:48]

Report message to a moderator

Re: Array deceleration returns BAD_PARAMS [message #1778031 is a reply to message #1777964] Fri, 08 December 2017 11:29 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

HI, it looks like you found a bug in forte. In this commit [1] tried to push a fix. Could you give it a try and let me know if it solves your issue? thx, alois

[1] http://git.eclipse.org/c/4diac/org.eclipse.4diac.forte.git/commit/?h=develop
Re: Array deceleration returns BAD_PARAMS [message #1778303 is a reply to message #1778031] Tue, 12 December 2017 22:00 Go to previous message
Awais Tanveer is currently offline Awais TanveerFriend
Messages: 30
Registered: April 2016
Member
Thanks. I will try it and let you know.
Previous Topic:Issue with communication between Publisher/Subscriber FBs.
Next Topic:MQTT with Eclipse Paho
Goto Forum:
  


Current Time: Fri Apr 26 17:24:07 GMT 2024

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

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

Back to the top