Sepasoft MES Module Suite
system.mes.spc.analysis.executeMiscCalculation(settings, miscCalcName)
Perform a previously defined miscellaneous calculation. If calculations other than the built-in calculations, such as PPM, are needed, then they can be defined in the Misc. Calculation section in the MES production model.
Syntax
system.mes.spc.analysis.executeMiscCalculation(settings, miscCalcName)
- Parameters
SPCSettings settings - An instance of a SPCSettings object that defines the samples to perform the calculation.
String miscCalcName - The name of the miscellaneous calculation, that has been previously defined in the Misc. Calculations, to perform.
- Returns
MiscCalcEvent - The MES object created for the execution of the miscellaneous calculation.
- 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(), -2)) endDate = system.mes.spc.analysis.formatDate(system.date.now()) definitionName = 'Case Inspection' attribute = 'Fill Level' controlLimits = 'CpPp LSL,CpPp USL' 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.executeMiscCalculation(spcsettings, 'Cppp') print 'CPK', results.getValue('Cpk') print 'PPK',results.getValue('Ppk') |
>>> CPK 0.0689333333333 PPK 0.0701882527634 >>>
Sepasoft MES Module Suite