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 » Lock up issue with IEC 61499/Forte when running on Linux(Forte hangs when system time is changing in Linux OS)
Lock up issue with IEC 61499/Forte when running on Linux [message #1805905] Sat, 27 April 2019 12:27 Go to next message
Ashok Rabadiya is currently offline Ashok RabadiyaFriend
Messages: 8
Registered: April 2019
Junior Member
We've found an issue with the Forte engine as used in the Linux OS.

If the system date/time is significantly out, trying to correct it causes the Forte to use all remaining CPU processing, ~80% on my project.

We assume it is happening because forte use systems clock instead of monotonic clock, can anyone please confirm and guide me how to set monotonic clock?

Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806337 is a reply to message #1805905] Tue, 07 May 2019 21:18 Go to previous messageGo to next message
Martin Melik-Merkumians is currently offline Martin Melik-MerkumiansFriend
Messages: 73
Registered: March 2016
Member
Hi,

how do you come to the assumption, that FORTE is not using monotonic clock?
Can you provide me the location of the code, where you assue that system time is used instead of monotonic?

Best
Martin
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806341 is a reply to message #1806337] Tue, 07 May 2019 22:09 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
Are you using a very old version of 4diac FORTE?
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806506 is a reply to message #1806337] Fri, 10 May 2019 04:18 Go to previous messageGo to next message
Ashok Rabadiya is currently offline Ashok RabadiyaFriend
Messages: 8
Registered: April 2019
Junior Member
Hi Martin,


I am using 4DAIC FORTE version 1.8.4 - POSIX (Linux).

There are files in directory :FORTE\src\arch\posix\

1. pctimeha.cpp
2. pctimeha.h

AT Line number 44 of pctimeha.cpp file, there is a function "gettimeofday()" used to compare tick time, which indicates that FORTE doesn't use monotonic timer.

Please see attached file.
  • Attachment: pctimeha.cpp
    (Size: 2.09KB, Downloaded 3 times)
  • Attachment: pctimeha.h
    (Size: 1.48KB, Downloaded 5 times)
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806514 is a reply to message #1806506] Fri, 10 May 2019 06:12 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
Hi,

please update to the 4diac FORTE 1.8.4 is now more then 2 years old. Please update to the latest stable release 1.10.2. There not only this bug has fixed, but also several others. Furthermore 1.10.2 uses less memory and is at least 10% faster.

Cheers,
Alois
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806571 is a reply to message #1806514] Fri, 10 May 2019 13:47 Go to previous messageGo to next message
Ashok Rabadiya is currently offline Ashok RabadiyaFriend
Messages: 8
Registered: April 2019
Junior Member
Hi Alois,

I have got forte 1.10.2, but in latest forte some FBs are removed for example iec61331/ F_DINT_TO_BOOL.

Can you say why this is removed? Or is there any new equivalent?
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806572 is a reply to message #1806571] Fri, 10 May 2019 13:51 Go to previous messageGo to next message
Ashok Rabadiya is currently offline Ashok RabadiyaFriend
Messages: 8
Registered: April 2019
Junior Member
No Message Body
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806573 is a reply to message #1806572] Fri, 10 May 2019 13:55 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
The reason is that these FBs where accidentally added to 4diac and are not in IEC 61131-3 standard. Even worse they make little sense. Much better would be if you use a comparison function block (e.g., F_GT) because there you can much better define the threshold when the bool should be true or when it should be false.
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806635 is a reply to message #1806573] Mon, 13 May 2019 04:06 Go to previous messageGo to next message
Ashok Rabadiya is currently offline Ashok RabadiyaFriend
Messages: 8
Registered: April 2019
Junior Member
Thanks Alois for quick reply,
More question, I have designed a large and complex application with 4DAIC 1.8.4 where I have used such FBs (F_DINT_TO_BOOL) and sub-applications to make over-all design simple and readable. When I have tried to export project v1.8.4 into the new 4DAIC v1.10.2 , Sub-Applications are not appearing. Can you please help me for below questions?

1) How to import v1.8.4 project into v1.10.2 if project has sub-applications and absulated FBs?
2) Does v1.10.2 supports sub-application features? if not then is there any equivalent?
3) Should I redesign/rework my project created in v1.8.4 with new 4DAIC ?
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806646 is a reply to message #1806635] Mon, 13 May 2019 07:14 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 866
Registered: January 2014
Senior Member
Hi,

Yes 1.10.2 has subapplications. The problem with importing 1.8.4 is that with 1.9.0 we did a major rework of 4diac IDE internals to better support subapplications. In 1.8.4 subapplication implementation was extremely buggy and hard to maintain. We only saw the option to reimplement subapplication support from scratch. Unfortunately I was not able to fully make this portable across the versions. Options you have is to either save the subapplications as subapp types. and us typed subapps in 1.10.2 or that you flatten all your subapps and import the resulting project into 1.10.2 and recreate there the subapps again.

For the obsolete FBs: you can easily recreate them in 4diac IDE 1.10.2 with composite FBs. This should give you a quick solution.

Regarding your finall question. This is a hard one. I don't know how big and complex your application. Reimplementing has the advantage to reevaluate design decisions (e.g., I'm a bit nervous about the use of the obsolete FBs). In the other hand if your application is very big it may take quite some time. We tried as good as we can that you can transfer your applications at least in parts to 1.10.2. It was a hard decision not beeing able to import pre 1.9.0 subapps. But in the 1.8.4 subapp model not all information is available that we need. Reimplementing that would have taken a tremendous amount of time, which would have taken scarce development resources away.

Please let us know if we can support you in your migration path. Even if it takes some effort I can only say it is worth the effort. 4diac IDE gut much more stable with the rework for 1.9.0. We have implemented many usability improvements making your development live much easier (e.g., deployment now detects existing resources and replaces them, it detects if monitoring is running and handles the situation correctly). Furthermore our official file format is now the IEC 61499-2 XML. Withthat we don't expect such a breaking change in the next 10 years.

Cheers,
Alois
Re: Lock up issue with IEC 61499/Forte when running on Linux [message #1806657 is a reply to message #1806646] Mon, 13 May 2019 12:02 Go to previous message
Ashok Rabadiya is currently offline Ashok RabadiyaFriend
Messages: 8
Registered: April 2019
Junior Member
Thank you Alois,

These inputs will help me a lot.

Regards,
Ashok
Previous Topic:OPC-UA Read and Write OPC-UA variables Example on [Separate Machines]
Next Topic:Lego EV3 set tacho-motor speed
Goto Forum:
  


Current Time: Wed Aug 21 18:13:56 GMT 2019

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

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

Back to the top