Equipment Object Functions - Live Analysis

Sepasoft MES Module Suite

Equipment Object Functions | Live Analysis

The following functions are associated with the Live Analysis Complex Property:
 

getDataPoints()

Description

Gets the Data Points property (in a comma-separated string) set for this MES Live Analysis Complex Property.

Syntax

getDataPoints()

  • Parameters

None

  • Returns

String dataPointsList - The Data Points (in a comma-separated string) set for this MES Live Analysis Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Get the Live Analysis data points set for the Cell 'Test Cell' in the Line 'Test Line' (comma-separated string)
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getDataPoints()
Output

Equipment Name,Equipment Path,Infeed-Material In

 getDataPointList()

Description

Gets the Data Points property (in Python List format) set for this MES Live Analysis Complex Property. Note that "Point" in the method is singular, unlike .getDataPoints() above.

Syntax

getDataPointList()

  • Parameters

None

  • Returns

String dataPointPythonList - The Data Points (in Python List format) set for this MES Live Analysis Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Get the Live Analysis data points set for the Cell 'Test Cell' in the Line 'Test Line' (Python List format)
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getDataPointList()
Output

[Equipment Name, Equipment Path, Infeed-Material In]

 

getFilterExpression()

Description

Gets the optional filter expression ("Optional Filter") set for this MES Live Analysis Complex Property.

Syntax

getFilterExpression()

  • Parameters

None

  • Returns

String filterExpression - The optional filter expression ("Optional Filter") set for this MES Live Analysis Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Get the optional filter expression from the 'My Test Analysis' Live Analysis in Cell 'Test Cell'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getFilterExpression()
Output

Shift='Morning' AND (Line State Type='Planned Downtime' OR Line State Type='Unplanned Downtime' OR Line State Type='Unknown')

 

getLiveAnalysisCustomPeriodTag()

Description

Gets the Tag Path property (used with the Period property selection) set for this MES Live Analysis Complex Property.

Syntax

getLiveAnalysisCustomPeriodTag()

  • Parameters

None

  • Returns

String liveAnalysisCustomPeriodTag - The Tag Path set for this MES Live Analysis Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Get the Tag Path used with the Live Analysis Period selection for the Cell 'Test Cell' in the Line 'Test Line'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getLiveAnalysisCustomPeriodTag()
Output

[default]New Enterprise/Site/Area/Test Line/Test Cell/Shift

 getLiveAnalysisPeriod()

Description

Gets the Period property for this MES Live Analysis Complex Property.

Syntax

getLiveAnalysisPeriod()

  • Parameters

None

  • Returns

 String liveAnalysisPeriod - The Period set for this MES Live Analysis Complex Property. This method will return one of the following strings: "SHIFT", "DAY_PRODUCTION", "DAY_MIDNIGHT", "START_OF_RUN", "TOP_OF_HOUR", "CURRENT_ACTIVE_RECIPE" or "CUSTOM_PERIOD_TAG".

  • Scope

All

Code Example
1
2
3
4
5
#Get the Live Analysis Period set for the Cell 'Test Cell' in the Line 'Test Line'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getLiveAnalysisPeriod()
Output

DAY_PRODUCTION

 

getLiveAnalysisUpdateRate()

Description

Gets the Period property for this MES Live Analysis Complex Property.

Syntax

getLiveAnalysisUpdateRate()

  • Parameters

None

  • Returns

 String liveAnalysisUpdateRate - The Update Rate set for this MES Live Analysis Complex Property.

  • Scope

All

Code Example
1
2
3
4
5
#Get the Live Analysis Update Rate set for the Cell 'Test Cell' in the Line 'Test Line'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getLiveAnalysisUpdateRate()
Output

60

 

setAnalysisSettings(LASettings)

Description

Sets the Live Analysis Settings property for this MES Live Analysis Complex Property.

Syntax

setAnalysisSettings(LAsettings)

  • Parameters

String LASettings - the Live Analysis Settings property to set for this MES Live Analysis Complex Property (comma-separated string. Example: 'Include Future = True,Rollup Time Span = 30').

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
#Add settings to the 'My Test Analysis' Live Analysis in Cell 'Test Cell'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
LASettings = 'Include Future = True,Rollup Time Span = 30'
LA_object.setAnalysisSettings(LASettings)
system.mes.saveMESObject(cell_obj)
Output

As viewed in the 'My Test Analysis' Live Analysis object (in the MES Equipment Manager component):


 

setDataPoints(dataPoints)

Description

Sets the Data Points property for this MES Live Analysis Complex Property.

Syntax

setDataPoints(dataPoints)

  • Parameters

String dataPoints - The Data Points property to set for this MES Live Analysis Complex Property (comma-separated string. Example: 'Equipment Name,Equipment Path,OEE Infeed Count, OEE Outfeed Count').

  • Returns

None

  • Scope

All

Code Example
Python
#Add three new data points to the 'My Test Analysis' Live Analysis in Cell 'Test Cell'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis', 'My Test Analysis')
new_data_points = ',Short Stop Time,State Begin Time,State End Time' #has comma at start of string
data_points = LA_object.getDataPoints()
data_points += new_data_points
LA_object.setDataPoints(data_points)
system.mes.saveMESObject(cell_obj)

Output

As viewed in the 'My Test Analysis' Live Analysis object (in the MES Equipment Manager component):


 

setFilterExpression(filterExpression)

Description

Sets the optional filter expression ("Optional Filter") property for this MES Live Analysis Complex Property, in String format. Refer to Live Analysis for creating expressions.

Syntax

setFilterExpression(filterExpression)

  • Parameters

String filterExpression - The filter expression ("Optional Filter") to set for this MES Live Analysis Complex Property, in String format. 
Example: "Shift='Morning' AND (Line State Type='Planned Downtime' OR Line State Type='Unplanned Downtime' OR Line State Type='Unknown')"

The Optional Filter expression must not contain any of the following data points, since live analysis is already filtered to an equipment: Equipment Path, Equipment Name, Equipment Type, Equipment Cell Order, Is Key Cell.

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
#Add Optional Filter parameters to the 'My Test Analysis' Live Analysis in Cell 'Test Cell'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
filter_expression = "Shift='Morning' AND (Line State Type='Planned Downtime' OR Line State Type='Unplanned Downtime' OR Line State Type='Unknown')"
LA_object.setFilterExpression(filter_expression)
system.mes.saveMESObject(cell_obj)
Output

As viewed in the 'My Test Analysis' Live Analysis object (in the MES Equipment Manager component):


 

setLiveAnalysisCustomPeriodTag(customPeriodTag)

Description

Sets the Tag Path property (used with the Period property selection) set for this MES Live Analysis Complex Property.

Syntax

setLiveAnalysisCustomPeriodTag(customPeriodTag)

  • Parameters

String customPeriodTag - The Tag Path property (used with the Period property selection) to set for this MES Live Analysis Complex Property.

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
10
#Set Custom Period tag path for the 'My Test Analysis' Live Analysis in Cell 'Test Cell'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
period_tag_path = '[default]New Enterprise/Site/Area/Test Line/Test Cell/Shift'
LA_object.setLiveAnalysisCustomPeriodTag(period_tag_path)
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getLiveAnalysisCustomPeriodTag()
Output

[default]New Enterprise/Site/Area/Test Line/Test Cell/Shift

 

setLiveAnalysisPeriod(period)

Description

Sets the Period property selection for this MES Live Analysis Complex Property (must be a String with "Shift", "Day (midnight)", "Day (production)", "Start of Run", "Top of Hour", "Current Active Recipe Period", "Custom Period Tag").

Syntax

setLiveAnalysisPeriod(period)

  • Parameters

String period - The Period property selection to set for this MES Live Analysis Complex Property. Note: The string required to set the Period property is different than what will be returned in the .getLiveAnalysisPeriod method. Set one of the following strings, in any combination of upper or lower letter cases: "Shift", "Day (midnight)", "Day (production)", "Start of Run", "Top of Hour", "Current Active Recipe Period", "Custom Period Tag". 

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
10
#Set the Period selection to "Day (production)" for the 'My Test Analysis' Live Analysis in Cell 'Test Cell'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
period = 'Day (production)'
LA_object.setLiveAnalysisPeriod(period)
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getLiveAnalysisPeriod()
Output

DAY_PRODUCTION

 

setLiveAnalysisUpdateRate(updateRate)

Description

Sets the Update Rate ("Update Rate (seconds)") property for this MES Live Analysis Complex Property (value is in whole seconds).

Syntax

setLiveAnalysisUpdateRate(updateRate)

  • Parameters

Integer updateRate - The Update Rate ("Update Rate (seconds)") to set for this MES Live Analysis Complex Property. Integer, in seconds.

  • Returns

None

  • Scope

All

Code Example
1
2
3
4
5
6
7
8
9
10
#Set the Update Rate for the 'My Test Analysis' Live Analysis in Cell 'Test Cell'
cell_path = "New Enterprise\Site\Area\Test Line\Test Cell"
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
updateRate = 600  #integer, in seconds
LA_object.setLiveAnalysisUpdateRate(updateRate)
system.mes.saveMESObject(cell_obj)
cell_obj = system.mes.loadMESObjectByEquipmentPath(cell_path)
LA_object = cell_obj.getComplexProperty('LiveAnalysis''My Test Analysis')
print LA_object.getLiveAnalysisUpdateRate()
Output

600

This object inherits the AbstractMESComplexProperty functions.


Sepasoft MES Module Suite