General

This import is available since 2023.02. Only scalars are supported.

The AVEVA PI import connects to the AVEVA PI Web API (see https://docs.aveva.com/bundle/pi-web-api-reference/page/help.html) and supports importing the latest value and interpolated values. Interpolated values are imported if start and end times are specified. If these are not specified, a single value, which is the latest, is imported. 

AVEVA PI has a concept of web id which is equivalent to the combination of a location and a parameter. Web ids have to be configured in an id mapping configuration file.

Configuration examples

Interpolated values

To import values every 2 hours for a day for parameters H.m and Q.m at location Delft, use the following import configuration.

Import.xml
<import>
	<general>
 		<importType>pi_server_aveva</importType>
        <serverUrl>https://my_base_url</serverUrl>
        <relativeViewPeriod unit="day" start="-1" end="0" startOverrulable="true"/>
        <idMapId>webId_mapping</idMapId>
	</general>
	<timeSeriesSet>
        <moduleInstanceId>my_module_Id</moduleInstanceId>
        <valueType>scalar</valueType>
        <parameterId>H.m</parameterId>
        <locationId>Delft</locationId>
        <timeSeriesType>external historical</timeSeriesType>
        <timeStep unit="hour" multiplier="2"/>
        <readWriteMode>add originals</readWriteMode>
	</timeSeriesSet>
	<timeSeriesSet>
        <moduleInstanceId>my_module_Id</moduleInstanceId>
        <valueType>scalar</valueType>
        <parameterId>Q.m</parameterId>
        <locationId>Delft</locationId>
        <timeSeriesType>external historical</timeSeriesType>
        <timeStep unit="hour" multiplier="2"/>
        <readWriteMode>add originals</readWriteMode>
	</timeSeriesSet>
</import>

 The webId_mapping configuration is as follow. The location is set in the internalLocation attribute, the parameter in the internalParameter attribute, the webId in the externalLocation attribute. The value of externalParameter attribute is ignored. 

webId_mapping.xml
<idMap>
	<map internalLocation="Delft" internalParameter="H.m" externalLocation="ZXhhbXBsZSB3ZWIgaWQgSC5tIERlbGZ0" externalParameter="does_not_matter"/>
	<map internalLocation="Delft" internalParameter="Q.m" externalLocation="ZXhhbXBsZSB3ZWIgaWQgUS5tIERlbGZ0" externalParameter="does_not_matter"/>
</idMap>


Latest value

To import the latest value for parameters H.m and Q.m at location Delft, use the following import configuration.

Import.xml
<import>
	<general>
 		<importType>pi_server_aveva</importType>
        <serverUrl>https://my_base_url</serverUrl>
        <idMapId>webId_mapping</idMapId>
		<!-- No relative view period -->
	</general>
	<timeSeriesSet>
        <moduleInstanceId>my_module_Id</moduleInstanceId>
        <valueType>scalar</valueType>
        <parameterId>H.m</parameterId>
        <locationId>Delft</locationId>
        <timeSeriesType>external historical</timeSeriesType>
        <timeStep unit="nonequidistant"/>
        <readWriteMode>add originals</readWriteMode>
	</timeSeriesSet>
	<timeSeriesSet>
        <moduleInstanceId>my_module_Id</moduleInstanceId>
        <valueType>scalar</valueType>
        <parameterId>Q.m</parameterId>
        <locationId>Delft</locationId>
        <timeSeriesType>external historical</timeSeriesType>
        <timeStep unit="nonequidistant"/>
        <readWriteMode>add originals</readWriteMode>
	</timeSeriesSet>
</import>

The webId_mapping configuration is as follow. The location is set in the internalLocation attribute, the parameter in the internalParameter attribute, the webId in the externalLocation attribute. The value of externalParameter attribute is ignored.

webId_mapping.xml
<idMap>
 	<map internalLocation="Delft" internalParameter="H.m" externalLocation="ZXhhbXBsZSB3ZWIgaWQgSC5tIERlbGZ0" externalParameter="does_not_matter"/>
	<map internalLocation="Delft" internalParameter="Q.m" externalLocation="ZXhhbXBsZSB3ZWIgaWQgUS5tIERlbGZ0" externalParameter="does_not_matter"/> 
</idMap>


  • No labels