system.mes.spc.controllimit.setControlLimitValue(definition, locationPath, attributeName, limitName, value, [productCode], [date])

Sepasoft MES Module Suite

system.mes.spc.controllimit.setControlLimitValue(definition, locationPath, attributeName, limitName, value, [productCode], [date])

Control limits normally are set using the control charts components and when the process is determined to be stable. In cases where additional flexibility is required, this scripting function is provided.

Syntax

system.mes.spc.controllimit.setControlLimitValue(definition, locationPath, attributeName, limitName, value, [productCode], [date])

Parameters

  • definition: MESSampleDefinition The sample definition object that contains the limit value being set.
  • locationPath: String Path of the location that the limit value is being set.
  • attributeName: String Name of the attribute that the limit value is being set.
  • limitName: String Name of the limit to set the value.
  • value: Double The new limit value.
  • productCode: String The product code that the limit value is being set. This only applies if the Save Control Limits by Product Code option is selected.
  • date: Date The time to set the control limit for.

Returns

Nothing

Code Example

Python
definition = system.mes.spc.definition.getSampleDefinition('Single Attribute')
locationPath = 'Enterprise\El Dorado Hills\Packaging Area\Packaging Line 1\Inspection Station 1'
attributeName = 'Diameter'
limitName = 'Individual UCL'
productCode = None
date = system.date.addDays(system.date.now(),-1)
system.mes.spc.controllimit.setControlLimitValue(definition, locationPath, attributeName, limitName, 3.2, productCode, date)



Sepasoft MES Module Suite