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

Issues with create_boot_project

Anonymous
2019-08-02
2019-08-08
  • Anonymous - 2019-08-02

    Originally created by: KP_Henrob

    Hello all,
    I'm having an issue where when using create_boot_project in a python script my link to file images will not be exported to the PLCLogic folder. Regardless of whether I put them in there or not before transferring them to my plc they will not show up on the screen where they're supposed to. It works fine when I click the Create boot application button in codesys, however. Here is the code I'm running.

    from __future__ import print_function
    if projects.primary:
    Β  Β projects.primary.close()
    proj= projects.open(r"..\..\Display\HMI.project")
    app = proj.active_application
    app.clean()
    app.build()
    app.create_boot_application('Application.app', False, True)
    system.delay(1000)
    proj.close()
    

    I tried making it an online application first, however that brings up the file select dialog that I don't want to appear. It also results in the same issue with the images regardless. The second Boolean option in create_boot_project is supposed to write all the visu files, but it is only doing a few of them.

    Any ideas are greatly appreciated. Thank you

    Version: 3.4.12.0

     
  • mkeller - 2019-08-06

    Hi KP_Henrob.

    KP_Henrob hat geschrieben:
    Version: 3.4.12.0

    The method create_boot_application() with three parameters was introduced with V3.5 SP3 Patch 10 so your version number does not fit your code. Can you check your version number?

    BR
    Martin

     
  • Anonymous - 2019-08-06

    Originally created by: KP_Henrob

    M.Keller,
    My bad, the version I'm running is 3.5.12.10.

     
  • mkeller - 2019-08-08

    Hi KP_Henrob.

    KP_Henrob hat geschrieben:
    I'm having an issue where when using create_boot_project in a python script my link to file images will not be exported to the PLCLogic folder.

    What do you mean with "file images"? External File or Image Pool?

    KP_Henrob hat geschrieben:
    Regardless of whether I put them in there or not before transferring them to my plc they will not show up on the screen where they're supposed to. It works fine when I click the Create boot application button in codesys, however.

    You mean the images don't show up in your visualization if you create the boot application with Scripting and copy the result to the PLC. Am I right?

    BR
    Martin

     
  • Anonymous - 2019-08-08

    Originally created by: KP_Henrob

    To the first question, the Image pool images.

    To the second question, that is correct.

    Update:
    I have found a way to get it to work, however it doesn't work well with the script, as it needs to work on any machine.
    Under project settings>visualization, if I change the path for image files to an absolute one, it will work. I tried using a relative path, but that does't export the images as they don't show up on the screen of my plc. Is there a way to use a relative path for this?

     

Log in to post a comment.