Is is possible with Python to get detailed information of a property (of a function block) without exporting int in XML:
1. type INT or DINT
2. read-only, write-only, readwrite
3. commentary of property
Is it possible to import a property and its commentary via XML ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-03-05
Originally created by: M.Schaber
Hi,
Lohr_DCIA-EHE1 hat geschrieben:
Is is possible with Python to get detailed information of a property (of a function block) without exporting int in XML:
1. type INT or DINT
2. read-only, write-only, readwrite
3. commentary of property
Currently, this is not yet possible.
Zitat:
Is it possible to import a property and its commentary via XML ?
It should be possible to import and export everything the same way as you can import and export via the UI, using the "Project/Import PLCOpenXML" and "Project/Export PLCOpenXML" commands.
That said, it seems currently impossible to export a Property without the "parent" POU. But I'm not an expert on PLCOpenXML, and so cannot give a definitive answer on that.
HTH,
Markus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Our problem is that we generate a parameter csv-file from an access database and then want to import the parameters as properties of a FB via XML into a Codesys project. In this project parameters shall be modified, deleted or added. It shall be prevented, that unmodified properties will be overwritten, because that changes the signature.
In your reply to my first question yo said it is not possible to read the details of a property via script.
But is there a possiblity to control the signature of a property?
It would be easy for us to delete all the properties and than replace them with the new ones from the database, but keep the signatures of the unchanged properties.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-03-06
Originally created by: M.Schaber
Hi,
Currently, there are no POU-specific commands available to the scripts. So it is not possible to manipulate properties in any way except the "generic" ones which work for all objects: Import, export, rename, delete, ... Only Devices, Applications and Library Managers have a specific scripting API so far.
However, it should be relatively easy to implement this, at least for properties implemented in textual languages like ST. (I currently have no idea of how to create a simple scripting API for the manipulation of graphical programming languages.)
You could try to file this as a requirement via our support department, and then it will be implemented eventually. If you have an Automation Platform license, you could even write a ScriptDriver implementing this yourself.
Markus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is is possible with Python to get detailed information of a property (of a function block) without exporting int in XML:
1. type INT or DINT
2. read-only, write-only, readwrite
3. commentary of property
Is it possible to import a property and its commentary via XML ?
Originally created by: M.Schaber
Hi,
Currently, this is not yet possible.
It should be possible to import and export everything the same way as you can import and export via the UI, using the "Project/Import PLCOpenXML" and "Project/Export PLCOpenXML" commands.
That said, it seems currently impossible to export a Property without the "parent" POU. But I'm not an expert on PLCOpenXML, and so cannot give a definitive answer on that.
HTH,
Markus
Thank for your helpful answer
Our problem is that we generate a parameter csv-file from an access database and then want to import the parameters as properties of a FB via XML into a Codesys project. In this project parameters shall be modified, deleted or added. It shall be prevented, that unmodified properties will be overwritten, because that changes the signature.
In your reply to my first question yo said it is not possible to read the details of a property via script.
But is there a possiblity to control the signature of a property?
It would be easy for us to delete all the properties and than replace them with the new ones from the database, but keep the signatures of the unchanged properties.
Originally created by: M.Schaber
Hi,
Currently, there are no POU-specific commands available to the scripts. So it is not possible to manipulate properties in any way except the "generic" ones which work for all objects: Import, export, rename, delete, ... Only Devices, Applications and Library Managers have a specific scripting API so far.
However, it should be relatively easy to implement this, at least for properties implemented in textual languages like ST. (I currently have no idea of how to create a simple scripting API for the manipulation of graphical programming languages.)
You could try to file this as a requirement via our support department, and then it will be implemented eventually. If you have an Automation Platform license, you could even write a ScriptDriver implementing this yourself.
Markus