Cognex DataMan Camera¶
What It Is¶
The Cognex DataMan (models DM374 and DM375) is an industrial barcode reader that reads 1D and 2D barcodes on product cases as they pass on the conveyor. GateKeeper connects to the camera over TCP/IP and receives barcode data after each trigger.
Which Sites Use It¶
- Hormel Austin (2 cameras: Front + Side)
- Hormel Beloit (2 cameras: Front + Side)
- Hormel Barron (2 cameras: Front + Side, also control stack lights and reject via digital I/O)
- Cargill St. Clair
- Cargill Oil - Sidney, Gainesville, Fullerton
Connection Details¶
| Detail | Value |
|---|---|
| Protocol | TCP/IP |
| Default port | 23 (telnet) |
| Connection string format | CAMERA_IP:23 (e.g., 192.168.100.200:23) |
| GateKeeper role | Client -- GateKeeper connects TO the camera |
How to Tell If It Is Working¶
- Diagnostics panel: Camera shows "Connected" with a green indicator.
- LED on camera: The camera has indicator LEDs showing power and read status.
- Log message on startup:
Camera {name} initialized successfully at {IP}:23 - Manual trigger test: Use the "Trigger" button in the diagnostics panel. A successful read shows the barcode data.
Trigger Modes¶
The camera can be triggered in three ways (configured per-site):
| Mode | How It Works | Typical Use |
|---|---|---|
| Hardware | Photo-eye sensor wired to camera triggers it automatically | Production (most common) |
| Software | GateKeeper sends a TRIGGER command via TCP |
Testing, some setups |
| Manual | Operator presses button on camera or via DataMan Setup Tool | Testing only |
Data Modes¶
| Mode | How Barcode Data Is Received |
|---|---|
| Push | Camera sends data to GateKeeper via a TCP listener (port 3000). Camera must be configured to connect to GateKeeper's IP. |
| Poll | GateKeeper sends TRIGGER command and reads the response on port 23. |
Most production sites use Push mode with Hardware trigger.
Common Problems and Solutions¶
| Problem | Symptoms | Solution |
|---|---|---|
| Camera disconnected | Diagnostics shows red, log shows "Failed to connect to Cognex camera at {IP}:{Port}" | Check network cable, ping camera IP, verify camera has power |
| Camera not reading barcodes | Shows NOREAD in diagnostics |
Check camera alignment, clean lens, verify barcode is in view |
| Trigger not working | Log shows "Cannot trigger camera - not connected" | Verify camera connection first |
| Trigger timeout | Log shows "No response from camera after trigger" | Check trigger mode setting, verify photo-eye wiring |
| Stale data in buffer | Log shows "Drained {X} bytes of stale data from camera buffer" | Normal behavior (v1.8+) — stale data is automatically drained before every trigger. If seen frequently, photo-eye may be wired to camera trigger input |
| All validations fail on startup | First validations after idle period all fail, camera returns 0 barcodes | v1.8 fix: stale TCP buffer drain. Pre-v1.8: restart application. See cameras troubleshooting guide |
| Reconnection issues | Log shows "Failed to reconnect to camera {name}" | Power cycle the camera, check network |
Error Messages¶
| Error Message | What It Means |
|---|---|
Failed to connect to Cognex camera at {IP}:{Port} |
TCP connection to camera failed -- network or power issue |
Cannot trigger camera - not connected |
Trigger attempted but camera is offline |
Failed to send TRIGGER command to camera |
Connected but command failed to send |
No response from camera after trigger |
Camera did not respond within timeout |
Connection error during camera trigger - attempting reconnection |
Connection lost during operation, auto-reconnect starting |
Failed to reconnect to camera - trigger aborted |
Reconnection attempt failed |
Error sending command to camera: {Command} |
TCP communication error |
Barcode line has unexpected format (expected 6 CSV fields): {Line} |
Camera response format is wrong -- check camera configuration |
Reconnection Behavior¶
If the camera disconnects during a trigger operation, GateKeeper automatically: 1. Detects the connection loss 2. Attempts to reconnect using the stored connection string 3. If reconnected, retries the trigger once 4. If reconnection fails, the trigger is aborted
Hardware Trigger Gating¶
When validation is turned off, Cognex DataMan cameras can still flash and acquire images because the photo-eye is wired directly to the camera trigger input. Starting in v1.7+, GateKeeper automatically enables/disables the camera's hardware trigger via a comm script command:
- Start validation → Camera hardware trigger is enabled (camera fires on photo-eye)
- Stop validation → Camera hardware trigger is disabled (camera ignores photo-eye)
This requires the camera comm script to be updated to v1.2+. If the camera still has the older comm script, the enable/disable command is silently ignored (no error, camera behaves as before).
Stale TCP Buffer Drain (v1.8+)¶
When the photo-eye is wired to the camera's hardware trigger input, the camera can accumulate stale NOREAD responses in the TCP receive buffer while GateKeeper is idle. Starting in v1.8, GateKeeper automatically drains any stale data from the TCP buffer before every trigger, preventing startup validation failures.
- Log message:
"Drained {X} bytes of stale data from camera buffer"— this is healthy behavior - Combined with trigger gating (v1.7+), this provides belt-and-suspenders protection against stale data
Log messages to look for:
- Camera {name}: Hardware trigger ENABLED — trigger gating is working
- Camera {name}: Hardware trigger DISABLED — trigger gating is working
- Cannot set trigger enabled - camera {name} not connected — camera is offline
When to Escalate¶
- Camera LED shows no power (hardware issue)
- Camera is pingable but GateKeeper cannot connect (firmware/configuration issue)
- Camera reads barcodes in DataMan Setup Tool but not via GateKeeper
- Persistent "unexpected format" errors (camera output configuration changed)
- Camera keeps flashing after validation is stopped (comm script may need updating to v1.2)