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

Exporting FB instance parameters in PLCopenXML

truschival
2016-07-29
2016-08-01
  • truschival - 2016-07-29

    Hi,
    I am dealing with PLCopenXML exports of my program and it seems important parts are missing in the export - CodeSys 3.5 SP7.

    I declared an FB with a constant paramenter as

    // in the FB declaration
    VAR_INPUT CONSTANTΒ  Β 
    Β  Β MyParam : WSTRING := "none";Β  Β 
    END_VAR
    

    In the program (CFC style) I instantiate the FB and set the value of MyParam in the instance using the "Edit Parameters" dialog.
    The Project compiles and runs using the value given for each instance.

    However if I export the project the project to plcopen xml the parameter in the instances is not present. It still exists in plcopen xml in the type definition of the FB but not in the variables of the type.

    Looking at the PLCopenXML spec const parameters ar not explicitly mentioned but it seems possible to implement. Is this a bug in CodeSys?

    Thanks in advance
    Thomas

     
  • r.evbatyrov - 2016-08-01

    Hello Thomas,

    that's a bug.
    The issue id is
    CDS-50631 PLCopenXML CFC: Parameters list is not processed

    Possible workaround: make sure the FB is exported along with your CFC POU.
    After import perform Pins-> Reset Pins... command on the box.

    Regards,
    Roman

     
  • truschival - 2016-08-01

    Hi Roman,
    thanks for the hint and the issue id. Resetting the pins works and I get the dialog back to set the parameter values - unfortunately the original value information is gone since the values have not been exported

    Best regards
    Thomas

     

Log in to post a comment.