L5X - Library Format
Geospark said:
An L5K file is a full project file which you can directly open in the software.
An L5X file is only a "component" of a full ACD project and will usually only represent a Program Routine...
theColonel26 said:
This is actually not true, as far as I can tell you can save a project as an L5X it will include everything. But you can also export individual components as L5X files as well and they will only include the relevant content.
I'm working on understanding the structure of a project level L5X file now. I have created a class model of the L5X file in C#/.net so I can deserialize the XML. Seem pretty promising so far.
Hi theColonel26, I was looking for something else when I stumbled across your "update" to my previous information.
In as far as you can tell, you would be correct in saying that "my statement" is incorrect (not true). But I did know that you could "conditionally" save an entire project as an L5X Extensible Markup Language file. I just did not qualify my statement properly when using the word "usually". I should have used it twice...
Geospark said:
An L5K file is a full project file which you can directly open in the software.
An L5X file is usually only a "component" of a full ACD project and will usually only represent a Program Routine...
Thank you for pointing that out.
While that helps to better state my understandings here, I also had good reasons at the time for not suggesting that the Sample Code downloaded L5X may be a full project file. Aside from the fact that PLC Pie Guy stated that they had attempted to "open" the L5X, and had received the specific error message that tells us it is not a project file -
1. Historically, the L5K "project" format (Logix5000), which is stored using ANSI, has always been available as an alternative format to the ACD file option when saving a project. One of its main functions is/was to provide a smaller file size for storing and transferring project files. It also facilitates certain edits to modify or correct issues with a project, or change its revision, for instance. Also, for importing tags into certain other software products.
2. The L5X "library" format was later introduced at v13 for certain component Export/Import options. Initially it only supported Rungs, and subsequently Trends (v15), AOI and UDT (v16). Only at v17 was it upgraded to allowing a full project XML file save. Incidentally, the L5K is still the smallest format in size to store a project file. So pre v17 projects cannot be saved in the L5X library format (that's the "conditionally" I was referring to above). The introduction of XML format files for full Logix5000 projects provides the ability for those who may require it in the XML world, such as yourself, to more easily interact with the information stored in these projects. But this again is provided more so as a "third-party" feature rather than a native Rockwell feature i.e. not intended for common use. In a nutshell, the L5X library format is primarily intended to be used to for component Export/Import.
3. The Sample Code Library has, to my knowledge, always only presented full project downloads as either ACD or L5K project files. It, to my knowledge, has always only presented L5X library download files as project component downloads, and not full project downloads.
4. In my time, I have not come across any full projects that have been saved in the L5X library format, or any L5X files that turned out to be a full project file. But that is just my experience, and of course I know they can or do exist out there, somewhere, but that it's just not that widely used.
Going by my experience and knowledge of the above, it will "usually" be my first guess that when I see an L5X file, especially from the Sample Code Library; it is representing a component of a project, rather than an entire project file. What might change my mind on that is "if" the file name "suggests" it might be the title of a project. But that would be subjective at best.
Still, the best I can recommend, for anyone unsure, is to first open the L5X file in Notepad, or an equivalent text editor, or indeed a web browser, and look for the "TargetType" field near the top. If it's a full project it should state "Controller". If it's a component of a project it should state something like "Rung", "Program" or "AddOnInstructionDefinition", etc.
Regards,
George