A ladder/diagram programming language program is a single file (extension .LAD) containing both editing (source) and execution (runtime) information.
A ladder program consists primarily of a header, then several sections of which the main ones are:
•table of structures, which are the user-defined data types.
•table of local variables, i.e., the general variables of the program.
•table of OB classes, i.e., the object block classes referenced by the program.
•table of blocks, i.e., the sub-routines in other programming languages;
•table of live changes, i.e., any embedded live change files;
In the block list, there is always a main block called MAIN and possibly additional blocks (comparable to sub-routines in other programming languages): each block contains a list of circuits that constitute the actual ladder program: each circuit in turn is a logically structured list of elements.
NOTE: All numeric data stored in this file are to be considered in little indian (x86 standard) format.