Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

create_boot_application()

MKeo
2017-11-28
2017-11-29
  • MKeo - 2017-11-28

    Hello!

    Im trying to create a boot appl. with:

    create_boot_application()

    but every time i get this errormessage:

    NameError: name 'create_boot_application()' ist not defined.

    Could you help me please?

    Thanks and best regards
    MKeo

     
  • mkeller - 2017-11-28

    Hi MKeo.

    MKeo hat geschrieben:
    NameError: name 'create_boot_application()' ist not defined.

    The method is only available on an online application object.

    Here some example code for the active appliction:

    onlineApp = online.create_online_application()
    \# login with download
    onlineApp.login(OnlineChangeOption.Never, True)
    \# create boot application on the PLC
    onlineApp.create_boot_application()
    \# logout
    onlineApp.logout()
    

    BR
    Martin

     
  • MKeo - 2017-11-29

    Thanks!

    There must be an other option to create a boot application, because I have an option to do it manually, where I dont have to be online or to log in.

    Im want to make a boot application from IScriptApplication. There also is a boot application at IScriptOnlineApplication.

    It just asks where I want to save the application, so I dont need to log in.

    My problem is, that I need to create the .app and .crc files. Manually it runs without any problem, but I want to create those two files with a python script.

    BR,
    MKeo

     
  • mkeller - 2017-11-29

    MKeo hat geschrieben:
    There must be an other option to create a boot application, because I have an option to do it manually, where I dont have to be online or to log in.
    Im want to make a boot application from IScriptApplication. There also is a boot application at IScriptOnlineApplication.
    It just asks where I want to save the application, so I dont need to log in.

    Yes, there is. Get the script object for the application you want to create boot applicaiton for and call the method with the path for the application file.

    Here some example code:

    proj = projects.primary
    found = proj.find("Application", True)
    if not found:
    Β  Β raise Exception("Application was not found")
    app = found[0]
    app.create_boot_application(r"c:\temp\myapp.app")
    

    BR
    Martin

     
  • MKeo - 2017-11-29

    Now it works!

    Thank you very much!

     

Log in to post a comment.