system.mes.spc.sample.update

Sepasoft MES Module Suite

system.mes.spc.sample.update

When valuesRecorded is True, the sampleTakenDateTime is set to the current time. SampleTakenDateTime is required to record attribute values, notes on samples or attributes, or the sample 'tag'.

sampleTakenDateTIme is not required for Additional Factors, Reference Number, Product Code

system.mes.spc.sample.update(sample, valuesRecorded)

system.mes.spc.sample.update(sample, valuesRecorded)

Update an existing or new sample. If the valuesRecorded parameter is true, current shift, product code and additional factor information is recorded along with the measurement values.

Because sample are scheduled, they can be created and updated with no measurement values. This allow for coming due, due and overdue functionality to be tracked.

Syntax

system.mes.spc.sample.update(sample, valuesRecorded)

  • Parameters

String  sample - The sample to be updated.

Boolean  valuesRecorded - If true, record the values along with the other sample information, including additional factors.

  • Returns

Nothing

  • Scope

All

Code Example

Python
sampleUUID = '8e117278-a7bc-454e-b3a7-0d5fe17e38ac'
sample = system.mes.spc.sample.getSample(sampleUUID)
sample.setSampleData(1,'att1','3.24')
sample.setApproved(True)
sample.setSampleTakenDateTime(system.date.now())
sample.setEntryDateTime(system.date.now())
system.mes.spc.sample.update(sample,True)



system.mes.spc.sample.update(locationPath, sample, valuesRecorded)

system.mes.spc.sample.update(sample, valuesRecorded)

Update an existing or new sample. If the valuesRecorded parameter is true, current shift, product code and additional factor information is recorded along with the measurement values.

Because sample are scheduled, they can be created and updated with no measurement values. This allow for coming due, due and overdue functionality to be tracked.

Syntax

system.mes.spc.sample.update(sample, valuesRecorded)

  • Parameters

String locationPath - A valid equipment path to the location of the sample to be updated.

String  sample - The sample to be updated.

Boolean  valuesRecorded - If true, record the values along with the other sample information, including additional factors.

  • Returns

Nothing

  • Scope

All




Code Example

Python
sampleUUID = '8e117278-a7bc-454e-b3a7-0d5fe17e38ac'
sample = system.mes.spc.sample.getSample(sampleUUID)
sample.setSampleData(1,'att1','3.24')
sample.setApproved(True)
sample.setSampleTakenDateTime(system.date.now())
sample.setEntryDateTime(system.date.now())
system.mes.spc.sample.update(sample,True)



Sepasoft MES Module Suite