CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

property not displayed right after "<Functionblockname>." (ST-Editor)
https://forum.codesys.com/viewtopic.php?f=11&t=9927
Page 1 of 1

Author:  Rob [ Thu Aug 08, 2019 5:53 pm ]
Post subject:  property not displayed right after "<Functionblockname>." (ST-Editor)

Hi,
I'm a very newbie to Codesys and ST-Programming.
I have an issue with a property... A property name is not being displayed in a dropdown list menu right after typing a point. But indeed I can type it manually in the Codesys ST-Editor and after compiling it, no errors related are displayed...I went all over the properties Windows of the property and its "set" and "get" to check for possible wrong compiling settings but nothing.
The affected Function Block implements and interface, if that is relevant. Another second function block with a similar code implementation also implements the same interface (same definition of methods and properties). But in this case, the property is correctly displayed...
I can't figure out what's wrong...

Author:  alm [ Fri Aug 09, 2019 7:08 am ]
Post subject:  Re: property not displayed right after "<Functionblockname>." (ST-Editor)

Can you show us your code?
If it's not visible but you can still use it, then there are many reasons for it.
One reason is that the property has the attribute 'Visible' set to false.
Is the FB with the property inside of your current project or is it from another library?
Try to reload the library.

Author:  Rob [ Fri Aug 09, 2019 8:50 am ]
Post subject:  Re: property not displayed right after "<Functionblockname>." (ST-Editor)

Hi alm,
yes I can. It is a project I am doing for self-learning purposes (I don't work as PLC-Programmer, I did it last time for 10 years already. Now I am getting back to it in order to learn some concepts about OOP). It is based on this online course: https://www.udemy.com/plc-object-orient ... strucutre/

I have also included a screenshot to show the property (yellow marked). The property's function block was created by myself, I'm not using third parties libraries in this project.
For the second fb (FTR_InputScaler) the property p_InputAnalogSignal is displaying in the menus as expected. The troubled actual property p_InputAnalogSignal is that of the fb FTR_OutputScaler (marked in yellow)

By the way, after a long search on google and amazon, couldn't find books or other resources on OOP targeted to ST. In this project is my first time to both OOP and ST. I would be glad to hear, if someone knows of a good book covering these topics.

Best regards and thanks for the help,
Rob

Author:  rickj [ Sun Aug 11, 2019 1:11 am ]
Post subject:  Re: property not displayed right after "<Functionblockname>." (ST-Editor)

Sometimes the ide isn't immediately triggered to add a new item. It's been my experience that such items usually show up after awhile. Presumably some other action on my part provides the trigger. You can try doing a Clean and Rebuild/Build. If that fails, try closing and then reopening the project.

Author:  Rob [ Sun Aug 11, 2019 12:51 pm ]
Post subject:  Re: property not displayed right after "<Functionblockname>." (ST-Editor)

rickj wrote:
Sometimes the ide isn't immediately triggered to add a new item. It's been my experience that such items usually show up after awhile. Presumably some other action on my part provides the trigger. You can try doing a Clean and Rebuild/Build. If that fails, try closing and then reopening the project.


Thanks for the tip, I’ll do the Clean and Build/Rebuild and see what happens :wink:

Author:  Maximilian_K [ Fri Aug 23, 2019 10:22 pm ]
Post subject:  Re: property not displayed right after "<Functionblockname>." (ST-Editor)

Rob,

Gary Pratt has some good articles and videos on using OOIP (object oriented industrial programming) in Codesys.

Here is the first of his articles (it is a 3 part series) : https://www.controleng.com/articles/lev ... ogramming/

He has some videos on youtube and his website as well.

Otherwise, any general OOP book will be useful, though they will mostly be for Java or C++. I started with Object Oriented Thought Process by Matt Weisfeld and found it pretty helpful.

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/