L5X is a file extension used by Rockwell Automation for the files that are exported from Studio5000 (Logix5000) application in an XML form. These files can be created new from scratch or existing files can be modified and later be imported into the Studio5000 application.
More details can be found in Rockwell Publication 1756-RM084Z-EN-P (and other documents) by Rockwell Automation. IT IS HIGHLY RECOMMENDED THAT YOU READ THIS DOCUMENT.
L5X Library (click on the library for further information) | Class Description |
L5xProject | Project |
L5xTask | Task |
L5xModule | Module |
L5xProgram | Program |
L5xTag | Tag |
L5xAOI | Add-On Instruction |
L5xUDT | User-Defined Data Type |
L5xRoutineLD | Ladder Logic - Routine |
L5xRung | Ladder Logic - Rung |
L5xRoutineFB | Function Block - Routine |
L5xSheet | Function Block - Sheet |
L5xRoutineST | Structured Text - Routine |
Every instance belonging to any of these classes has all the XML data located in varname.l5xdata.
Code below will result in an error because objectByXPath function parameter is entered without ".l5xdata":
var newPrj = new kSDKv1.l5xProject(); newPrj.setName ("NewProject"); var controller = kSDKv1.objectsByXPath (newPrj, "/RSLogix5000Content/Controller")[0]; // ERROR : xmldata attribute is not "XMLDocument" type
This is the correct way of handling the instance:
var newPrj = new kSDKv1.l5xProject(); newPrj.setName("NewProject"); var controller = kSDKv1.objectsByXPath (newPrj.l5xdata, "/RSLogix5000Content/Controller")[0]; console.log(controller.getAttribute("Name")); // -> "NewProject"
All functions and methods in this library already consider this, so you will need to have that in mind only if you try to manipulate the XML using standard or third-party JS functions.