EcoStruxure Machine Expert version 1.1 does not support the M258, LMC058 and LMC078 controllers.

Configuration File

Overview

The Controller Assistant can be parameterized with an external configuration file in XML format. This user-specific configuration file can be loaded when starting the program. After this, the settings are available. The file is read by the Controller Assistant and not written to.

If the configuration file is in the execution directory of the Controller Assistant, then its settings will be taken over at program start. The settings influence the behavior as well as the operation of the Controller Assistant. The settings are used for integration within HMIs.

Structure

The file is structured in XML format (http://www.xml.org) and must include the encoding ISO-8859-1. This allows you to enter special characters (for example, umlauts such as ä, ö and ü) at any time using a text editor.

The root node has the name <config>. For a description of further subnodes, refer to the section Parameters in this chapter.

The typical configuration file below contains 2 entries, autofilesavefilename and defaultfilesavedirectory. Both are located as a group under the parent node fileoptions.

Example of a typical configuration file with 2 entries:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<config>
  <fileoptions>
    <autofilesavefilename>
      <![CDATA[Backup_<date>_<counter>.pdi]]
    <autofilesavefilename>
    <defaultfilesavedirectory>
       c:\temp\PD-BackUp
    <defaultfilesavedirectory>
  <fileoptions>
</config>>

Changes to the file must be XML compliant. Otherwise, the file cannot be loaded. When starting the Controller Assistant, this is indicated by the diagnostic message stating the incorrect row and column. The program is then launched, and the configuration file is ignored.

Calling

There are 2 ways to load the desired configuration file:

oautomatically

If there is a file with the name Controller assistant.config.xml in the start directory of the Controller Assistant, it is loaded automatically upon start-up. The program then uses these settings as it runs.

omanually

You can also load the configuration file explicitly from another location in the file system using a command line. This has precedence over the automatic call. To do this, you can use the following syntax via the command line:

-userconfigfile <file name>

In this case, the configuration file entered under <file name> is loaded.

Parameters

The individual parameters are described where they appear within the configuration file Controller assistant.config.xml. You will find application examples there. As this file is located in the program directory, you can use it as a template.

Moreover, the parameters are described in detail. The parameters are listed as XML paths, which describe their distinct position within the XML file.

config/fileoptions/autofilesavefilename 

When a file is saved, a file name can be generated automatically. The file name can consist of constant name elements, values, (such as date or controller type) and a counter. The automatically generated name is then proposed, for example in the Save as dialog box.

The automatically generated name can be described by text and placeholders.

Example

BackUp_date=<date>.bpd gets the file name BackUp_date=2006-03-12.bpd 

The current date is used. The placeholder must be written in lower case. This means that <date> is valid, whereas <Date> is not recognized.

The newly generated file name may possibly include characters that are not supported by the file system (for example, file is My?File). Therefore, these characters are replaced by a lowercase x.

Example

My?File.bpd is replaced by MyxFile.bpd.

The following 8 characters are those which are replaced:

\/:*?"<>|

The description (with placeholders) of the name to be generated includes special XML characters that cannot simply be written to an XML file. Therefore, the description must be enclosed in a CDATA section.

Example

BackUp_<date>.bpd must be changed to <!CDATA[BackUp_<date>.bpd]] to be inserted in the XML file.

As the description of a file name which is to be automatically generated may contain special characters, it must be enclosed in a CDATA section.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<config>
  <fileoptions>
    <autofilesavefilename>
      <![CDATA[Backup_<date>_<counter>.pdi]]
    <autofilesavefilename>
    <defaultfilesavedirectory>
       c:\temp\PD-BackUp
    <defaultfilesavedirectory>
  <fileoptions>
</config>>

Placeholders are surrounded by angle brackets. They have to be entered manually. The list provides an overview of the possible placeholders:

o<date>

Current date:

Format: yyyy-MM-dd 

Examples

1999-12-01 2006-03-21

o<time>

Current time in 24-hour format:

Format: HH-mm-ss 

Examples

07-41-29 19-41-29 

o<counter>

The counter is an exception. First, it replaces the placeholder <counter> in the file name with a number, starting with 1. For example, this then results in a file name PD-BackUp_1.bpd. Then, it verifies whether the file name already exists in the same directory. If it does, it increases the counter by 1 and repeats the process until it finds no file with the same name.

o<controllertype>

This inserts the controller type in an abbreviated format.

Examples

LMC 300 C400600

o<firmwareversion>

Sets the firmware version in the format Major.Minor.Build.Revision

Examples

1.30.0.0 1.31.201.2.

Examples of Calls with Possible Results

<controllertype>_<firmwareversion>.bpd
--> MAX4_0.22.6.0.bpd
<controllertype>_<firmwareversion>_<date>_<counter>.bpd
--> C400600_2206_2006-03-22_1.bpd

config/fileoptions/defaultfilesavedirectory

This parameter defines the default directory that is first shown when a Save as dialog box is opened. It allows you to change the directory and save the file. When you open the Save as dialog box the next time, the directory defined in <defaultfilesavedirectory> is suggested again.

The following example defines c:\temp\PD-BackUp as the default directory.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<config>
  <fileoptions>
    <autofilesavefilename>
      <![CDATA[Backup_<date>_<counter>.pdi]]
    <autofilesavefilename>
    <defaultfilesavedirectory>
       c:\temp\PD-BackUp
    <defaultfilesavedirectory>
  <fileoptions>
</config>>

The entry defines c:\temp\PD-BackUp as the default directory

config/fileoptions/defaultfileopendirectory

This parameter defines the default directory that is first shown when an Open dialog box is opened. It allows you to change the directory and open the file. When you open the Open dialog box the next time, the directory defined in <defaultfileopendirectory> is suggested again.

config/application/usermode

Via user mode, the Controller Assistant can be further parameterized. The user mode is intended for HMI applications. It defines which functionalities are available.

The following modes are possible:

Mode

Description

Default

default setting (corresponds to no active user mode)

NoFirmwareChange

The dialog boxes for the firmware replacement have been deactivated.

DontEditImage

The menu for editing an image has been deactivated.

NoExplorer

The ImageManager dialog of the Controller Assistant for manual editing of the image has been deactivated.

config/application/quicktransfermode

In the case of resource intensive programming which places a high level of demand on the controller, and especially for controllers with outdated firmware, cycle times may be exceeded. If <quicktransfermode> is set to FALSE, then the transfer takes place slowly (up to a factor of 15). This helps to minimize the risk of a cycle time overrun and consequential watch dog timeout errors.

NOTE: The default value of <quicktransfermode> is TRUE.