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 Nov 19, 2018 10:50 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Nov 28, 2017 3:31 pm 
Offline

Joined: Mon Nov 27, 2017 3:12 pm
Posts: 4
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


Top
   
PostPosted: Tue Nov 28, 2017 4:27 pm 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 232
Hi MKeo.

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

The method create_boot_application() is only available on an online application object.

Here some example code for the active appliction:
Code:
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

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

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


Top
   
PostPosted: Wed Nov 29, 2017 7:37 am 
Offline

Joined: Mon Nov 27, 2017 3:12 pm
Posts: 4
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


Top
   
PostPosted: Wed Nov 29, 2017 9:39 am 
Offline
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 232
MKeo wrote:
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 create_boot_application(path) with the path for the application file.

Here some example code:
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

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

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


Top
   
PostPosted: Wed Nov 29, 2017 9:58 am 
Offline

Joined: Mon Nov 27, 2017 3:12 pm
Posts: 4
Now it works!

Thank you very much!


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