Introduction
This article serves as a guide to importing firmware files or images of a third-party device via POWERLINK using XDD (XML Device Description) import in Automation Studio. The import of both firmware files and images is dealt with simultaneously. Contrary to this example, however, both files can be imported independently of each other - only the import of firmware files or only the import of an image.
The article is aimed at developers and engineers who deal with the integration of third-party devices into a B&R automation system.
Step-by-step instructions
1. Preparations
Before we start the actual import process, we need the following files:
- The XDD file of the third-party device
- The firmware file of the third-party device
- The image of the third-party device
2. information about the XDD file
An XDD file is an XML-based file that describes the properties and interfaces of a device. This file can be created manually using a text or XML editor.
The creation of the XDD file is not described in detail in this article. Basic knowledge of XDD is assumed. The specification for creating XDD files (XML Device Description - Implementation Guidelines) can be downloaded from the B&R homepage.
3. information on the firmware file:
A firmware file is a binary file that is introduced by an XML header. The header must have a specific format and contains important information such as vendor ID, device ID, version and checksum.
The specification for the header for the FW file (XML_header_for_firmware_files) can be downloaded from the B&R homepage.
4. importing the firmware file
To integrate a firmware file into the XDD file, the following steps must be followed:
- declare object 0x1F50/1 in the XDD
- add a < characteristic > to the < characteristicsList > in the < DeviceFunction > of the XDD
- the < characteristicName > must be named “FirmwareFile”
- the < characteristicContent > must be specified with the relative path to the file
Here is an example of how to reference the firmware file correctly
5. adding an image
A picture can be added by following the steps below:
- add element < picturesList > to the < DeviceFunction > of the XDD
- add the < picture > element to the < picturesList >, including the URI path, which contains the relative path to the picture, starting from the XDD.
Here is an example of how to reference the Image file correctly
6. verification and validation
After the XDD file has been created and all required elements have been added, the file should be checked using the online XDD checker (download via B&R homepage).
7. import into Automation Studio and project download
The firmware download is initiated by the controller. The following steps must be carried out for this:
- import the XDD file into Automation Studio
- If an FW file or an image is referenced in the XDD but cannot be found when importing from AS, a warning is displayed in the Automation Studio output window.
- add device to a configuration in AS
- If an Image has been imported successfully, AS will now show the device with the new imported image
- build and download the project to the controller
The download process is then initiated by the controller during start-up by to object 0x1F50/1. The controller checks the header of the firmware file and compares the date and time (ApplSwDate/ ApplSwTime) with the existing firmware on the device.
If all conditions are met and a more up-to-date firmware has been detected, the download of the FW file starts.
Resources
- B&R Homepage