I've tried to implement an EtrigA Interface into my FB. When compiling the message log says
Zitat:
" ------ Ãœbersetzungslauf gestartet: Applikation: Device.BehaviourModelBase_Test -------
Code typisieren ... [FEHLER] XXXXXXXXXXXXXXXXXXXX: FB_Test [Device: SPS-Logik: BehaviourModelBase_Test]: C0087: Keine Implementierung für Methode 'STARTACTION' aus Schnittstelle 'ISTARTACTIONPROVIDER' [FEHLER] XXXXXXXXXXXXXXXXXXXX: FB_Test [Device: SPS-Logik: BehaviourModelBase_Test]: C0087: Keine Implementierung für Methode 'CYCLICACTION' aus Schnittstelle 'ICYCLICACTIONPROVIDER' [FEHLER] XXXXXXXXXXXXXXXXXXXX: FB_Test [Device: SPS-Logik: BehaviourModelBase_Test]: C0087: Keine Implementierung für Methode 'CLEANUPACTION' aus Schnittstelle 'ICLEANUPACTIONPROVIDER' [FEHLER] XXXXXXXXXXXXXXXXXXXX: FB_Test [Device: SPS-Logik: BehaviourModelBase_Test]: C0087: Keine Implementierung für Methode 'RESETACTION' aus Schnittstelle 'IRESETACTIONPROVIDER'
Kompilierung abgeschlossen -- 4 Fehler, 3 Warnungen
After that and some reading in the documentation of CBML I saw that an >Zitat:
EXTENDS CBML.ETrigA
creates the missing Methods. edited But in a very extended manner.
Is there any chance to get a running compact ETrigA FB with a Statemachine configured right for the needs of this program? I'm missing here some example programs.
thank you for your advice and best regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just recreated a sample project with a plain FB and extended the FB CBML.ETrigA and it "basically" worked, only Codesys was a little bit buggy when adding the empty method and property definitions. It automatically added nearly everything, on some properties / methods it could not find the identifiers of the names and I had to put the namespace manualy so it could recognise the identifier.
What Version of Codesys are you using? I use version SP11... Maybe you have a older version with more bugs in it relating the interface implementation?
What do you mean by "extended matter"?
I attached you my plain sample version...
I was surprised when I extended an FB that it automatically injects comments and pragmas into the method / property stubs, how is this possible to achieve? Would be very interesting for us because there is no abstract keyword, and if I want some one to be forces to override something I could at least "inject" this pragmas when someone wants to extend an FB?
Thanks for the answers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
schaepper hat geschrieben:
I just recreated a sample project with a plain FB and extended the FB CBML.ETrigA and it "basically" worked, only Codesys was a little bit buggy when adding the empty method and property definitions. It automatically added nearly everything, on some properties / methods it could not find the identifiers of the names and I had to put the namespace manualy so it could recognise the identifier.
Thank you, I'll try it this these days.
schaepper hat geschrieben:
What Version of Codesys are you using? I use version SP11... Maybe you have a older version with more bugs in it relating the interface implementation?
What do you mean by "extended matter"?
I use V3 SP11.
It was not my intention to overwrite all the methods of the model. When one achieves the right actions with their IOs I think there is no need to edit the model.
And adding and configuring the timing behaviour is not well documented. That is what an example with a simple traffic signal could show...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I agree with you, documentation is a large issue. And in the internet you find nothing, this is a big thing which annoys me about the whole language IEC 61131-3 an all the vendors.
I was playing around because to me it was interesting that the IDE is getting the comments and pragmas so I found something (maybe for you).
I made an FunctionBlockBase, a FunctionBlock and a Interface. So: Now FunctionBlockBase implements the Interface and its only method. Well now, the IDE adds this:
{error 'add method implementation or delete method to use base implementation'} if you use this FB as a base FB in a new derived FB.
So you should be able to just delete this comment in your derived class and it should work, except the ones that are suposed to be overwritten. But I have no clue how to reflect that in this language because its missing the abstract keyword in the language itself...
Would be nice if I could manually trigger the adding of pragmas to a baseclass do somehow "simulate" the abstract keyword because then someone that derives from the classes could be told to override it. So for the moment I think I will "cover" all the methods I want to be overwritten with an interface...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've tried to implement an EtrigA Interface into my FB. When compiling the message log says
After that and some reading in the documentation of CBML I saw that an >Zitat:
EXTENDS CBML.ETrigA
creates the missing Methods. edited But in a very extended manner.
Is there any chance to get a running compact ETrigA FB with a Statemachine configured right for the needs of this program? I'm missing here some example programs.
thank you for your advice and best regards
Hello
I just recreated a sample project with a plain FB and extended the FB CBML.ETrigA and it "basically" worked, only Codesys was a little bit buggy when adding the empty method and property definitions. It automatically added nearly everything, on some properties / methods it could not find the identifiers of the names and I had to put the namespace manualy so it could recognise the identifier.
What Version of Codesys are you using? I use version SP11... Maybe you have a older version with more bugs in it relating the interface implementation?
What do you mean by "extended matter"?
I attached you my plain sample version...
Sample.project [122.94 KiB]
By the way:
I was surprised when I extended an FB that it automatically injects comments and pragmas into the method / property stubs, how is this possible to achieve? Would be very interesting for us because there is no abstract keyword, and if I want some one to be forces to override something I could at least "inject" this pragmas when someone wants to extend an FB?
Thanks for the answers.
Thank you, I'll try it this these days.
I use V3 SP11.
It was not my intention to overwrite all the methods of the model. When one achieves the right actions with their IOs I think there is no need to edit the model.
And adding and configuring the timing behaviour is not well documented. That is what an example with a simple traffic signal could show...
I agree with you, documentation is a large issue. And in the internet you find nothing, this is a big thing which annoys me about the whole language IEC 61131-3 an all the vendors.
I was playing around because to me it was interesting that the IDE is getting the comments and pragmas so I found something (maybe for you).
I made an FunctionBlockBase, a FunctionBlock and a Interface. So: Now FunctionBlockBase implements the Interface and its only method. Well now, the IDE adds this:
{error 'add method implementation or delete method to use base implementation'} if you use this FB as a base FB in a new derived FB.
So you should be able to just delete this comment in your derived class and it should work, except the ones that are suposed to be overwritten. But I have no clue how to reflect that in this language because its missing the abstract keyword in the language itself...
Would be nice if I could manually trigger the adding of pragmas to a baseclass do somehow "simulate" the abstract keyword because then someone that derives from the classes could be told to override it. So for the moment I think I will "cover" all the methods I want to be overwritten with an interface...