Kiptr allows users to use its full-featured library to create and modify L5X files.


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
L5xProjectProject
L5xTaskTask
L5xModuleModule
L5xProgramProgram
L5xTagTag
L5xAOIAdd-On Instruction
L5xUDTUser-Defined Data Type
L5xRoutineLDLadder Logic - Routine
L5xRungLadder Logic - Rung
L5xRoutineFBFunction Block - Routine
L5xSheetFunction Block - Sheet
L5xRoutineSTStructured 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.