Skip to content

Cargill St. Clair

Configuration Disclaimer: The configuration values shown here are based on repository reference files. Production configurations may differ. Always verify against the actual appsettings.json on the production machine.

Quick Reference

Field Value
Site Cargill -- St. Clair, MO
Validation Mode CargillRfid
Version v1.9
Config File appsettings-cargill-stclair.json
Controller Arduino Portenta H7 (TCP)

Hardware Inventory

Device Type Connection Address
Camera Cognex DataMan TCP 10.8.15.95:23
RFID Reader Zebra FX9600 TCP 10.8.15.96:5084
Controller Arduino Portenta H7 TCP 10.8.15.97:502
Data Source Matthews TCP TCP listener Port 60251

Arduino Pin Map

Pin Function
0 DeviceTrigger (photo-eye input)
0 MachineStop (output)
1 RejectSignal
2 Stack Light Green
3 Stack Light Yellow
4 Stack Light Red
5 Horn (StackLightAlarm)
6 SystemReady

RFID Reader Configuration

Setting Value
Model FX9600
Antenna Count 1
Power Level 27.0 dBm
Tag Expiration 17 seconds

Export Configuration

Export Enabled Endpoint
Mojix Yes https://chipotle.mojixretail.io/statemachine-epcis-events-input-rest/rest/events
MWE (MotionWorks) Yes http://10.4.212.84
AIS No (legacy fallback) Not configured

Export priority: Mojix first, then MWE, then AIS. First enabled service wins.

Normal Operating State

When everything is working correctly at St. Clair:

  • Screen: GateKeeper application shows "CargillRfid" validation mode. The status bar shows Camera, RFID, and Arduino all connected. The Matthews interface shows "Listening on port 60251."
  • Stack lights: Green light is ON during active validation. Lights are all OFF when validation is idle.
  • Data flow: The Matthews system sends production data (GTIN, expiration) to port 60251. Cases pass through the RFID antenna first, then under the camera.
  • Exports: Validation results are exported to Mojix automatically after each pass.

Validation Flow

  1. The Matthews system sends a TCP message to port 60251 with the current production run data: GTIN and expiration date offset.
  2. The application switches to CargillRfid mode and starts validation.
  3. A case passes through the RFID antenna (Zebra FX9600). The RFID tag is read and cached (tags expire after 17 seconds).
  4. The case continues to the camera (Cognex DataMan) which reads the GS1-128 barcode.
  5. The application performs 9 validation checks including: GTIN match, lot number match, expiration date match (with 1-day tolerance), RFID tag presence, and barcode-to-RFID correlation.
  6. PASS: Green inverse flash (lights briefly OFF then back ON), result exported to Mojix. FAIL: Red flash + horn, reject signal fires.

Common Issues

Matthews Connection Not Working

What you see: Validation mode doesn't switch to CargillRfid. No production data showing in the application.

What to check: - Is EnableMatthewsInterface set to true? (It is in the reference config.) - Is the Matthews system actually sending data to port 60251? - Check the application logs for "Matthews connection" messages. - If MatthewsAllowedIp is set, make sure the Matthews system's IP is allowed. An empty value means all IPs are accepted.

RFID Reader Not Reading Tags

What you see: Validations fail with "No matching RFID data" or RFID data is missing.

What to check: - Can you ping the RFID reader at 10.8.15.96? - Check the Diagnostics panel for RFID reader status. - Access the FX9600 web interface at http://10.8.15.96 to check its status and antenna connections. - Check that RFID tags are actually on the cases. - If the conveyor speed changed, the tag expiration time (17 seconds) may need adjustment.

Mojix Export Failing

What you see: Validations pass locally but data is not reaching Mojix.

What to check: - Check the application logs for HTTP errors related to Mojix. - Verify network connectivity from the GateKeeper machine to chipotle.mojixretail.io. - Check that the Mojix API key is correct (MojixApiKey in appsettings). - Look in the Mojix export folders: C:\gatekeeper\conveyor\data\mojix\todo\ (pending) and mojix\processed\ (completed) and mojix\error\ (failed).

MWE Export Issues

What you see: MWE export is enabled but data isn't reaching MotionWorks.

What to check: - MWE requires VPN or internal network connectivity to http://10.4.212.84. - Check the application logs for MWE-related errors. - Verify the MWE credentials (username/password in appsettings).

Version History at This Site

Version Date Notes
v1.9 2026-02-12 Upgraded from stclair-v0.121. Includes trigger gating, stale buffer drain, and JSON noise filtering.
stclair-v0.121 ~2026-01 Three-tier export routing (Mojix/MWE/AIS), SystemReady output.

Known Quirks

  • Reject is disabled in reference config: The reference config file has Reject.Enabled: false. Production may have it enabled -- verify on the actual machine.
  • Camera trigger mode is Software: Unlike Hormel sites, St. Clair uses software trigger with a 600ms timeout and 1300ms pre-trigger delay. This is because the photo-eye and camera timing are different at this site.
  • Export fallback chain: If Mojix goes down, you can switch to MWE or AIS by toggling the export flags in appsettings. This is a config-only change (restart required).
  • Three consecutive failures before stop: The FailuresBeforeStop is set to 3 (not 1 like some other sites), allowing more tolerance for intermittent issues.