Exposing custom device driver measurements through EWS

If you create a custom device driver in PME using the Device Type Editor tool, you need to take extra steps to expose the measurements from this device through EWS. The default device drivers in PME and many of the downloadable add-on drivers have their measurements exposed by default.

warning

inaccurate data results

Do not incorrectly configure the software or the devices.
Do not base your maintenance or service actions solely on messages and information displayed by the software.
Do not rely solely on software messages and reports to determine if the system is functioning correctly or meeting all applicable standards and requirements.
Consider the implications of unanticipated transmission delays or failures of communications links.

Failure to follow these instructions can result in death, serious injury, equipment damage, or permanent loss of data.

 

To expose custom measurements from a custom device type through EWS:

  1. Create a DTE driver. In this example, a driver file was created for “My_DTE” device with two registers, “My_Label_1” and “My_Label_2”.
  1. Go in the following folder: C:\Program Files (x86)\Schneider Electric\Power Monitoring Expert\system\WebServices\Extensions.
  2. Select any XML file (for example: “Types_Measurements_8000.xml”), copy and paste it to the same folder. Rename it to the newly created DTE "Device Type" name, “My_DTE.xml”
  3. Open the XML file with a file editor. The structure of the XML resembles the following:

     

    <?xml version="1.0"?>
    <MeasurementStores xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Store Name="8000" DisplayName="PM8000" Type="8000" SubType="Common">
    ...
    ...
    <Measurement IONReferenceName="Active Energy Delivered" MeasurementName="Real Energy Into the Load" MeasurementUnit="kWh" Exposed="true" IsManual="false" Handle="22704" Format="double" />   <Measurement IONReferenceName="Active Energy Delivered Interval" MeasurementName="Real Energy Into the Load Interval" MeasurementUnit="kWh" Exposed="false" IsManual="false" Handle="24483" Format="double" />
    ...
    ...
    </Store>
    </MeasurementStores>

     

  1. Modify the bold sections like the following to match your "Device Type" name as well as your Register "Label". Make sure to change all the bold ones to what fits the new DTE, delete the "Handle" section and specify the format as necessary.

     

    <?xml version="1.0"?>
    <MeasurementStores xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Store Name="My_DTE" DisplayName="My_DTE" Type="My_DTE" SubType="Common">
    ...
    ...
    <Measurement IONReferenceName="My_Label_1" MeasurementName="My_Label_1" MeasurementUnit="My_Unit_1" Exposed="true" IsManual="false" Format="Boolean" />   <Measurement IONReferenceName="My_Label_2" MeasurementName="My_Label_2" MeasurementUnit="My_Unit_2" Exposed="true" IsManual="false" Format="double" />
    ...
    ...
    </Store>
    </MeasurementStores>

     

    NOTE: When editing the XML file, format “Boolean” should be used for all Boolean values and format “Double” for all analog values.

  1. After completing the new xml file, go to Management Console > Tools > System and click Update EWS Server. It will take some time for the server to propagate the change via web service. An IIS and/or computer restart might even be required.

  2. The custom registers/measurements are now expose via EWS. See Hosting EWS values in Building Operation for information on this topic.