Javascript library: xmlobjectloaderlib.js – Rockwell Automation 1768-EWEB EtherNet/IP Web Server Module User Manual User Manual
Page 100
Publication ENET-UM527E-EN-P - October 2006
100 Create Custom Web Pages
Javascript Library: XMLObjectLoaderLib.js
This library uses the conversion.js library. To include these libraries in
your custom web page, include these lines.
The XMLObjectLoaderLib library requires an input file in XML format
which describes the CIP object being returned from a
GET_ATTRIBUTE_ALL service. The following example shows the
format of this input file:
type="USINT"/> type="USINT"/> This description format is recursive - structures within the object can decToBin(decimalnumber) The decToBin function takes an unsigned decimal number as a parameter and returns Function Description
be described by declaring an “object” element, then describing the
members of the structure under consideration. The names of the
elements are used to construct the Javascript object, and the members
of the Javascript object have names that match the “name” attributes in
the description file. The “index” attributes describe the order in
which these elements occur in the object; each attribute and object
except the root object must contain an index attribute.
a string representing decimalnumber in binary notation. The return value does not have a
prefix and breaks the resulting binary string into groups of four characters.