MES 3.0

The Manual Sample Collection set-up on the window SPC_01_GUI/02_Production Control has six components:

  1. Location Selector
  2. Definition Selector
  3. Sample Entry
  4. Ignition Button to save sample data
  5. Ignition Button to approve sample
  6. Ignition Button to clear sample



Configure the components as follows:



Configure Location Selector

  1. Drag a Location Selector component onto the window. Position it near the top-left corner of the window and resize to approximately double its width, as shown above.

  2. No configuration is required.




Configure Definition Selector

  1. Drag a Definition Selector component onto the window. Position it under the Location Selector component and resize to approximately double its width, as shown above.

  2. Set up property binding: bind the Location Path property of the Definition Selector to the Selected Location Path property of the Location Selector.

  3. Open the Component Scripting dialog box (Ctrl-J), select the propertyChange event handler script area and paste in the following script.

    Script for propertyChange event handler
    if event.propertyName == 'selectedSampleDefinition':
    	sampleDefName = event.source.selectedSampleDefinitionName
    	locPath = event.source.locationPath
    	sample = system.quality.sample.data.getCreateSampleByName('', sampleDefName, locPath)
    	event.source.parent.getComponent('Sample Entry').sample = sample





Configure Sample Entry

  1. Drag a Sample Entry component onto the window. Position it under the Definition Selector component and resize as shown above.

  2. (optional) Change the Line Border property (using the drop-down list) to the black Line Border choice:





Configure Save Sample Data Button

  1. Drag three Ignition Button components onto the window. Position and resize all three buttons under the Sample Entry component, as shown above.

  2. Rename the left button to btn_SaveSample.

  3. Change the left button's Text property to Save Sample Data.

  4. Bind the Enabled property to the expression:

    Expression for Save Sample Data Button
    !isNull({Root Container.Sample Entry.sample})



  5. Open the Component Scripting dialog box (Ctrl-J), select the actionPerformed event script area and paste in the following script.

    Script for Save Sample Data Button
    event.source.parent.getComponent('Sample Entry').save()






Configure Approve Sample Button

  1. Rename the middle button to btn_ApproveSample.

  2. Change the middle button's Text property to Approve Sample.

  3. Bind the Enabled property to the expression:

    Expression for Approve Sample Button
    !isNull({Root Container.Sample Entry.sample})



  4. Open the Component Scripting dialog box (Ctrl-J), select the actionPerformed event script area and paste in the following script.

    Script for Approve Sample Button
    event.source.parent.getComponent('Sample Entry').approve()







Configure Clear Sample Button

  1. Rename the right button to btn_ClearSample.

  2. Change the right button's Text property to Clear Sample.

  3. Bind the Enabled property to the expression:

    Expression for Clear Sample Button
    !isNull({Root Container.Sample Entry.sample})



  4. Open the Component Scripting dialog box (Ctrl-J), select the actionPerformed event script area and paste in the following script.

    Script for Clear Sample Button
    event.source.parent.getComponent('Sample Entry').sample = None







  • No labels