We have some examples in the CODESYS Online Help. Search for "Executing Scripts".
The Scripting API is documented in the ScriptEngine.chm in the sub directory OnlineHelp of the CODESYS installation. Search for "Tips for Python Programmers regarding .NET API Documentation" to find some help how to read the Scripting API documentation.
For These, I'd like to ask, the codesys do has a main Task, how does python work in the LOOP. Can it work in the main Task, so that one can Change the variables in real time? Or it can work in multi-thread. Are there any systematic Tutorien in the Forum or Webinar?
The scripts are executed in the main thread of CODESYS. The methods, which require the message loop to be processed, take care of that themselves.
Check out the CODESYS store: http://store.codesys.com/CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions