Elipse Plant Manager — EPM Web API

Version 5.0.45

epmwebapi.basicvariable

class TagType(enum.Enum):

Enumeration with all types of Tags.

SourceType = <TagType.SourceType: 0>
Bit = <TagType.Bit: 1>
Int = <TagType.Int: 2>
UInt = <TagType.UInt: 3>
Float = <TagType.Float: 4>
Double = <TagType.Double: 5>
String = <TagType.String: 6>
DateTime = <TagType.DateTime: 8>
Inherited Members
enum.Enum
name
value
class DataTypeId(enum.Enum):

Enumeration with all types of IDS for data types.

SourceType = <DataTypeId.SourceType: None>
Unknown = <DataTypeId.Unknown: 0>
Bit = <DataTypeId.Bit: 1>
Int = <DataTypeId.Int: 8>
UInt = <DataTypeId.UInt: 9>
Float = <DataTypeId.Float: 10>
Double = <DataTypeId.Double: 11>
String = <DataTypeId.String: 12>
DateTime = <DataTypeId.DateTime: 13>
Inherited Members
enum.Enum
name
value

Class representing an EPM Basic Variable.

BasicVariable( epmConnection, itemPath, name, description=None, tagType=None, realTimeEnabled=None, deadBandFilter=None, deadBandUnit=None, eu=None, lowLimit=None, highLimit=None, scaleEnable=None, inputLowLimit=None, inputHighLimit=None, clamping=None, domain=None, interface=None, ioTagAddress=None, processingEnabled=None, isRecording=None, isCompressing=None, storeMillisecondsEnabled=None, storageSet=None, active=None)
name: str

Gets or sets the name of this Basic Variable.

Parameters
  • value: A new name for this Basic Variable.
Returns

A str representing the name of this Basic Variable.

tagType: TagType

Gets or sets the type of Tag of this Basic Variable.

Parameters
  • value: A new type of Tag for this Basic Variable (An int or a TagType value).
Returns

A TagType value representing the type of Tag.

realTimeEnabled: bool

Gets or sets whether real-time is enabled in this Basic Variable.

Parameters
  • value: True if real-time must be enabled or False if real-time must be disabled.
Returns

True if real-time is enabled or False if real-time is not enabled.

deadBandFilter: float

Gets or sets a dead band filter for this Basic Variable.

Parameters
  • value: If value is equal to 0 (zero), then dead band filter is disabled.
Returns

Dead band filter from this Basic Variable as a float number.

deadBandUnit: str

Gets or sets the dead band unit for this Basic Variable.

Parameters
  • value: A dead band unit for this Basic Variable. Possible values are Absolute, PercentOfEURange, PercentOfValue, or None.
Returns

Dead band unit from this Basic Variable. Possible values are Absolute, PercentOfEURange, PercentOfValue, or None.

scaleEnable: bool

Enables or disables a scale for this Basic Variable. Deprecated, please use processingEnabled instead.

Parameters
  • value: True to enable a scale or False to disable a scale.
Returns

True if a scale is enabled or False if a scale is disabled.

inputLowLimit: float

Gets or sets a low limit to a scale.

Parameters
  • value: A float number to set a low limit to a scale.
Returns

A float number representing a scale's low limit.

inputHighLimit: float

Gets or sets a high limit to a scale.

Parameters
  • value: A float number to set a high limit to a scale.
Returns

A float number representing a scale's high limit.

interface: str

Gets or sets the name of this Basic Variable's interface, in the format interfaceServerName/interfaceName.

Parameters
  • value: A str with the name of an interface.
Returns

The name of this Basic Variable's interface.

ioTagAddress: str

Gets or sets the interface's source address for this Basic Variable.

Parameters
  • value: A str with the name of an interface's source address.
Returns

A str representing the interface's source address for this Basic Variable.

processingEnabled: bool

Enables or disables a scale for this Basic Variable.

Parameters
  • value: True to enable a scale or False to disable a scale.
Returns

True if a scale is enabled or False if a scale is disabled.

isRecording: bool

Enables or disables recording in this Basic Variable.

Parameters
  • value: True to enable recording or False to disable recording.
Returns

True if recording is enabled or False if recording is disabled.

isCompressing: bool

Enables or disables compressing in this Basic Variable.

Parameters
  • value: True to enable compressing or False to disable compressing.
Returns

True if compressing is enabled or False if compressing is disabled.

storeMillisecondsEnabled: bool

Enables or disables storing milliseconds in this Basic Variable.

Parameters
  • value: True to enable storing milliseconds or False to disable storing milliseconds.
Returns

True if storing milliseconds is enabled or False if storing milliseconds is disabled.

storageSet: str

Gets or sets the name of a Storage Set for this Basic Variable.

Parameters
  • value: A str with the name of a Storage Set for this Basic Variable.
