Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Manufacturing Execution System 2023 R2

Design

  • Last UpdatedJul 23, 2022
  • 3 minute read

The graphic embeds five copies of the QualityVariable graphic, which is described in Run time. These have a visibility link to only show them if there are enough characteristics within the RecentSample01 characteristic list.

There are five custom properties each for sample size, expose statistics, and type, as these are needed to determine how many bindings to do on the embedded QualityVariable graphics. More custom properties will need to be added to manage more input fields.

The graphic has an on show script to prepare the graphic for initialization. This script sets the sampleID displayed on the screen to the RecentSample01.SampleID. The script also goes through the list of SRO characteristic names (me.SelectedCharNames) and binds to the characteristic’s MES name with the SetCustomPropertyValue() script. The script also retrieves the list of MES characteristics from the RecentSample01.CharacteristicNames object attribute, goes through the list (up to five), and binds the sample size, expose statistics, and type custom properties with the SetCustomPropertyValue() script. This is necessary as it takes time for System Platform to bind to these values. The binding is done in the on show script and another button script then uses all these values. For this to work correctly, the characteristic’s description needs to match the characteristic name (both set in MES Client) since the RecentSamplexx.CharacteristicNames attribute is returning the characteristic’s description field. If the characteristic name and description do not match, the script assumes the recent sample has all the configured characteristics in the SRO and maps them one to one in order.

The Initialize button script completes all the bindings for the embedded QualityVariable graphics. The script starts the same as the on show script to get the list of characteristics exposed on the SRO and to get the list of characteristics in RecentSample01. Depending on whether the characteristic is a variable or attribute characteristic, the script binds the appropriate custom properties in each of the embedded QualityVariable graphics. The script only binds the number of result values exposed for the variable characteristics and binds the two result values for attribute characteristics. For attribute characteristics, the script does not bind reasonable limits or specification limits as it does for variable characteristics. The script also counts how many characteristics there are to enable the visibility of the QualityVariable graphics.

The Sample ID user input field initially is set to the RecentSample01.SampleID, but this can be changed. When it is changed, then a data change script will run to propagate the sample ID to all the QualityVariable graphics and to try to find the sample name from the recent samples exposed in the SRO. If not found, the value display for the Sample Name will point to the highest recent sample on the object.

The Operator user input field will trigger a data change script to propagate the Operator to all of the QualityVariable graphics. The Operator is also displayed in the QualitySampleCharPanel.

The Save All button script triggers a save on all the embedded QualityVariable graphics through the RecordResultDataCmd custom property on each of the embedded graphics.

All of the errors from the embedded graphics are concatenated together in the error text box. There are data change scripts to detect and propagate errors from the embedded graphics. If there is an error (or if the SRO is not configured to auto-reset the object), the reset command can be called by clicking the R button next to the error message. This is sent to all the characteristics.

TitleResults for “How to create a CRG?”Also Available in