0

I am currently using Wago’s e!cockpit environment to write my plc project in ST. I know that for Python, C++ there are programs for docstring for easier and cleaner documentation. I wondered if there is such a thing for structured text? Or even in Wago’s e!cockpit?

I have not found such a feature yet, only for more common programming languages.

Roald
  • 2,459
  • 16
  • 43
  • For TwinCAT you can use [reStructedText](https://infosys.beckhoff.com/content/1033/tc3_plc_intro/4189451147.html?id=4782046637813269296). For Wago's e!cockpit I don't know. – Roald Mar 13 '23 at 14:35

1 Answers1

0

I don't know Wago in depth, but I do know that the new ones with e!COCKPIT are based on Codesys 3.5, if this is your case:

It is possible to include comments for use within the IDE and there is a standardized form of documentation that you can find here (I never used it to generate documentation, only as comments).

Codesys 3.5 - Library Documentation

Codesys 3.5 - Library Documentation - Formatting Commands (Overview)

In a very simple way, inserting comments as in the example below will already provide help while programming in the IDE, this works with any declaration, in function blocks or in Variable List (VAR):

//This is a FunctionBlock
//Bla bla bla
FUNCTION_BLOCK FB_Test
VAR_INPUT
    MyInput1 : BOOL;  //This is a boolean input (TRUE or FALSE) 
    MyInput2 : INT;   //my grandma asked me to add this input
    MyInput3 : LREAL; //more bla bla bla
END_VAR
VAR_OUTPUT
    MyOutput1 : BOOL; //brrrrrrrr
    MyOutput2 : BOOL; //more bla x 486739^2
END_VAR
VAR
END_VAR

enter image description here

enter image description here

dwpessoa
  • 440
  • 4
  • 15