Returns

A str representing the Storage Set for this Basic Variable.

def historyReadRaw( self, queryPeriod: epmwebapi.queryperiod.QueryPeriod, bounds: bool = False) -> numpy.ndarray:

Returns raw values of this Basic Variable from the configured epmwebapi.queryperiod.QueryPeriod.

Parameters
  • queryPeriod: A period of time for querying raw values.
  • bounds: True if the bound value must be returned or False if the bound value must not be returned. Default value is False.
Returns

A numpy ndarray with raw values from the configured period, including Value, Timestamp, and Quality.

def write( self, value, timestamp: datetime.datetime = datetime.datetime(2024, 2, 8, 12, 24, 41, 502138, tzinfo=datetime.timezone.utc), quality: int = 0):

Writes a Value, a Timestamp, and a Quality to this Basic Variable's real-time.

Parameters
  • value: A value as a float, an int, a str, or a datetime.
  • timestamp: An optional timestamp for the value. Default is dt.datetime.now.
  • quality: An optional quality for the value. Default is 0 (zero).
def historyUpdate(self, values: numpy.ndarray):

Writes an array of values to this Basic Variable, including Value, Timestamp, and Quality.

Example

array = np.empty([valuesCount], dtype=np.dtype([('Value', '>f4'), ('Timestamp', 'object'), ('Quality', 'object')]))

Parameters
  • values: A numpy ndarray with values to write.
def save(self):

Saves the configuration of this Basic Variable to an EPM Server.

def copy( self, newName: str, description: str = None, tagType: Union[str, TagType] = None, realTimeEnabled: bool = None, deadBandFilter: float = None, deadBandUnit: str = None, eu: str = None, lowLimit: float = None, highLimit: float = None, scaleEnable: bool = None, inputLowLimit: float = None, inputHighLimit: float = None, clamping: str = None, domain: str = None, interface: str = None, ioTagAddress: str = None, processingEnabled: bool = None, isRecording: bool = None, isCompressing: bool = None, storeMillisecondsEnabled: bool = None, storageSet: bool = None):

Creates a new Basic Variable on an EPM Server by merging the current values of properties and parameters specified.

Parameters
  • newName: A name for the new Basic Variable.
  • description: An optional description for the new Basic Variable.
  • tagType: An optional TagType for the new Basic Variable. Possible values are SourceType, Bit, Int, UInt, Float, Double, String, DateTime. Default value is None.
  • realTimeEnabled: An optional bool value indicating whether real-time is enabled or not. Default value is None.
  • deadbandFilter: An optional float value indicating a dead band filter. Default value is None.
  • deadbandUnit: An optional str indicating a dead band unit. Possible values are Absolute, PercentOfEURange, or PercentOfValue. Default value is None.
  • eu: An optional str indicating an engineering unit. Default value is None.
  • lowLimit: An optional float value indicating a low limit. Default value is None.
  • highLimit: An optional float value indicating a high limit. Default value is None.
  • scaleEnable: An optional bool value indicating whether the scale is enabled. Default value is None.
  • inputLowLimit: An optional float value indicating an input low limit. Default value is None.
  • inputHighLimit: An optional float value indicating an input high limit. Default value is None.
  • clamping: An optional str value indicating a type of clamping. Possible values are ClampToRange or Discard. Default value is None.
  • domain: An optional str indicating a type of domain for this Basic Variable. Possible values are Continuous or Discrete. Default value is None.
  • interface: An optional str indicating a name of an interface, in the format interfaceServerName/interfaceName. Default value is None.
  • ioTagAddress: An optional str indicating the interface's source path. Default value is None.
  • processingEnabled: An optional bool value indicating whether the scale is enabled. Default value is None.
  • isRecording: An optional bool value indicating whether this Basic Variable is recording. Default value is None.
  • isCompressing: An optional bool value indicating whether this Basic Variable is compressing values. Default value is None.
  • storeMillisecondsEnabled: An optional bool value indicating whether this Basic Variable is storing milliseconds. Default value is None.
  • storageSet: An optional bool value indicating whether this Basic Variable contains a name of a Storage Set. Default value is None.
Returns

A new BasicVariable object.

def delete(self) -> bool:

Deletes a Basic Variable.

Returns

True if the Basic Variable was deleted or False otherwise.

class BasicVariableAlreadyExistsException(builtins.Exception):

Common base class for all non-exit exceptions.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
add_note
args
class BasicVariableInvalidNameException(builtins.Exception):

Common base class for all non-exit exceptions.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
add_note
args
class StorageSetDoesNotExistException(builtins.Exception):

Common base class for all non-exit exceptions.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
add_note
args
class InterfaceDoesNotExistException(builtins.Exception):

Common base class for all non-exit exceptions.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
add_note
args