Thanks a lot for this video. Really interesting! It's possible to write some lines on the new POU? And it's possible to open a POU that exists to write new lines?
Thank you. This is interesting informative content. Can you tell me, did you add the ipt scripts based on codesys documentation or can they be downloaded?
Thanks .. 🤝 Stubs comes when we install the Codesys so all scripting details is there in stubs folder… We can refer also documentation of Codesys Scripting … Rest all code we need to write for our use cases … that is where I am trying to cover basics first so anyone can start …Codesys has provided some of the examples
Great video, thank you for sharing this tutorial, it helped me a lot. I have a question: I want to use some functionality that is contained in other classes, such as ScriptIIecLanguageObjectContainer.pyi. what I cannot figure out is is this library is instantiated in the codesys interpreter anywhere, or what its name is. or for instance, how to add a library to a project. librarymanager.add_library() does not work because the scriptlibmanobject class does not exist inside the librarymanager instantiation in Codesys. Their documentation is not clear on this subject
@seanpeterson4673 here you go/ www.shaswatraj.com/post/unveiling-the-power-of-codesys-scripting-automating-project-creation-device-addition-and-program
Great tutorial, thank you for sharing your knowledge. Codesys is supposed to support IronPython, but in Vs Code I can see you are using Python 3.12, so is this IronPython or CPython?
Thank for your kind words ... Yes this scripting part was untouched for many developers so thought to share how they can start and will providing all the different options and then going in advance level... So Codesys is using IronPython interpreter and they need to be compatible with .Netframework ... i am using python 3.12 to write the script part using stubs they have provided....
I am trying to create about 400 CAN devices in my project. 100 per PLC. When running the script, codesys hangs for 30 minutes. It will be interesting to see in one of your next videos how to add a large number of modules to different PLCs in the project.
Is it possible to do global refactoring of variables using scripts? For example, reading global lists of variables and changing them throughout the project.
rookie error here, when trying to replicate your video i cant create any files or folders inside the sub, it prompts me with no permission although i am an admin on this machine
No worries it can be some issue with Admin rights … try by running vs code as admin it may allow then. You can copy the stub folder outside and then create project there … it is needed only for reference …
Thanks a lot for this video. Really interesting! It's possible to write some lines on the new POU? And it's possible to open a POU that exists to write new lines?
Thanks if it helped ….
Yes , it’s possible too …
Creating new POU/DUT , updating POU/DUT etc…
Thank you. This is interesting informative content. Can you tell me, did you add the ipt scripts based on codesys documentation or can they be downloaded?
Thanks .. 🤝
Stubs comes when we install the Codesys so all scripting details is there in stubs folder…
We can refer also documentation of Codesys Scripting …
Rest all code we need to write for our use cases … that is where I am trying to cover basics first so anyone can start …Codesys has provided some of the examples
@@jugaadtech12 Thank you.! Found them.
Great video, thank you for sharing this tutorial, it helped me a lot. I have a question:
I want to use some functionality that is contained in other classes, such as ScriptIIecLanguageObjectContainer.pyi. what I cannot figure out is is this library is instantiated in the codesys interpreter anywhere, or what its name is.
or for instance, how to add a library to a project. librarymanager.add_library() does not work because the scriptlibmanobject class does not exist inside the librarymanager instantiation in Codesys.
Their documentation is not clear on this subject
Thanks ✌️
Codesys by default provide objects to do this …
If get correctly your question you want to add Library into project through scripting ?
@@jugaadtech12 yes that is correct, but I am struggling with the syntax
Ok will check and let you know how you can achieve
@@jugaadtech12 thank you so much!
@seanpeterson4673 here you go/
www.shaswatraj.com/post/unveiling-the-power-of-codesys-scripting-automating-project-creation-device-addition-and-program
Great tutorial, thank you for sharing your knowledge. Codesys is supposed to support IronPython, but in Vs Code I can see you are using Python 3.12, so is this IronPython or CPython?
Thank for your kind words ... Yes this scripting part was untouched for many developers so thought to share how they can start and will providing all the different options and then going in advance level...
So Codesys is using IronPython interpreter and they need to be compatible with .Netframework ... i am using python 3.12 to write the script part using stubs they have provided....
@@jugaadtech12 ok, that means I don’t need to download IronPython and use it in my VS Code?
Yes , in vs code we can use the stubs and no need for Ironpython
I am trying to create about 400 CAN devices in my project. 100 per PLC. When running the script, codesys hangs for 30 minutes. It will be interesting to see in one of your next videos how to add a large number of modules to different PLCs in the project.
Interesting.. it should work
Codesys Tutorial : Codesys Scripting using Command Line Part 2
ua-cam.com/video/Ms7euiQXSvw/v-deo.html
Check this out …
Is it possible to do global refactoring of variables using scripts? For example, reading global lists of variables and changing them throughout the project.
I think it can be done using find and replace option …
rookie error here, when trying to replicate your video i cant create any files or folders inside the sub, it prompts me with no permission although i am an admin on this machine
No worries it can be some issue with Admin rights … try by running vs code as admin it may allow then.
You can copy the stub folder outside and then create project there … it is needed only for reference …