I would like to get some good references covering creating scripts to be executed on a PLC (Specifically a Lenze controller).
I think you misunderstood where the python script is executed. The python script is executed in the CODESYS IDE (PC) and not on the CODESYS Runtime (PLC).
There seems to be some material on the S3 site, but it is all presented as web pages. If it exists, I would like to download the documents as a single file or two.
CODESYS still contains the CHM file of the Scripting API which is generated from the C# code and requires you to translate the syntax to python. You can find it one of the following locations of your installed CODESYS:
- "Online Help\<Language>\ScriptEngine.chm" in newer versions
- "Online Help\ScriptEngine.chm" in older versions
The project I am working on requires the script to force values in the processor, read the resulting logic states and then release the force. Thanks in advance.
Look at the other topics in this sub forum there are some example how to read/write/force variables on a PLC.
Check out the CODESYS store: http://store.codesys.com/CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions