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

S1ack
4 days ago
1 day ago
  • S1ack

    S1ack - 4 days ago

    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 3.5.16.10
    Target is Wago PFC200 updated to 3.5.16.10

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

     
  • i-campbell

    i-campbell - 2 days ago

    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()

     
    👍
    2
  • nothinrandom

    nothinrandom - 4 days ago

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

     
  • S1ack

    S1ack - 2 days ago

    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 2 days ago
  • i-campbell

    i-campbell - 1 day ago

    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.

     

Log in to post a comment.