PMP configuration to persistent configuration converter

The PmpConfigToPersistentConfig tool converts PMP configuration xml files to a persistent configuration binary.

PMP EtherCAT masters and slaves do not store configuration parameters persistently by default. This means that all parameters are reset to their default value after every reboot. When using a PMP EtherCAT master, the configuration for the motion controller and all devices in the EtherCAT chain is normally loaded via configuration xml after startup. However, when using third-party masters it is often expected that EtherCAT slaves store their configuration parameters persistently. EtherCAT slaves with a PersistentConfiguration updatable (i.e. FoE file) can store a binary that specifies startup values for a list of EtherCAT objects. The purpose of this tool is to generate this persistent configuration binary from a PMP configuration xml.

Prerequisites

  1. One or more PMP configuration xml files. Be aware of the limitations listed below.

  2. 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.

  3. 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

The figure below shows the workflow of the PmpConfigToPersistentConfig tool.

Block diagram showing general usage of the tool.

Block diagram showing general usage of the PmpConfigToPersistentConfig tool.

Each of the steps is described in more detail below.

Prepare PMP configuration

Before using the tool, it is recommended to first validate the PMP configuration xml by loading it with a PMP motion controller. If there are any errors while loading the file, resolve them before proceeding with the next steps.

Run the PmpConfigToPersistentConfig tool

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:

Command to create persistent configuration files.
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 the UserVersion 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.

Upload the persistent configuration to the EtherCAT slave

When using a PMP motion controller, upload the persistent configuration binary to PersistentConfiguration/Configuration updatable of the target EtherCAT slave. When using a third-party EtherCAT master, upload the persistent configuration binary to the PersistentConfiguration file using FoE. The product-specific documentation provides more details about the PersistentConfiguration file.

After uploading the binary, reboot the EtherCAT slave to apply the configuration.

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.