Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

property not displayed right after "<Functionblockname>." (ST-Editor)

Rob
2019-08-08
2019-08-23
  • Rob - 2019-08-08

    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...

     
  • alm - 2019-08-09

    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.

     
  • Rob - 2019-08-09

    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

    IMG: Capture.PNG

    MyProject.export.zip [37.54 KiB]

     
  • 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.

     
  • Rob - 2019-08-11

    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

     
  • Maximilian-K - 2019-08-23

    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.

     

Log in to post a comment.