Elipse Plant Manager — EPM Web API
Version 5.0.45
epmwebapi.epmvariable
InfinityName =
'Infinity'
MinusInfinityName =
'-Infinity'
NanName =
'NaN'
class
RetrievalMode(enum.Enum):
Enumeration with all types of retrieval modes.
Previous =
<RetrievalMode.Previous: 'Previous'>
Exact =
<RetrievalMode.Exact: 'Exact'>
Next =
<RetrievalMode.Next: 'Next'>
Inherited Members
- enum.Enum
- name
- value
class
EpmVariable:
Class representing a Variable.
def
recordedValue( self, timestamp: datetime.datetime, retrieval: RetrievalMode = <RetrievalMode.Previous: 'Previous'>):
Returns data effectively recorded as informed in the retrieval
parameter.
Parameters
- timestamp: Timestamp considered for data searching.
- retrieval: Mode for data searching. Default is
RetrievalMode.Previous
.
Returns
A
numpy
array element with Value, Timestamp, and Quality.
def
historyReadRaw( self, queryPeriod: epmwebapi.queryperiod.QueryPeriod, bounds: bool = False) -> numpy.ndarray:
Returns raw values from this Variable within the configured period.
Parameters
- queryPeriod: An
epmwebapi.queryperiod.QueryPeriod
object with the period of time to query. - bounds: An optional parameter indicating whether the bound value must be returned or not. Default is False.
Returns
A numpy NDArray with Value, Timestamp, and Quality.
def
write( self, value: <built-in function any>, timestamp: datetime.datetime = datetime.datetime(2024, 2, 8, 12, 24, 41, 470886, tzinfo=datetime.timezone.utc), quality: int = 0):
Writes a value to this Variable.
Parameters
- value: Value to write.
- timestamp: Optional parameter indicating the value's date and time. Default is
dt.datetime.now(dt.timezone.utc)
. - quality: OPC UA quality of the value. Default is 0 (zero, Good).
def
historyReadAggregate( self, aggregateDetails: epmwebapi.aggregatedetails.AggregateDetails, queryPeriod: epmwebapi.queryperiod.QueryPeriod) -> numpy.ndarray:
Returns the aggregated values of this Variable within the configured period.
Parameters
- aggregateDetails: An
epmwebapi.aggregatedetails.AggregateDetails
object with the aggregate function. - queryPeriod: An
epmwebapi.queryperiod.QueryPeriod
object with the period to search.
Returns
A numpy NDArray with Value, Timestamp, and Quality.
def
historyUpdate(self, values: numpy.ndarray):
Writes an array of values, with Value, Timestamp, and Quality, to this Variable.
Example
array = np.empty([valuesCount], dtype=np.dtype([('Value', '>f4'), ('Timestamp', 'object'), ('Quality', 'object')]))
Parameters
- value: A numpy NDArray with values to write.
Removes data from a specified period of time.
Parameters
- queryPeriod: An
epmwebapi.queryperiod.QueryPeriod
object with the period to remove data.
Copyright © 2017–2024 Elipse Software Ltda. All rights reserved. Distributed under MIT License.