PMP configuration to persistent configuration converter¶
The PmpConfigToPersistentConfig tool converts PMP configuration xml files to a persistent configuration binary, formatted according to Persistent configuration.
Prerequisites¶
One or more PMP configuration xml files. Be aware of the limitations listed below.
The controller description xml of the EtherCAT slave(s) that are used in the PMP configuration. This file is provided via a product-specific installer of the slave and can be found in
<pmp_install_directory>/model/controller_<name>.xml
. If you cannot find this file, run the product-specific installer or ask your support contact for access to this file.The PmpConfigToPersistentConfig tool, which is installed in
<pmp_install_directory>/miscellaneous/persistent_configuration/
. If this folder does not exist on your machine, run the PMP installer and choose the complete installation, or select the persistent configuration component in the custom installation.
Usage¶
Open a console in the folder <pmp_install_directory>/miscellaneous/persistent_configuration/
.
If this folder does not exist on your machine, run the PMP installer and select the Persistent configuration
option in the custom installation,
or run the installer with the Complete option.
In the console, run the tool with the following command:
1 | PmpConfigToPersistentConfig [-h] -p PMP_CONFIG -c CONTROLLER_DESCRIPTION -o OUTPUT_DIR [-u USER_VERSION] [-v VARIANT]
|
More details on each argument:
-h
: Use this flag to show a detailed help on the command line argument format.-p, --pmp-config
: Path to one or more PMP configuration files to be converted. This argument can be used multiple times if multiple PMP configurations should be converted, e.g.:-p pmpconfig1.xml -p pmpconfig2.xml
. The PMP configuration files are processed in the same order in which they are provided.-c, --controller-description
: Path to the controller description xml. This argument can be used multiple times if different types of controllers should be converted, e.g.:-c controller_cygnus_q3_48_10.xml -c controller_cygnus_d3_400_4.xml
.-o, --output-dir
: Output directory. Note that contents of the output directory may be overwritten.-u, --user-version
: Optional argument that specifies theUserVersion
attribute of the persistent configuration xml. Default value is zero.-v, --variant
: Optional argument that specifies which configuration variant(s) to override, using the format<name>:<value>
. The argument can be used multiple times, e.g.:-v VariantName1:VariantValueA -v VariantName2:VariantValueB
. See Variant for more information on how variants are used in PMP configurations.
Hint
The converter generates a <pmp_config>-residual.xml
file for each provided PMP configuration.
This residual xml contains all PMP configuration elements that were not converted to persistent configuration, e.g. because they contain master-specific configuration.
Applying the persistent configuration binary together with the <pmp_config>-residual.xml
results in the same configuration as loading the original <pmp_config>.xml
.
Note
The converter generates one or more <controller_name>-converted.xml
file(s) that contains the persistent configuration in an intermediate, human-readable, format.
The format of this xml is described in more detail in Complete XML schema.
If preferred, it is also possible to directly write or edit this persistent configuration xml and convert it to binary using the <pmp_install_directory>/miscellaneous/persistent_configuration/PersistentConfigurationXmlToBin.exe
tool.
Limitations¶
Conversion of
<Filter>
elements is not supported.Conversion of
<ParameterSet>
elements is not supported.Enum signal values are not supported. Replace them by the underlying integer value. So e.g.
<Signal Name="Type">FirstOrderLowPass</Signal>
should be replaced with<Signal Name="Type">1</Signal>
.If the persistent config sets one or more bitfields in an EtherCAT object, it is assumed that the reset value of all other bitfields in the (sub)object is zero.
If there are duplicate entries in the PMP configuration (e.g. a signal is written twice to create a write sequence), only the last occurence is used in the persistent configuration.
See also
- Persistent configuration
More details about the persistent configuration XML format.
See also
- Persistent configuration
More details about the persistent configuration binary format.