Produced Quantity (PQ) and Good Quantity (GQ)
The following options are available for determining quantities.
Determination using job variables
In the case where a job represents a production order to be processed by the machine tool, the current values for PQ and GQ can be read from the ProductionJobType/PartsCompleted and ProductionJobType/PartsGood variables of the associated job data structure. This also applies if the individual parts to be produced are modelled below this data structure.
Determination by means of events
Alternatively, client-side tracking of PQ and GQ can be achieved by subscribing to the event type ProductionPartTransitionEventType. For transitions that signal the completion of processing of a part (new State is Ended or Aborted), the value of PQ must be increased; depending on the entry for PartQuality, the value of GQ must also be increased, as applicable.
The JobIdentifier and CustomerOrderIdentifier variables can be used to establish a reference to the relevant production order.
Determination via ProductionStatisticsType
The variable ProductionStatisticsType/PartsProducedInLifetime can be used to determine PQ (produced quantity). To do this, the OPC UA Client must determine the variable value at the start and end of the production order and then calculate the difference.
Note: GQ cannot be determined via the ProductionStatisticsType because no corresponding variable is available.
Scrap Quantity (SQ)
The scrap quantity SQ can be derived from the values of PQ and GQ:
Rework Quantity (RQ)
The machine does not usually provide a count of rework and for this reason rework has not been included in the model. Therefore, the value for RQ cannot be determined via the interface.