Elipse Plant Manager — EPM Web API

Version 6.50.41

epmwebapi.advancedevent

class AdvancedEvent:

Class representing an Advanced Event.

AdvancedEvent(connection: 'EpmConnection', eventName: str)
def historyRead( self, queryPeriod: epmwebapi.queryperiod.QueryPeriod, where: epmwebapi.elementoperand.ElementOperand = None, select: List[str] = ['Time', 'Severity', 'EventId', 'PayloadVariables', 'PayloadValues']) -> numpy.ndarray[typing.Any, numpy.dtype[typing.Any]]:

Returns raw values from this Event within the configured period.

Parameters
  • queryPeriod: An epmwebapi.queryperiod.QueryPeriod object with the period of time to query.
  • where: An optional parameter indicating the where condition to apply. Default is None.
  • select: An optional parameter indicating the selected fields to be returned. Default is ['Time', 'Severity', 'EventId', 'PayloadVariables', 'PayloadValues'].
Returns

A numpy NDArray.

Examples

The following examples show how to use historyRead function.

  • Retrieves all events from a period of time:
ini_date = dt.datetime.now(dt.timezone.utc) - dt.timedelta(hours=1)
end_date = dt.datetime.now(dt.timezone.utc)
queryPeriod = epm.QueryPeriod(ini_date, end_date)
typeEvent = connection.getAdvancedEvent('EventName')
result = typeEvent.historyRead(queryPeriod)
  • Retrieves all events in which Tag0023 is greater than 30 (Tag0023 must be inserted on Payload):
ini_date = dt.datetime.now(dt.timezone.utc) - dt.timedelta(hours=1)
end_date = dt.datetime.now(dt.timezone.utc)
queryPeriod = epm.QueryPeriod(ini_date, end_date)
typeEvent = connection.getTypeEvent('PumpEventName')
where = ElementOperand(Operator.Greater, [SimpleAttributeOperand('Tag0023'), LiteralOperand(30)])
result = typeEvent.historyRead(queryPeriod, where)