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 » FIXED --- Issue with QX and IX function blocks on Raspberry Pi OS(FIXED --- STATUS shows "Waiting for handle...")
FIXED --- Issue with QX and IX function blocks on Raspberry Pi OS [message #1840628] Wed, 21 April 2021 03:38 Go to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
Hi Alois,

Note - this has now been corrected. See the note in the reply below.

I have been experimenting with the IX and QX function blocks on a Raspberry Pi 4 using Raspberry Pi OS. Everything is cross-compiling and running compliant with C++ 11.

However, the IX and QX function blocks refuse to initialise the GPIO ports. In the attachment below you can see that the GPIO is functioning fine and that I have full control over both input and output modes. LED's light when I send them commands and switches return the correct value.

However, the IX and QX blocks never get past the "Waiting for handle..." message when they run their INIT event.

I have given GPIO permissions to the pi user I am running under but even running forte with sudo does not resolve the problem.

The tests shown below were run after I had de-installed the 1-Wire drivers for the DS18B20 temperature sensor, so I am pretty sure that FORTE has the GPIO all to itself.

I only found one example of a similar problem on the forum https://www.eclipse.org/forums/index.php/t/1075982.

Have you seen similar problems before?

Thank you,
Barry

[Updated on: Wed, 21 April 2021 10:54]

Report message to a moderator

Re: Issue with QX and IX function blocks on Raspberry Pi OS [message #1840649 is a reply to message #1840628] Wed, 21 April 2021 10:51 Go to previous messageGo to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
Hi Alois,
My mistake - I had not ticked the box FORTE_MODULE_SysFs in the CMake configuration. Both the IX and QX function blocks are working fine now and the DS18B20 temperature sensor is still reading correctly. FORTE is wonderful !!!!!

That was a most interesting issue since it obviously did not show up in the same way an error in the C++ code or a missing source file would. I now know what that warning "Waiting for handle..." was trying to tell me.

Thank again,
Barry
Re: Issue with QX and IX function blocks on Raspberry Pi OS [message #1840672 is a reply to message #1840649] Wed, 21 April 2021 19:55 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

I find it a bit strange that you didn't get an compile error or deployment error. But I'm happy that your setup is working.

Cheers,
Alois
Re: Issue with QX and IX function blocks on Raspberry Pi OS [message #1840677 is a reply to message #1840672] Wed, 21 April 2021 22:24 Go to previous messageGo to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
Yes, I thought that was interesting Alois.

I am not sure what the FORTE sysfs module does. Maybe it is something that just turns on some sysfs permissions?

I suspect that the QX and IX function blocks do the bulk of the work opening files, reading and writing from the sysfs virtual file system.

Something to look into later but for now, "check your CMake settings again" is a new entry in my development checklist. :)

Cheers,
Barry[
Re: Issue with QX and IX function blocks on Raspberry Pi OS [message #1840691 is a reply to message #1840677] Thu, 22 April 2021 07:15 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Interestingly it is the opposite. the IX QX blocks are very generic and all the code is in the sysfs module. With that you can use IX, QX, ID, ... on different IO systems and just switch the driver.
Re: Issue with QX and IX function blocks on Raspberry Pi OS [message #1840802 is a reply to message #1840691] Sat, 24 April 2021 23:06 Go to previous messageGo to next message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
Thank you clarifying that Alois. I intend to spend more time later understanding sysfs and the Linux driver architectures later. I also need to build myself a rough map of the core FORTE modules. That will help me to understand which modules are responsible for each part of the functionality.
Regards,
Barry
Re: Issue with QX and IX function blocks on Raspberry Pi OS [message #1840983 is a reply to message #1840802] Thu, 29 April 2021 19:36 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Barry, as pointed out here [1] our sysfs driver is maybe not the best reference. But we are happy for any improvements. Generally I would like to move more and more of our drivers to the "new" modular IO architecture as used in the emBrick or Wago K-Bus module. This allows to even more decouple application from IO config. This paper [2] gives an overview on the modular IO architecture of 4diac FORTE. Hope it helps,
Alois

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=541846
[2] https://ieeexplore.ieee.org/abstract/document/8247577
Re: Issue with QX and IX function blocks on Raspberry Pi OS [message #1841571 is a reply to message #1840983] Fri, 21 May 2021 05:46 Go to previous message
Barry Dowdeswell is currently offline Barry DowdeswellFriend
Messages: 49
Registered: November 2018
Member
Thank you Alois - those are great library resources for my post-Doctoral work.
Previous Topic:Struct datatype deploying causing crash
Next Topic:can't export forte boot file in 1.13.1
Goto Forum:
  


Current Time: Sun Apr 28 07:36:58 GMT 2024

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

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

Back to the top