CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Tue Oct 15, 2019 2:27 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Sep 02, 2013 6:44 am 
Offline

Joined: Wed Aug 28, 2013 9:02 am
Posts: 4
Hallo Leute,

Wir setzen seit einiger Zeit auf das Produktspektrum von Beckhoff (TC2 und jetzt TC3) und sind jetzt auf die neue 64Bit Variante von Twincat 3.1 umgestiegen. Um hier auch alle Möglichkeiten des Sprachumfangs auszunutzen haben wir uns ein Basissystem aus einigen Librarys mit OOP Ansatz gebaut und dieses wird jetzt in einer ersten Maschine eingesetzt.

Das Problem ist folgendes: Wir haben eine Art Achsenlibrary gebaut mit der wir dem Programmierer ein einheitliches Interface auf eine motorische Achse geben wollen. Er soll sich nicht mehr darum kümmern müssen ob im Hintergrund ein Rexroth Antrieb oder ein Schrittmotor fährt, sondern greift nur über dieses Interface auf die Methoden zu und lässt die Achse fahren.

Unser erster umgesetzter Motor ist von Bosch Rexroth. Dh. es gibt nun die Mutterklasse mit dem Standardinterface auf die Achse und über ein Hardwareinterface wird nun der Motor dazugeladen. Darunter sind wiederum einige Funktionen (Zugriff auf Kommandos, usw...) in Klassen abgebilded.

Um diesen Aufbau auch sauber zu trennen haben wir das alles mit Interfaces abstrahiert...

Achsenobjekt
-- Hardwareinterface => Rexroth Motor
----CommandoInterface => Commando Absolutmaß setzen
----CommandoInterface => Commando Fehlerreset
----... uvm ...

Je mehr wir solche Interfaces verschalteln umso länger hat der Compiler (von Beckhoff, Codesys?) gebraucht um die Applikation zu bauen. Wenn ich diese Auftrennung mit den Interfaces rausnehme und die Objekte unterhalb des Achsenobjekts direkt instanziere dann baut der Compiler schnell. Im Fall der Interfaces braucht er gut um 5 Minuten länger..

Funktionieren tun beide Versionen jedoch dauert die eine halt ewig zum Bauen. Der Compiler hängt da immer im Schritt "generate relocations ..." fest.

Wie ist dies bei Beckhoff eigentlich gelöst? Kommt der Compiler von Beckhoff oder von Codesys? Wie genau kann man sich diesen Aufbau vorstellen? Kann man sich bei dem Compiler irgendwie detailiertere Angaben ausgeben lassen (so wie bei den C-Compilern o.ä.?)

Mfg & jetzt schon mal danke für die Antworten

Matthias


Top
   
PostPosted: Thu Sep 05, 2013 12:59 pm 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 986
machen sie bitte diesen text in english und bin mir sicher das du ein antwort aus holland bekomst von timvH

_________________
shooter@home.nl
computer shooter
paul deelen
jacob van wassenaerstraat 29
NL 5224 GG 's-Hertogenbosch
skype shooter paul.deelen
phone +31736139136


Top
   
PostPosted: Mon Sep 09, 2013 6:52 am 
Offline

Joined: Wed Aug 28, 2013 9:02 am
Posts: 4
Hi guys,
i got a tip to translate my posting in english, maybe then i get more answers for my problem...

We have worked a lot with the beckhoff system twincat 2 and now we are currently changing to the new version twincat 3.1 with 64 Bit support. We want to use the new possibilities of object oriented programming and so our new base system, which contains many libs for actuators and axis will be made with the new language options.

But we have a little problem... We have an axis library, which will give the application engineer an standardized interface to all kinds of axes. He doesn't have to know if there is a Rexroth Servo drive behind the interface or a Simotion drive, he only has the standard methods to control the axis.

Our first drive we will support, is from Bosch Rexroth. This means there is a mother object with a standard interface to the axis and in this mother object we will add a hardware interface for the drive. behind the hardware class there are many other classes for all the commandos and other functions of the drive.

We also wanted to abstract all classes we have made with interfaces to get better automated testing conditions of our objects. Here is a sample object:

axis-object
-- hardware interface => Rexroth Drive
---- commando interface => set absolute position
---- commando interface => reset class 1 diagnostics
---- ... and many more ...

But the problem now is, the more interfaces we include in the hardware interface, the longer does the compiler need to build the application. The current build time is about 8 minutes on a Intel core i7 and 5 minutes on a Intel Xenon processor. If i remove the interfaces and have all objects directly instanced in the hardware object i have no problem and the build time is short as usuall. Both versions which are build out of the compiler are working...

The compiler hangs at the step "generate relocations ..." (for this 8 minutes)...

So whats the problem? Who is making the compiler, Codesys or Beckhoff? Who is making the target and the interpreter, Codesys or Beckhoff? Can i get more informations out of the compiler so that i can see where he is working for this long time? I know some tricks in C, where i can parameterize the compile as i like, are there any possibilities with the codesys compiler?

So i hope you guys understand my "beginner" english...

Best Regards

Matthias


Top
   
PostPosted: Mon Sep 09, 2013 7:55 am 
Offline
Frequent User
Frequent User
User avatar

Joined: Tue Jun 06, 2006 9:03 am
Posts: 409
I am not sure, but my guess is that it is Beckhoff related.
Over the last couple of years, the compile time of CODESYS applications has improved significantly. I have worked with many customers on applications, but up to now I have never seen compile times of 8 minutes.

"generate relocations" is also not a familiar term. This also seems Beckhoff specific.

I think you should contact Beckhoff to get the details of their compiler.


Top
   
PostPosted: Mon Sep 09, 2013 9:01 am 
Offline

Joined: Wed Aug 28, 2013 9:02 am
Posts: 4
Hi,

thank you for your answer. Today i got an answer of Beckhoff... They are currently testing a new version (TC 3.1.4011 Beta) with a new Codesys Compiler and there it seems that my problem is solved...

I got this version for testing purposes and what i have seen is that the code size of the axis library is a tenth of the one with the old compiler. Also the compile time is now normal with 2 seconds...

So it seems that they have fixed the problems with the interfaces...

But what i wanted to know is, if i can parameterize the compiler so that i can get more output... Maybe i can see if i have a specific problem in one of my objects!?

Matthias


Top
   
PostPosted: Mon Sep 09, 2013 9:14 am 
Offline
Frequent User
Frequent User
User avatar

Joined: Tue Jun 06, 2006 9:03 am
Posts: 409
See the following topic which hopefully answers your question sufficiently. Please ask Beckhoff if they also support static analysis in TwinCAT 3.
http://forum.codesys.com/viewtopic.php?f=11&t=5384


Top
   
PostPosted: Mon Sep 09, 2013 10:16 am 
Offline

Joined: Wed Aug 28, 2013 9:02 am
Posts: 4
Thanks for this Entry... it helped :-)...

I'm asking Beckhoff about such an analyzing tool... maybe they have one!

Thanks for all your help...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited