You can use XML commands instead of a batch file. The commands are written into an XML formatted file. They provide more detailed and more readable calls of commands. Additionally, specific commands can only be used by XML commands (such as creating an image with specific Sercos devices).
It is called itself from command line using this format:
-xmlcommand <CommandFilePath> [<LogFile>]
The file at <CommandFilePath> contains the XML commands.
The optional log file <LogFile> is used to log detected XML results and detected errors. You can also define a log file inside the XML document.
The name of the root XML tag is ControllerAssistantCommandLine.
It contains the following elements:
oA list tag named Commands.
oOne or more commands (tag name Command) to be executed in the defined order.
Use the following command to retrieve the version number of the Controller Assistant application.
Example:
<ControllerAssistantCommandLine xmlns:xsi="http://www.w3.org/2001 XMLSchema-instance" Logfile="c:\log\ca.log">
<Commands>
<Command xsi:type="GetProgramVersion"/>
</Commands>
</ControllerAssistantCommandLine>
The Logfile parameter is optional. If it is not specified, a default log file is used.
The result is logged into the log file and written to the console.
Creating a Controller Firmware
Use the following command to create a new firmware image for a controller.
Example:
The example creates an image for the controller LMC600C with specific version and communication settings. Additionally, the image includes firmware for the given Sercos devices and versions.
<ControllerAssistantCommandLine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ImagePath="c:\img" Logfile="c:\log\ca.log">
<Commands>
<Command xsi:type="CreateImage"
ControllerType="LMC600C"
FirmwareVersion="1.50.3.4"
IPAddress="192.168.15.1"
SubnetMask="255.255.255.0"
Gateway="192.168.15.100"
IPMode="fixed"
DeviceName=""
>
<SercosDevices>
<SercosDevice VisibleName="LXM62" Version="1.50.4.0" />
<SercosDevice VisibleName="LXM62P" Version="1.50.4.0" />
<SercosDevice VisibleName="LXM62D" Version="1.50.4.0" />
<SercosDevice VisibleName="ILM62" Version="1.50.4.0" />
<SercosDevice VisibleName="LXM52" Version="1.50.4.0" />
<SercosDevice VisibleName="TM5NS31" Version="1.09" />
<SercosDevice VisibleName="SLC100" Version="1.10" />
<SercosDevice VisibleName="SLC200" Version="1.10" />
</SercosDevices>
</Command>
</Commands>
</ControllerAssistantCommandLine>
The ImagePath and Logfile parameters are optional. If they are not specified, default values are used.
The result is logged into the log file and written to the console.
Setting the Communication Parameters
Use the following command to set the communication parameters of the controller inside the image.
Example:
<ControllerAssistantCommandLine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ImagePath="c:\img" Logfile="c:\log\ca.log">
<Commands>
<Command xsi:type="UpdateCommunicationSettings"
IPAddress="192.168.0.1"
SubnetMask="255.255.255.0"
Gateway="192.168.0.100"
IPMode="fixed"
DeviceName="">
</Command>
</Commands>
</ControllerAssistantCommandLine>
The ImagePath and Logfile parameters are optional. If they are not specified, default values are used.
The DeviceName is used with IPMode dhcp. On some controllers, IPMode and DeviceName are ignored.
The result is logged into the log file and written to the console.
Add Custom Files to an Existing Image
Use the following command to add specific files to a controller image.
<ControllerAssistantCommandLine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ImagePath="c:\img" Logfile="c:\log\ca.log">
<Commands>
<Command xsi:type="AddCustomFiles" SourcePath="c:\additionalFiles"
RelativeDestinationPath="addons"/>
</Commands>
</ControllerAssistantCommandLine>
The ImagePath and Logfile parameters are optional. If they are not specified, default values are used.
The SourcePath is a folder containing the files that are copied into the controller image. This path can also contain subdirectory structures. The RelativeDestinationPath is optional and specifies a subfolder inside the controller image where the files are stored. The subfolder or a structure of subfolders is relative to the root folder of the image.
Adding an Application to an Existing Image
Use the following command to add an application to a controller image. For example, for the LMC•0•C controller family, the *.app and the corresponding *.crc files are copied into the image folder and the CmpApp section of the *sysc3.cfg file is modified.
NOTE: Some controller types do not support this command.
Example:
<ControllerAssistantCommandLine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ImagePath="c:\img" Logfile="c:\log\ca.log">
<Commands>
<Command xsi:type="AddApplication" ApplicationPath=""
ApplicationName="newapp"/>
</Commands>
</ControllerAssistantCommandLine>
The ImagePath and Logfile parameters are optional. If they are not specified, default values are used.
The ApplicationPath is the folder containing the *.app and the corresponding *.crc files. The ApplicationName is the name of the *.app file (the file name without extension).