Sepasoft MES Module Suite
system.mes.trace.configurePersonnel(userid, name, person, UOM, quantity, beginDateTime, endDateTime, delete)
This method accepts keyword arguments. A convenience function that creates a Python Dictionary in the format expected for array entries in personnel.
|
Scripting Function added in MES 3.81.6 RC 3 and later For version downloads, go to https://www.sepasoft.com/downloads/. |
Syntax
system.mes.trace.configurePersonnel(userid, name, person, UOM, quantity, beginDateTime, endDateTime, delete)
- Parameters
userid string: A user-defined ID to reference this property when modifying.
name string: The property name that will be used for the Personnel property on the response segment.
person: Required. The name of an existing MES Person that will be used.
UOM: Unit of Measure. Units for personnel count.
quantity: The quantity of personnel.
beginDateTime: The date and time at which the equipment begun the operations segment.
endDateTime: The date and time at which the equipment ended the operations segment.
delete: Only valid for when using modify. If True then the property will be removed
- Returns
A Python Dictionary representing a personnel for an operation.
- Scope
All
system.mes.trace.recordOperation
Track and trace scripting function reference, see system.mes.trace
Supported Sepasoft Module Versions:
|
Release Candidate: 3.81.6 RC3 and later |
Script Example
In this script example, recordOperation() will be called, capturing the material, equipment, personnel, and tooling (supplemental equipment) information relevant to the transformation or movement of materials in the production of finished goods. Note how recordOperation() takes in some top level information (dates, user defined ID, etc.) then arrays of dictionaries for materials, personnel, and tooling. This structure allows for flexible addition and subtraction of resources.
Python |
##Define required information like material lot info and equipment path. inLot = '7-26-ID1' id = '7-26-ID2' eqPath = 'New Enterprise\New Site\New Area\New Line' material = 'Material 1' suppl = 'Box' person = 'Supervisor, Sam' ##Use a helper function to build the input material dictionary required by the Record Operation function matInDict = system.mes.trace.configureMaterial(userid = inLot, name = inLot, lotNo = inLot, materialName = material, quantity = 100, equipmentPath = eqPath) ##Use a helper function to build the output material dictionary required by the Record Operation function matOutDict = system.mes.trace.configureMaterial(userid = id, name = id, lotNo = id, materialName = material, quantity = 100, equipmentPath = eqPath, autoCreateLot = True) ##Use a helper function to build the supplemental equipment dictionary required by the Record Operation function supplementalEqDict = system.mes.trace.configureSupplementalEquipment(userid = id, name = id, equipmentName = suppl) ##Use a helper function to build the personnel dictionary required by the Record Operation function personnelDict = system.mes.trace.configurePersonnel(userid = id, name = id, person = person) ##Call record operation, passing in necessary data system.mes.trace.recordOperation( userid = id, name = 'Anodize Part', beginDateTime = system.date.now(), endDateTime = system.date.now(), equipmentPath = eqPath, materialIn = [matInDict], materialOut = [matOutDict], supplementalEquipment = [supplementalEqDict], personnel = [personnelDict] ) |
Sepasoft MES Module Suite