Calling subroutines in Codesys. I have my main program PLC_PRG, with ST to call each subroutine, is this the typical way to call subroutines in codesys logic, what is the text convention or is a FB needed. See attached screenshot.
Also, for main PLC_PRG i added it to task config and set T10ms, is this necessary or can i call each subroutine here and delete PLC_PRG? See screenshot attached
Lastly, in resources tab, PLC Configuration, do i need to add my hardware layout from automation builder here? It wont let me add anything, what is the purpose of this tab.
in order to your question, to add hardware you need to use Automation Builder before start Codesys. Automation Builder is the suite where you can define the modules to add to your project.
Then, when you start Codesys (directly from Automation Builder) you can find the complete list of hardware (e.g. I/O modules ecc.) and the simbolic name that you need in every subroutine or programm
For the ST calling subroutine, follow the instruction in the online help.
For the task time you can use initially the "free wheeling" mode and after refine the task with a specific time.
Hope this help you