I am trying to set the gateway path and device address using Python script.
To set the gateway path I should first have the GUID of the Gateway.
I tried to get the guid using following code.
for dev in proj.get_children():
tmpDevice = dev.get_device_identification()
strGateWay = dev.get_gateway()
However, I am getting GUID value as
Could you please help me in getting the proper GUID value for gateway.
Originally created by: M.Schaber
The empty guid "00000000-0000-0000-0000-000000000000" is set when no gateway is configured for the device yet.
If you manually configure the gateway and network path to the device once (so you can login to the PLC), the gateway guid will be set, and you can print it using your script.
Then you can set it in other projects.
Thanks for the reply.
We want to automate a following scenario and we have script to perform following operations
Is it possible without any manual intervention? I will not like to set the Gateway path manually.
Just configure it manually once, and print out the value. Then use the printed value within your script to configure the other projects non-interactively.
Just another note: Our issue database has the improvement CDS-24285 to enable configuration of gateways by name, gateway management, and to start network scans. However, this issue is not yet scheduled for implementation. If you work for a CODESYS OEM, you can contact our support department so they register your companys name with that issue, that will raise the priority. (If you don't work for an CODESYS OEM, but you bought some hardware which ships with codesys, you can ask your hardware vendor to register their name with CDS-24285.)
Printed the value manually once and used the same guid for setting the Gateway Path.
The Guid is valid for the same installation of codesys, but it will be a different one on a different machine.
Log in to post a comment.