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 » ECC algorithm and deploy(BFB application)
ECC algorithm and deploy [message #1798510] Tue, 20 November 2018 04:54 Go to next message
Horer Chien is currently offline Horer ChienFriend
Messages: 5
Registered: November 2018
Junior Member
Hello,

Recently, facing two issues:

1. When ECC in the BFB in the project is modified, before deploying the modified project, is there any necessity to modify the RTE accordingly?

e.g.
I have project A. Within project A, there is BFB A, and within BFB A, there is ECC A. I deploy this project A into RTE A.
However, if I modify this ECC A to become a new ECC called ECC B, therefore I have BFB B and project B, do I need to have RTE B accordingly to be able to successfully deploy or I can still use RTE A.

2. In 4DIAC IDE, how to create a SPI FB? Should I use IX/QX FBs or others? How to set up PARAMS for it? I used IW/QW to activate the I2C function, but for SPI, no idea how to do it...

Please help!
Re: ECC algorithm and deploy [message #1798577 is a reply to message #1798510] Tue, 20 November 2018 15:36 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 73
Registered: March 2016
Member
Hi,

ad 1: First Question: Yes, you have to re-export the BFB if you use pre-compiled FBs. If you activate the LUA support you can load additional types at runtime.
Second Question: This scenario is a problem, as FORTE does not have any notion of FB versions, it identifies FBs only via its name. So if you have two versions of a BFB, you also need two versions of FORTE, which would not be aware of the fact, that they support an FB with the same name, but a different implementation.

Ad 2: Do you mean, that you need help to implement an SPI process interface, as I didn't see one in the FORTE sources?

Best regards,
Martin
Re: ECC algorithm and deploy [message #1798598 is a reply to message #1798577] Tue, 20 November 2018 20:46 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
Hi,
Currently when you develop your own FBs and every time you change them you have to regenerate the C++ code for it and rebuild 4diac FORTE. We know that this is not a good situation. There is a prototype available in 4diac IDE as well as 4diac FORTE where the FB type information is dynamically loaded during the deployment phase. We utilize Lua for that. However, I think there is not much documentation available and also more tests are needed. We would be happy for any support to improve the situation here (i.e., more tests, bug reports, and fixes).

Regarding your second problem. I would not create an SPI FB. Depending on your needs we currently propose mainly to use the IX/IW/ID as well as there output pendants for interacting with IOs. Especially for more flexible systems we started a new approach where each device would have a dedicated IO configuration resource where FBs are used to describe the IO modules and symbolic names are assigned to the IO points. In your IO FBs you then just use this symbolic names. Again there is not much documentation available. The embrick module implements this approach and can serve as reference.

BR,
Alois
Re: ECC algorithm and deploy [message #1798628 is a reply to message #1798598] Wed, 21 November 2018 11:02 Go to previous messageGo to next message
Horer Chien is currently offline Horer ChienFriend
Messages: 5
Registered: November 2018
Junior Member
Hello, Dr. Zoitl,

We will use Lua to try to realize our needs. We will keep you updated.
Regarding your suggestion of performing SPI function by applying IX / IW / ID FBs, would you please further advise how it should work?
We have successfully enabled I2C function by using IW / QW FBs, but no clues why the SPI is not there.

Thank you,
Re: ECC algorithm and deploy [message #1798631 is a reply to message #1798628] Wed, 21 November 2018 12:08 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
4diac IDE already automatically generates the Lua code. You need to enable dynamic type loading in your 4diac FORTE build and utilize the dynamic type load device profile.

We currently have first support for SPI in the Conmeleon module. However this is still utilizing the old setup. But it could serve as a starting point for you.
Re: ECC algorithm and deploy [message #1798649 is a reply to message #1798631] Thu, 22 November 2018 03:34 Go to previous messageGo to next message
Horer Chien is currently offline Horer ChienFriend
Messages: 5
Registered: November 2018
Junior Member
Thank you, Dr. Zoitl!

For dynamic type loading, would you mind sharing with us where we could find the reference exercises for raspberry Pi if there is any?

As seen from the attached pic of Pjt_2, this is how we realized I2C.
But no any clues about how to set FBs, IX, QX, and so on, to get SPI work...

Please kindly advise...
Thank you in advance!
  • Attachment: Pjt_2.jpg
    (Size: 176.33KB, Downloaded 45 times)
  • Attachment: SPI.JPG
    (Size: 15.33KB, Downloaded 46 times)

[Updated on: Thu, 22 November 2018 03:40]

Report message to a moderator

Re: ECC algorithm and deploy [message #1798717 is a reply to message #1798649] Fri, 23 November 2018 08:42 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
Unfortunately we don't have any examples or excercises on the dynamic type loading yet.

For the combined SPI/I2C case. You would need to develop your own process interface class. In this class you would then parse the PARAMS input and decide if you should attach to SPI or I2C or something else. Currently you are free to define your own PARAMS format.
This would be for the old case of IO interface.

In the new one you would write configuration FBs consisting of Master FBs (one for SPI, one for I2C) and connect to this one representative FBs for the IO devices connected on the two busses. The device representatives would hold any configuration data needed for your device. Furthermore you can configure symbolic names for your Ios. In the IX QX FBs you would then use these symbolic names.
Re: ECC algorithm and deploy [message #1798893 is a reply to message #1798717] Tue, 27 November 2018 05:18 Go to previous messageGo to next message
Horer Chien is currently offline Horer ChienFriend
Messages: 5
Registered: November 2018
Junior Member
Hello, Dr. Zoitl,

Thank you for the information!
For LUA, any advice for compilation?
eg:

-DFORTE_USE_LUATYPE=????
-DPKG_CONFIG_EXECUTABLE=????
-DFORTE_USE_64BIT_DATATYPE=????
-DFORTE_USE_LREAL_DATATYPE=????
-DFORTE_USE_REAL_DATATYPE=????
-DFORTE_USE_WSTRING_DATATYPE=????

Thank you very much in advance!
Re: ECC algorithm and deploy [message #1798919 is a reply to message #1798893] Tue, 27 November 2018 12:32 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
Hi,

For starting I would always recommend using CMake Gui. There you see allready default values for all these options. And for some you even get a selection box (e.g., FORTE_USE_LUATYPE). For the FORTE_USE_LUATYPE we mostly experimented with the Jit version.

The other FORTE options you mention are in the advanced sections. These are set with good default values. You almost never need to tweak them. The only reason when you are building for very small devices with very little memory. And with small we mean below 500k Flash and below 256k of RAM.

Cheers,
Alois
Re: ECC algorithm and deploy [message #1799558 is a reply to message #1798919] Mon, 10 December 2018 09:38 Go to previous messageGo to next message
Horer Chien is currently offline Horer ChienFriend
Messages: 5
Registered: November 2018
Junior Member
Hello, Dr. Zoitl,

We have been working on realizing dynamic loaded FB.
There is an issue which we would like to discuss with you that we are given error messages for this approach.
We use Raspberry PI as platform with Lua 5.3, and after "make -j4", there are always issues resulted from the attached posix.txt.
Any suggestion or comment for us?
Thank you very much in advance!
  • Attachment: setup_posix.sh
    (Size: 1.89KB, Downloaded 22 times)
  • Attachment: posix.txt
    (Size: 56.09KB, Downloaded 26 times)
Re: ECC algorithm and deploy [message #1799930 is a reply to message #1798510] Mon, 17 December 2018 15:27 Go to previous message
Martin Jobst is currently offline Martin JobstFriend
Messages: 1
Registered: December 2018
Junior Member
Hi,

based on your logs, I was able to trace the issue back to several incompatible changes in the Lua API from version 5.1 to 5.2 and above. This is now causing the compilation problems you are encountering.

I have already submitted a fix that has been merged for the next release 1.10.1, which should be out soon. The fix has been tested with both Lua 5.3 and LuaJIT 2.0.5-1 (5.1 API).

In the meantime, using either Lua 5.1 or LuaJIT (with the Lua 5.1 API) should avoid the issue and serve as a workaround.

Best regards,
Martin

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=542851
Previous Topic:Error during testating of function block
Next Topic:Docker alpine Image - Forte & OPC UA - compiling errrors
Goto Forum:
  


Current Time: Thu Aug 22 00:29:19 GMT 2019

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

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

Back to the top