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 Sat Sep 21, 2019 12:53 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Aug 20, 2012 4:37 pm 
Offline

Joined: Tue Oct 04, 2011 10:13 am
Posts: 80
All,

I noticed that the 'Recipe Manager' in the device tree disappeared, when I export and import the project via PLCopenXML.
The PLCopenXML file has not any trace of a recipe.
(With normal save and open project, the recipe manager information is retained.)

Has somebody else detected that the PLCopenXML does not include the recipe manager information?
And is there a work-around. So I can import the recipe managers information into a project. Maybe with python scripting?

With CoDeSys V3.5 Patch 4.

Regards,
Edwin.


Top
   
PostPosted: Mon Aug 20, 2012 9:20 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Tue Jun 06, 2006 9:03 am
Posts: 409
Use the "CoDeSys specific" import/export. This also supports the recipe's.


Top
   
PostPosted: Tue Aug 21, 2012 8:58 am 
Offline

Joined: Tue Oct 04, 2011 10:13 am
Posts: 80
Thank you Tim. I missed that option / work-around.

The "CoDeSys specific" import / export handles the recipe successful.

Though, when exporting, I see a warning regarding 'position': <invalid position>. See figure.
Maybe this influences the PLCopenXML export! And is importing a recipe with PLCopenXML possible still.
Only I do not know the format that recipes are stored in, in a PLCopenXML file.
I'll do some investigation...

Regards,
Edwin.


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Tue Aug 28, 2012 12:01 pm 
Offline

Joined: Tue Oct 04, 2011 10:13 am
Posts: 80
FYI.

My OEM confirmed that recipes are not stored in PLCopenXML.
The Jira database has the item: REQ-747 PlcopenXML export should also support recipe and recipe manager objects.

For now, I made a work-around with "CoDeSys specific" import / export.

Regards,
Edwin.


Top
   
PostPosted: Fri Aug 31, 2012 8:36 am 
Offline

Joined: Tue Oct 04, 2011 10:13 am
Posts: 80
I could not find any example for import_native. So I donate an example:
Code:
class NativeImReporter (NativeImportHandler):
    def conflict (self, name, existingObject, newguid):
        sys.stderr.write ("%s%s" % ("name: ", name))

    def progress (self, name, pastedObject, exception):
        sys.stderr.write ("%s%s" % ("name: ", name))

    def skipped (self, name):
        sys.stderr.write ("%s%s" % ("name: ", name))

def NativeImportFilter_All (name, guid, type, path):
    return (True)

nativeImReporter = NativeImReporter ()

if projects.primary:
    projects.primary.close ()

proj = projects.open (name_project)
app_list = proj.find (name_application, True)
if (len (app_list) == 1):
    NativeImportResult = app_list[0].import_native (name_recipe_export, NativeImportFilter_All, nativeImReporter)

proj.save ()
proj.close ()


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: ph0010421 and 4 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