system.mes.spc.analysis.createSettings(definitionName, attribute, filters, controlLimits, signals, dataFormatName)

Sepasoft MES Module Suite

system.mes.spc.analysis.createSettings(definitionName, attribute, filters, controlLimits, signals, dataFormatName)

Create a new instance of a SPCSettings object based on the parameters.

Warning

Scripting Function modifications in

MES 3.79.3 RC 5 and later
MES 3.81.4 RC 5 and later

Syntax

system.mes.spc.analysis.createSettings(definitionName, attribute, filters, controlLimits, signals, dataFormatName)

  • Parameters

String definitionName - The sample definition name for the new settings.

String attribute - The attribute name for the new settings. Multiple attributes can be separated by commas.

String filters - The filters for the new settings. Multiple filter expressions can be separated by commas. 'Location=<equipment path>'

String controlLimits - The control limits for the new settings.  Multiple control limits can be separated by commas.

String signals - The SPC rules (signals) for the new settings.  Multiple SPC rules can be separated by commas.

String dataFormatName - The data format (control chart type) for the new settings.

  • Returns

SPCSettings - A new instance of a SPCSettings object.

  • Scope

All

Code Example

Python
locationPath = 'Enterprise\El Dorado Hills\Packaging Area\Packaging Line 1\Inspection Station 1'

startDate = system.mes.spc.analysis.formatDate(system.date.addHours(system.date.now(), -1))
endDate = system.mes.spc.analysis.formatDate(system.date.now())

definitionName = 'Case Inspection'
attribute = 'Fill Level'
controlLimits = 'CpPpUSL,CpPpLSL,PpTarget'
signals = ''
dataFormatName = 'Process Capability and Performance'
filters=''

spcsettings = system.mes.spc.analysis.createSettings(definitionName, attribute, filters, controlLimits, signals, dataFormatName)
filter = spcsettings.encodeList(['FromDate='+startDate,'ToDate='+endDate,'Location='+locationPath])
spcsettings.setFilters(filter)

results = system.mes.spc.analysis.getSPCResults(spcsettings)

ds = results.getTableResults()
print ds

for row in range(ds.getRowCount()):
	for col in range(ds.getColumnCount()):
		print ds.getColumnName(col),ds.getValueAt(row,col)

Sepasoft MES Module Suite