Skip to Main Content
Cognex Support Hub
LogoLogo

How to Monitor the Process Control Metrics (PCM) Value in a Runtime View

This article summarizes how to enable quality metrics and present codes and grades in the result display using scripting.

11/07/2025

Details

Using the Quality Metrics object in Scripting, you can concatenate any of the listed quality metrics to the decodeResults content. This concatenated string will appear in the results display.  

  1. Enable Code Quality Metrics on the reader

    How to Monitor the Process Control Metrics PCM Value in a Runtime View-Image-1
  2. Enable Script-Based Formatting

    How to Monitor the Process Control Metrics PCM Value in a Runtime View-Image-2

Example Script

How to Monitor the Process Control Metrics PCM Value in a Runtime View-Image-3

Now the Barcode and the Grade will appear in the Results Display.