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 Wed Apr 24, 2019 6:53 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Jun 30, 2018 1:07 pm 
Offline

Joined: Fri Mar 10, 2017 4:45 am
Posts: 35
Code:
INTERFACE Interface1_ITF
//contains properties: Prop1, Prop2

INTERFACE Interface2_ITF
//contains properties Prop3, Prop4

FUNCTION BLOCK FB_1 IMPLEMENTS Interface1_ITF

FUNCTION BLOCK FB2 EXTENDS FB1 IMPLEMENTS Interface2_ITF



My question is, when I go online with a project, in FB_2 I will see the properties from the first interface twice
Prop1
Prop2
Prop1
Prop2
Prop3
Prop4

I don't understand why. I should see Prop1 and Prop2 because FB_2 is extending FB_1, and I should see Prop3 and Prop4 because it's implementing Interface2_ITF. Why are Prop1 and Prop2 shown twice?

thanks

Tim


Top
   
PostPosted: Sat Jun 30, 2018 11:37 pm 
Offline

Joined: Fri Mar 10, 2017 4:45 am
Posts: 35
Interesting. It turns out that when you clock "Implement Interfaces" on a function block, it automatically creates all properties, including ones from base function blocks. I assumed that that was how it was supposed to be, but it looks like if you do that, you'll get the issue I was having.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 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