Also, is there a way to move module in device tree up or down, using script?
My devices tree looks like this:
I was trying to run script:
proj = projects.primary
app = proj.active_application
onlineapp = online.create_online_application(app)
dev = proj.find("UR20_FBC_PB_DP", True)
obj = proj.find("UR20_4DO_P", True)
but in response I have error: "This device cannot be added or inserted here"
If the device descriptions allow that movement, and the indices are set correctly, it should work that way. Actually, I did experiment a little bit, and it worked on my side.
Check out the CODESYS store: http://store.codesys.com/CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions