CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Dec 09, 2019 7:02 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Aug 02, 2019 7:16 pm 
Offline

Joined: Wed Jul 31, 2019 1:56 pm
Posts: 4
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.
Code:
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


Top
   
PostPosted: Tue Aug 06, 2019 7:55 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 256
Hi KP_Henrob.

KP_Henrob wrote:
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

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Tue Aug 06, 2019 1:03 pm 
Offline

Joined: Wed Jul 31, 2019 1:56 pm
Posts: 4
M.Keller,
My bad, the version I'm running is 3.5.12.10.


Top
   
PostPosted: Thu Aug 08, 2019 1:47 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 256
Hi KP_Henrob.

KP_Henrob wrote:
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 wrote:
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

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Thu Aug 08, 2019 4:31 pm 
Offline

Joined: Wed Jul 31, 2019 1:56 pm
Posts: 4
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?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited