GetTextProperty("Project") - What am I doing wrong?

  • S1ack

    S1ack - 2020-07-31

    I wish to display project file name on a web visu.
    Added Project Information to POUs, and enabled the Automatically generate 'Project Information' POUs.

    I call this function from an ST task that is called on the System Event 'StartDone'.

    Yet it returns "AlarmManager" as the text.

    I have searched and found no solution.
    I do not have multiple hits on GetTextProperty i.e. it is not ambiguous so far as I can tell.

    CoDeSys is
    Target is Wago PFC200 updated to

    Any help appreciated. It's got to be my own stupidity.

  • i-campbell

    i-campbell - 2020-08-02

    With shadowing rules, the similarly named function in the AlarmManager library takes precedence.

    To get the POU from your POUs view, prepend __POOL

    So __POOL.GetTextProperty()

  • S1ack

    S1ack - 2020-08-02

    i-campbell: Danke!

    I will have to read up about this.
    CoDeSys help is not very informative about _ _ POOL. There is information on shadowing rules - the search order etc... but nothing that really explains the POU pool syntax you solved my issue with. __POOL


    Last edit: S1ack 2020-08-02
  • i-campbell

    i-campbell - 2020-08-03

    I am not sure if you can read up on it, except here in this thread (at least it is now the third highest ranked link on google for CODESYS __POOL)
    I have passed on the info so it can be documented. I can't wait, this is a really important keyword.

  • nothinrandom

    nothinrandom - 2020-08-01

    @S1ack, I am not familiar with using this method, but I have used a library called "CmpApp". Inside, there are structs to get information for both "APPLICATION_INFO" and "PROJECT_INFO". There's a function called "AppGetProjectInformation" that will allow you to extract this unless I am incorrectly understanding your request.


Log in to post a comment.