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

Recipe Management and PLCopenXML

chab
2012-08-20
2012-08-31
  • chab - 2012-08-20

    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.

     
  • TimvH

    TimvH - 2012-08-20

    Use the "CoDeSys specific" import/export. This also supports the recipe's.

     
  • chab - 2012-08-21

    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...</invalid>

    Regards,
    Edwin.

    IMG: 01_repipe_manager_b.JPG

     
  • chab - 2012-08-28

    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.

     
  • chab - 2012-08-31

    I could not find any example for import_native. So I donate an example:

    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 ()
    
     

Log in to post a comment.