I'm trying to generate a lot of methods to a function block. To do so, I exported a method as XML, and used that as a template to generate new methods. This works fine until I reached this type.
METHOD DIntArray : INT VAR_INPUT Β name: STRING; END_VAR VAR_IN_OUT Β variable: ARRAY [*] OF DINT; END_VAR
Importing the exported file unchanged gives me this.
METHOD DIntArray : INT VAR_INPUT Β name: STRING; Β {attribute 'variable_length_array'} Β {attribute 'Dimensions' := '1'} Β variable: POINTER TO DINT; END_VAR
As it can be seen, it is not possible to transfer and ARRAY [*] OF via the XML. Is this a limitation to PLCopenXML
Will it be possible to use the "native" Export/Import to generate such methods. It is also some kind of ML language.
Regards Kjeld Flarup
Hi Kjeld,
you can use Pointer to * for an pointer to a array.
Β Β test:dint; variable: POINTER TO DINT;
test := variable[5];
I think it is yust beeing convertet.
BR Stefan
Talk.ru: 5
Log in to post a comment.
I'm trying to generate a lot of methods to a function block. To do so, I exported a method as XML, and used that as a template to generate new methods.
This works fine until I reached this type.
Importing the exported file unchanged gives me this.
As it can be seen, it is not possible to transfer and ARRAY [*] OF via the XML.
Is this a limitation to PLCopenXML
Will it be possible to use the "native" Export/Import to generate such methods. It is also some kind of ML language.
Regards Kjeld Flarup
Hi Kjeld,
you can use Pointer to * for an pointer to a array.
I think it is yust beeing convertet.
BR Stefan
Related
Talk.ru: 5