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

documentation in function block

tvm
2020-02-26
2023-12-07
  • tvm - 2020-02-26

    I create a function block in a library, with some comments in the declaration header

    (*==========
    line 1
    line 2
    line 3
    line 4
    ==========*)
    FUNCTION_BLOCK TEST_FB
    VAR
    ......
    

    In Library Manager, when I select this function and go to the "Documentation" tab, I do get the comments, but they're all in one line with no line breaks.
    (========== line 1 line 2 line 3 line 4 ==========)

    I've looked at other compiled libraries, and they have the documentation on separate lines, but I can't see the source.

    How do I insert a line break? This seems like I'm missing something very obvious

     
  • alejho

    alejho - 2020-02-26

    Hi,
    I think you should do something like this:

    (*
    | This is one line.
    | This is another line
    *)
    

    This is a nice online tool to test reStructured text:

    http://rst.ninjs.org/

    Ciao!

     
  • tvm - 2020-02-26

    thanks for the reply, but this does not work

     
  • alejho

    alejho - 2020-02-26

    I think you're missing something...I did a test and it works!

    IMG: CODESYS_forum.png

     
  • i-campbell

    i-campbell - 2020-02-26

    https://help.codesys.com/webapp/checkli ... n=3.5.15.0

    This is the checklist which has a check for "The Property “DocFormat” has been set to the value “reStructuredText”."
    Among other things.

    Then make sure you check POUs, then install to lib repository.

     
  • tvm - 2020-02-28

    I've read through all the help files on reStructuredText, added the property to the library, but nothing seems to make a difference. I wonder if it's something to do with Schneider Machine Expert.
    This guy seemed to have the same problem, https://forge.codesys.com/forge/talk/Engineering/thread/cfdb933870/ but that was last updated in 2013. Machine Expert uses Codesys 3.5.12.80.

     
  • rickj - 2020-02-29

    Try placing a blank line between. Blank line is recognized in reST as a paragraph break.

     
  • tvm - 2020-03-04

    It turns out I had to do a couple things:
    I had added DocFormat: reStructuredText to Project Information/Properties, but I had to remove the library from my project and re-add it before it started generating documentation
    "| " generates a new line, but it needs to have a space after it

     
    👍
    1

    Last edit: tvm 2020-03-04
  • voffi - 2023-12-07

    Using < br > did it for me in CODESYS 3.5.19

    // 2023-12-05   Line 1<br>
    // 2023-12-06   Line 2<br>
    

    shows up in Library Manager with line breaks.

     

    Last edit: voffi 2023-12-07

Log in to post a comment.