CargillSalt Validation Mode¶
What This Mode Does¶
CargillSalt mode uses a Cognex Insight camera with OCR (optical character recognition) to read the expiration date printed on product labels, then compares that date against expected production data imported from a network file. This mode validates the expiration date only -- GTIN and lot number are not checked (per client requirement).
Sites Using This Mode¶
- Cargill Hersey
Required Hardware¶
- Cognex Insight 8000 camera (OCR + image capture)
- Network file share for production data files
- Arduino controller (optional, for reject signal)
How It Works: Step by Step¶
- An external system drops a production data file in a watched network directory.
- The NetworkFileImporter reads this file and extracts the expected expiration date.
- A case passes the Insight camera, which automatically triggers (hardware photo-eye).
- The camera uses OCR to read the label and sends the data back in a semicolon-delimited format:
PRODUCTCODE;PLANTCODE;MM/DD/YYYY. - The system extracts the date field (third value after the second semicolon).
- The system compares the read date against the expected expiration date.
- If the dates match exactly, the case passes. If they differ, it fails.
What Makes a PASS¶
- Production data is loaded (file has been imported)
- Camera reads a barcode in the correct format
- The date extracted from the camera read matches the expected expiration date exactly (day-level comparison)
What Makes a FAIL¶
| Error Message | What It Means | What to Check |
|---|---|---|
No production data available - waiting for file import |
No file has been imported yet | Is the network share accessible? Has a file been dropped? |
Invalid production data: missing GTIN |
File was imported but GTIN field is empty | Check the production data file format |
No barcode read from camera |
Camera returned NOREAD | Camera alignment, label position, OCR focus |
Invalid barcode format - could not extract date from: {barcode} |
Camera OCR read does not have 3 semicolon-separated fields | OCR read corrupted, label format changed |
Invalid date format from camera: {dateStr} |
Date field cannot be parsed as a valid date | OCR misread the date, label printing issue |
Expiration date mismatch: expected {X}, camera read {Y} |
Date on label does not match expected date | Wrong product? Label printed with wrong date? |
Common Failure Reasons and What to Check¶
| Symptom | Likely Cause | What to Do |
|---|---|---|
| "No production data available" constantly | Network share unreachable, file not dropped | Check network connectivity to file share, verify file exists |
| "No barcode read from camera" | Camera cannot read the OCR text | Check camera alignment, clean lens, verify label is in view |
| "Invalid barcode format" errors | OCR reading corrupted text | Check camera focus, label quality, lighting conditions |
| Dates always mismatch | Wrong product on line, or production file has wrong date | Verify the production data file matches the product being run |
Camera Image Feature¶
This mode supports live camera image display. The Insight camera sends an image with each read, which is shown in the application UI. Operators can:
- See the current live image from the camera
- Click on historical validation results to see the image from that scan
- Click the image area to return to the live view
Network File Import¶
The production data comes from semicolon-delimited files in a watched directory. The file must have:
- A header row
- At least one data row
- Columns for GTIN and expiration date (column names are configurable)
Supported date formats in the file: YYYYMMDD or MM/DD/YYYY.
The file importer reads the file in place (does not move it) and tracks which file was last read.
Troubleshooting Steps¶
- Check the diagnostics panel for camera connection status.
- Look at the log file for entries with
[CARGILL-SALT-VALIDATION]prefix. - Check
[NETWORK-FILE-IMPORTER]log entries for file import issues. - Verify the network share is accessible from the GateKeeper PC.
- Check the Insight camera web interface to verify it is reading correctly.
Log Search Reference¶
| Log Prefix | What It Shows |
|---|---|
[CARGILL-SALT-VALIDATION] |
Validation results and comparisons |
[NETWORK-FILE-IMPORTER] |
File import status and errors |
When to Escalate¶
- Camera shows disconnected and does not reconnect
- Network file importer cannot access the file share after checking network connectivity
- OCR reads are consistently garbled or unreadable
- Application cannot start due to hardware initialization failure