Examples#
Estimated time to read: 2 minutes
This page contains examples of expressions that CM MES supports.
Simple Calculations#
Example of accessing a Material property and multiplying it:
Example of accessing a Material attribute:
Example of accessing a Material custom property:
Example of accessing a Material Characteristic:
Example of accessing a Resource property with navigation:
Example of accessing the current Data Collection parameters:
// Specifying the sample and reading
Parameters.Thickness.Samples[0].Readings[0].Value * Parameters.EtchRate.Samples[0].Readings[0].Value
Example of average of all samples and readings of the Thickness parameter:
// Using double wildcard
$average(Parameters.Thickness.**.Value)
// Specifying the JSON structure
$average(Parameters.Thickness.Samples.Readings.Value)
Example of maximum of all readings for the first sample of the Thickness parameter:
The value of the first reading for the first sample of the Thickness parameter:
Regarding grouping functions, support: Maximum, Minimum, Average, Range, Standard Deviation, Sum:
// Maximum
$max(Parameters.Thickness.Samples.Readings.Value)
// Minimum
$min(Parameters.Thickness.Samples.Readings.Value)
// Average
$average(Parameters.Thickness.Samples.Readings.Value)
// Sum
$sum(Parameters.Thickness.Samples.Readings.Value)
// !! Standard deviation and Range are not yet supported, but the syntax will be the following !!
// Standard deviation
$stddev(Parameters.Thickness.Samples.Readings.Value)
// Range
$range(Parameters.Thickness.Samples.Readings.Value)
Referencing External Data Collections#
To reference an external Data Collection the syntax is similar, but you must add the DC(MyDataCollection01) at the start. So if you want to calculate the average of all the readings of the first sample from the Width parameter of the Data Collection CP_DC01, you would use the following expression: