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 Mon Dec 17, 2018 10:26 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Oct 31, 2018 3:27 am 
Offline

Joined: Fri Jun 15, 2018 7:30 am
Posts: 8
Hey Everyone,

So I have been working on some object orientated design recently and have got the structure working pretty well. However when it came time to start displaying some of the variables to the screen I realised that I cant call the objects property (setter/getter) from the visualisation as i get the error message 'obj.Name' is not allowed as an operand of ADR.

I can get around this as from the visualisation I have direct access to the internal variable (sName) however I have concerns with this;
1. My property obj.Name is a get method only so it should be able to be edited aside from within the object, however accessing the variable directly from the visualisation means that this variable could be edited from the visualisation if not careful with the setup.
2. For a lot of my objects I have multiple classes implementing from the same interface and there is often only one of these classes being actively used at any time, so I call an interface variable which contains a reference to the active object. This works well on the coding end, however this interface doesn't contain any internal variables so as such i cant access any properties or variables of this 'active' object.

So my question is, is there a way to access object properties from the visualisation, or some other solution I could use to display values from an interface.


Last edited by michaelADE on Mon Nov 05, 2018 4:00 am, edited 1 time in total.

Top
   
PostPosted: Fri Nov 02, 2018 10:16 am 
Offline

Joined: Thu Aug 30, 2018 8:40 am
Posts: 35
Hello sir,

as far as I understand it you want to activate the property handeling for all element properties.

See https://help.codesys.com/webapp/_cds_dl ... n=3.5.13.0 for more!


Best regards,
Marcel


Top
   
PostPosted: Mon Nov 05, 2018 4:00 am 
Offline

Joined: Fri Jun 15, 2018 7:30 am
Posts: 8
Hey Marcel,

Thankyou so much for your reply, that was exactly what I was looking for.


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


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