CargillRfid Validation Mode¶
What This Mode Does¶
CargillRfid mode validates each case by checking multiple data points: it reads a 2D barcode and a UCC-128 barcode from cameras, reads an RFID tag, and compares the GTIN and expiration date from the barcode against expected production data received from the Matthews system. Successful validations are exported to Mojix, MWE, or AIS systems for tracking.
Sites Using This Mode¶
- Cargill St. Clair
- Cargill Oil - Sidney
- Cargill Oil - Gainesville
- Cargill Oil - Fullerton
Required Hardware¶
- Cognex DataMan camera(s) (reads both 2D and UCC-128 barcodes)
- Zebra FX9600 RFID reader (continuous tag reading)
- Arduino Portenta H7 controller (for reject signal)
- Matthews TCP interface (provides production data on port 60251)
How It Works: Step by Step¶
- The Matthews system sends a production data message (GTIN, lot, expiration) via TCP.
- A case passes the photo-eye sensor, triggering the camera.
- The camera reads two barcodes on the case:
- A 2D barcode (DataMatrix or QR) -- contains an EPC identifier
- A UCC-128 barcode (Code128) -- contains GTIN, lot number, and expiration date
- The FX9600 RFID reader continuously reads nearby tags into a cache.
- The system checks the RFID cache for a tag whose EPC matches the 2D barcode.
- The system parses the UCC-128 barcode as a GS1 barcode to extract GTIN and expiration.
- The system compares:
- GTIN from barcode vs. expected GTIN from Matthews
- Expiration date from barcode vs. expected expiration (within tolerance, default 1 day)
- If all checks pass, an export file is created for Mojix/MWE/AIS.
What Makes a PASS¶
All of the following must be true: - At least 2 barcodes read (one 2D + one UCC-128) - Production data available from Matthews - 2D barcode found (DataMatrix or QR symbology) - UCC-128 barcode found (Code128 symbology) - RFID tag found in cache matching the 2D barcode EPC - UCC-128 barcode is valid GS1 format - GTIN matches expected value exactly - Expiration date is within tolerance (default: +/- 1 day)
What Makes a FAIL¶
| Error Message | What It Means | What to Check |
|---|---|---|
Missing required barcodes (2D and UCC-128) |
Camera read fewer than 2 barcodes | Camera alignment, label visibility, camera connection |
Missing expected production data |
No production data from Matthews | Matthews system running? TCP connection on port 60251? |
Missing 2D barcode |
No DataMatrix/QR barcode found | Label has 2D barcode? Camera can see it? |
Missing UCC-128 barcode |
No Code128 barcode found | Label has UCC-128 barcode? Camera can see it? |
No matching RFID data |
No RFID tag in cache matching the 2D barcode | RFID reader connected? Tag on case? Tag in read zone? |
Invalid GS1 barcode format: {error} |
UCC-128 barcode could not be parsed as GS1 | Label printed correctly? Barcode damaged? |
Invalid GS1 barcode format |
UCC-128 parsed but missing required GTIN | Label printed correctly? |
GTIN mismatch: expected {X}, found {Y} |
Barcode GTIN does not match Matthews data | Wrong product on line? Matthews data correct? |
Expiration date mismatch: expected {X}, found {Y} |
Expiration date differs beyond tolerance | Label has wrong date? Matthews data updated? |
Common Failure Reasons and What to Check¶
| Symptom | Likely Cause | What to Do |
|---|---|---|
| Every case fails with "No matching RFID data" | RFID reader offline or not polling | Check RFID reader in diagnostics panel; verify it shows "Connected" |
| Every case fails with "Missing expected production data" | Matthews message not received | Verify Matthews system is sending data on port 60251 |
| Intermittent "No matching RFID data" | Tag passing through too fast, weak signal | Check RFID reader RSSI values in logs; consider adjusting RSSI threshold |
| GTIN mismatch errors | Production line changed product but Matthews data not updated | Verify Matthews sent updated production data |
| Expiration date mismatch | Date on label differs from Matthews by more than tolerance | Check if tolerance is configured correctly |
RFID Cache Behavior¶
The FX9600 RFID reader continuously reads tags and stores them in a cache with a 17-second expiration (configurable via TagExpirationSeconds). When validation runs, it searches this cache for a tag matching the 2D barcode.
If the log shows No matching RFID tag found for 2D barcode, it also lists common causes:
1. RFID tag not present on the case
2. Tag not in antenna read zone
3. Tag passed before the photo-eye trigger
4. Tag expired from cache (17-second timeout)
Export System¶
When validation passes, an export file is created using a priority chain:
- Mojix (if enabled) -- primary export target
- MWE (if enabled) -- secondary fallback
- AIS (if enabled) -- legacy fallback
Export files are placed in a todo/ folder and processed by a background thread. Successfully exported files move to processed/. Failed exports retry up to a configured maximum, then move to error/.
Troubleshooting Steps¶
- Check the diagnostics panel for hardware connection status.
- Look at the log file for entries with
[CARGILLRFID-VALIDATION]prefix. - Check
[RFID-DIAG]log entries for RFID reader status and tag counts. - If exports are failing, check
[MOJIX-EXPORT]or[CARGILLRFID-EXPORT]log entries. - Verify the Matthews TCP connection is active (production data must be present).
When to Escalate¶
- RFID reader shows disconnected and does not reconnect after application restart
- Matthews production data never arrives (TCP port 60251 issue)
- Export files accumulating in the
error/folder - GTIN or expiration mismatches occurring for correctly labeled products
- Application logs show
All hardware devices failed to initialize