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...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2019-08-11
Originally created by: rickj
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
rickj hat geschrieben:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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...
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.
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
MyProject.export.zip [37.54 KiB]
Originally created by: rickj
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
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.