Hello all, there is my problem.
i have a project on a PC A who work properly, I aim to take this project and place it on a Pc B with a blank Codesys installed.
All seemd to work, the project is created on the PC B, i create my with with online.create_online_application(project.project.active_application) recover my onlineDevice and try onlinedevice.connect() so that i can use create_live_user_management() but then a problem occure on my connect() saying gateway not configured properly.
I have setted my set_credentials_for_initial_user().
when i use the Ui, there is absolutely no problem.
an other question, is it possible to use the Start and Stop PLC of codesys Control Systray directly in my python script? So that if it detect that it's stopped, then he automatically start it?
Last edit: monteta 2025-09-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Problem solved, Once the perform_network_scan() is done, y just had to recover the address and using set_gateway_and_address().
Now i'm looking how to deploy all my device's applications on the PLC, I guess it will looks like :
for app in allapplication:
with online.create_online_application(app) as onlineapp
onlinedevice = onlineapp.get_online_device()
online.set_default_credentials(x,y)
try:
onlineapp.login(OnlineChangeOption.Keep, False)
except Exception as e:
msg = str(e).lower()
if "rescan" in msg :
print("PLC service might be off")
elif "targetdo" in msg:
print("Bad credentials")
else
print(msg)
else:
onlineapp.create_boot_application()
Last edit: monteta 2025-09-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all, there is my problem.
i have a project on a PC A who work properly, I aim to take this project and place it on a Pc B with a blank Codesys installed.
All seemd to work, the project is created on the PC B, i create my with with online.create_online_application(project.project.active_application) recover my onlineDevice and try onlinedevice.connect() so that i can use create_live_user_management() but then a problem occure on my connect() saying gateway not configured properly.
I have setted my set_credentials_for_initial_user().
when i use the Ui, there is absolutely no problem.
an other question, is it possible to use the Start and Stop PLC of codesys Control Systray directly in my python script? So that if it detect that it's stopped, then he automatically start it?
Last edit: monteta 2025-09-25
Problem solved, Once the perform_network_scan() is done, y just had to recover the address and using set_gateway_and_address().
Now i'm looking how to deploy all my device's applications on the PLC, I guess it will looks like :
Last edit: monteta 2025-09-29