In this recipe, we will demonstrate how to export a program to an XML-based (Extensible Mark-up Language) L5X file for manipulation or reporting.
From RSLogix 5000 Controller Organizer, right-click on a program and select the Export Routine… option.
Use the Export window file browser to select a location on your computer to save your L5X file. Click on the Save button to store the L5X file on your computer.
Open the L5X on your computer using Notepad by right-clicking on the file and selecting Open With…; then select Notepad from the list.
View the XML file in Notepad.
The L5X file is an XML-based representation of your program. The L5X file can be used to make widespread changes to your program, for reporting purposes, or for importing by third-party products. More information about importing and exporting programs from RSLogix 5000 can be found in the Rockwell publication Logix5000 Controllers Import/Export Project Components available at http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm019_-en-p.pdf.
The L5X file can also be easily modified and re-imported into your project.
You can use the L5X file to modify your program and re-import it into your project. For example, if there are repeated parts of your plant, you can perform Find / Replace of the tags that will change between each area using Notepad. Once your changes are in place, you can re-import the L5X file by right-clicking on Controller Organizer and selecting the Import Routine… option, and then navigating to the L5X file you wish to import.
The Import Configuration window provides you with a wide range of options for importing your routine into your project as shown in the following screenshot: