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 Tue Feb 19, 2019 9:30 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Jul 27, 2015 7:38 am 
Offline

Joined: Fri Jul 10, 2015 10:52 am
Posts: 35
Hi

I have a set of project archives, but with time they get outdated so I currently use a script to iterate and update the device version,
basically opening the project archive, device.update(version) and saving the project as archive.

This sort of works but I also would like to update the compiler version to the newest, if possible.
When I open the archive with codesys GUI it asks me if I want to use the latest or older ones, but I don't
get a message when the script is executed.

Is it even possible? If so which interface should I use?

Thanks


Top
   
PostPosted: Mon Jul 27, 2015 10:05 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 233
Hi etamgul.

Right now, this is not yet possible, but this improvement is already listed in our Jira tracker CDS-34105, so it will be implemented eventually.

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 Jul 28, 2015 1:46 pm 
Offline

Joined: Fri Jul 10, 2015 10:52 am
Posts: 35
Hi

Thanks for the answer, is there any chance to do it semi-automated?
I'm thinking on a solution to open the project archives by script, do the managable changes, then ask the user to finish the settings
and save, close. My script then would wait till projects.all gets empty (none project is open) and would reopen the user saves project file
and export or save it as project archive.

So something similar:
Code:
 proj = projects.open_archive(...)
   # do some automated changes
   notify_usr_to_do_manual_changes()
   while len(projects.all)>0:
     system.delay() # this currently blocks my access to GUI, is there an async function to somehow put the script in background and let the user to access the GUI?
 #usr saved and closed everything > reopen the project to export it as archive
 proj = projects.open(temp.project)
 proj.save_archive(proj_name.archive)


Top
   
PostPosted: Tue Jul 28, 2015 2:42 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 233
Hi

You could use one of the methods from system.ui to show a message box. For example:
Code:
system.ui.info("Please update ...")


You can also open the "Project Environment" dialog with:
Code:
system.commands[("project", "checkavailableversions")].execute()

I forgot to ask if you use the CODESYS Test Manager. The Test Manager supports the update of the compiler version, library version and the visu profile.

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 Jul 28, 2015 3:02 pm 
Offline

Joined: Fri Jul 10, 2015 10:52 am
Posts: 35
Thank you I was experimenting with this when I found your answer,
that what exactly what I was looking for.
Thanks again!


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 2 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