Your job is to catch characters that print wrong: a missing stroke in a date code, a half-printed lot number, a smudged serial on a label. This guide sets up that check end to end with one smart camera: how many pixels each character needs, which light makes the print contrast, how the camera scores the print against a good sample, and how the pass/fail bit reaches your PLC. Every number is worked through a real example, a 2.5 mm laser-etched lot code on an aluminum bracket, so you can swap in your own character heights and field sizes and get your own answers. If your characters are codes rather than plain text, the same arithmetic sizes a code reader, and the last sections show when to pick which.
Can a smart camera check characters for errors without a PC?
Yes — one monochrome smart camera with an integrated or ring light looks at the print zone, scores every character against a golden template taught from a good part, and switches a pass/fail output your PLC reads like any other 24 V sensor signal, with no PC in the loop.
Four parts make the chain: a mono camera from the smart cameras range, a light chosen for the print, the character tool running inside the camera, and one discrete output back to the controller. The trade calls the check OCV, optical character verification: the camera compares each print zone against a pattern taught from a known-good part and fails it on broken strokes, missing characters, double prints, smudges, or drift in position or size. Reading what the string says is a second tool, OCR, and it earns its keep only when the string itself can be wrong — more on that split at the end.
The fastest first build is a smart camera with the light already on board. Both cameras below carry their own illumination, so a first station is camera, bracket, cable and one spare I/O point on the PLC.
- Interface
- GigE
- Resolution
- Up to 3 MP
- Interface
- GigE
- Resolution
- 5 MP
How many pixels does one character need?
Plan on at least 20 pixels across the character height and 2 to 3 pixels across each stroke: for a 2.5 mm character that means a scene resolution of 0.125 mm per pixel, which even a 1.3 MP camera beats on a field of view as small as a print zone.
The floor comes from what a stroke must survive: at 20 px of height a stroke lands 2-3 px wide, and the gaps that separate 6 from 5, or 8 from B, still resolve through mild focus error and blur. Slide towards 12 px and those pairs merge, so false accepts climb. Small fonts, and anything printed on a curve, deserve 25-30 px. The resolution and contrast fixes for confusable characters reach the same floor from the algorithm side.
Worked example, carried through this whole guide: characters 2.5 mm tall, print zone 40 × 12 mm, on an aluminum bracket.
- Scene resolution: 2.5 ÷ 20 = 0.125 mm/px.
- Add a 10% border for placement slack: field 44 × 13 mm, so minimum columns = 44 ÷ 0.125 = 352.
- A 1,280-column camera covers that field at 44 ÷ 1,280 = 0.034 mm/px, giving each character 2.5 ÷ 0.034 = 73 px, almost four times the floor.
Pixels are not the constraint in this example; contrast is. Cameras across the fixed code readers and smart-camera ranges all clear 352 columns.
Put a catalog camera in: the MV-SC5060XM-08M-WBN is a 6 MP mono smart camera with a fixed 8 mm lens. Assume the common 6 MP layout of 3072 × 2048 pixels on a 1/2.4"-format sensor about 5.5 mm wide, mounted 150 mm from the part:
- Magnification: m = 8 ÷ (150 - 8) = 0.056
- Field of view: 5.5 ÷ 0.056 = 98 mm wide
- Scene pixel: 98 ÷ 3072 = 0.032 mm/px
- Character height in the image: 2.5 ÷ 0.032 = 78 px
That is 3.9 times the floor, with a 98 mm field holding two zones or generous placement slack. Pull the working distance to 80 mm and m = 8 ÷ 72 = 0.111, so the field tightens to 5.5 ÷ 0.111 = 50 mm, the pixel to 0.016 mm/px, and the character rises to 155 px — the setting for seeing 0.05 mm defects. For plain verification, 150 mm wins on fixture clearance alone: a 0.1 mm broken stroke still spans 3 px.
Two optics numbers finish the sizing. Stop near f/4: diffraction blur in the scene runs 2.44 × 0.00055 mm × f-number ÷ m, about 0.10 mm at f/4 and m = 0.056 — a fifth of a stroke width — and f/8 doubles it. Depth of field, estimated as 2 × f-number × c × (1 + m) ÷ m² with c one scene pixel, comes to roughly ±40 mm at f/4 and 150 mm working distance, ±6 mm at 80 mm; either swallows normal bracket tolerance.
Decision: a 6 MP mono sensor with a fixed 8 mm lens covers this example with margin, and the same arithmetic sizes any camera for any character height.
- Interface
- GigE
- Resolution
- 6-10 MP
- Sensor format
- 1/2.4"
- Shutter
- Rolling
Run your own character height and field width through the calculator below before you shortlist anything.
Which light makes the characters stand out?
Match the light to how the mark was made: diffuse bright field from a ring or bar light for ink on labels, and low-angle dark field at about 20-30 degrees from the surface for laser etch and dot peen, whose marks scatter light the flat surface reflects away.
Ink works by absorption, so even coverage is the whole job; the enemy is sheen. A diffuse ring light or a pair of bar lights squared over the print keeps gloss labels readable, and a polarizer on the lens strips the rest. On a mono camera the light's color decides which ink goes dark: the light color and monochrome camera contrast guide walks that pairing, and the ring versus bar geometry guide settles the shape.
Etch and dot peen change the surface rather than its color. Light the part from 20-30 degrees above the plane: flat metal reflects the light away and the ablated marks scatter it back to the lens, so characters read bright on a black field — the strongest contrast you can get on bare metal.
A stopped part takes any exposure from 2 to 20 ms and either shutter type. A moving part budgets blur to under one pixel, so exposure ≤ pixel size ÷ speed: at the 0.125 mm design pixel on a 300 mm/s line that is 0.125 ÷ 300 = 0.4 ms, and the example's 0.032 mm pixel would need 0.032 ÷ 300 ≈ 0.1 ms. Strobe the light for the shot on fast lines and pick a global-shutter camera there; rolling shutter is fine on a stopped part.
How does the camera decide that a character is wrong?
You teach a golden template from a known-good part, the camera scores each print zone against that template, and the part fails when a score falls below a threshold set about 5 points under the worst good print you measured — typically 90 or better on a 0-100 scale after a clean teach.
Teach at the final geometry and final light: mount the camera where it will run, then capture 20-30 good parts spanning the real variation — a fresh ink lot, the part shifted a few pixels in every direction, line speed at both ends. Add about 10 known-bad prints: a missing stroke, a doubled print, a half-filled character, a smudge. Score all of them and read the two distributions; the golden template comparison guide shows the mechanics inside the camera.
Hold that margin: good prints clear the threshold by 5 or more points, bad prints miss it by 20 or more. When the gap shrinks below 5, the fix is light or focus, not the threshold — a threshold moved to cover weak contrast starts rejecting parts you ship. Keep the part located within a few pixels of the taught position, or give the tool a small search range; search costs cycle time, so a fixture is cheaper.
Scored this way the check catches broken, thickened or filled strokes, missing or extra characters, double prints, smudges, and drift in position or size. It cannot catch a different string that prints perfectly: a date from an unset wheel looks as good as the right one. When that is the feared defect, grade the print with the tools in the date code print quality inspection guide and read the string too — the last section sizes what reading demands.
How does the pass or fail signal reach the PLC?
Wire a 24 V trigger into the camera and a discrete pass/fail output back: the PLC fires the trigger, the camera answers in 30-100 ms with the result, and you hold that output at least 50 ms, or until the PLC's acknowledge input confirms the bit was read.
- The PLC raises a 24 V DC trigger input once the part sits in position and motion has settled.
- The camera grabs one frame and scores every zone, finishing 30-100 ms later on a 1-6 MP smart camera; measure the real number on your first shot and budget takt from it.
- The camera switches its pass and fail outputs and holds them at least 50 ms; with a fast PLC scan, an acknowledge input that lets the camera clear the result beats a fixed hold time.
- The PLC latches the result against the part ID and frees the station for the next part.
When the PLC needs the string, a recipe number or an archive image, move the exchange to Ethernet: the smart camera to PLC over TCP guide builds the socket handshake, and the pass-fail results, not images guide keeps the payload inside a scan cycle.
Smart camera or code reader: which one fits character verification?
Choose a smart camera when the job is print quality on a plain string; take a fixed code reader only when the mark is also a real barcode or DataMatrix, because a reader grades codes while a camera scores each character against a template.
| Build | Pick it when | Typical pixels | Trade-off |
|---|---|---|---|
| Smart camera with integrated light | Flat labels and caps, one zone, common fonts | up to 5 MP | Fixed lens and field; least to set up |
| Smart camera plus C-mount lens and separate light | Etched or embossed metal, characters under 2 mm | 5-9 MP | More parts; more alignment time |
| Fixed code reader | The mark doubles as a barcode or DataMatrix | 1.3-12 MP | Decodes and grades codes; lighter print-scoring tools |
| X86-platform smart camera | OCR plus verification plus many recipes | 8 MP and up | Heavier configuration to maintain |
A reader earns its place the day the same label carries a DataMatrix: it decodes, grades and hands the string to the PLC in one shot, where a camera would need two tools on one frame. The compact reader below pairs a 12 mm lens with a 1.3 MP sensor for close-range single-string fields.
- Interface
- Fast Ethernet
- Resolution
- Up to 3 MP
- Shutter
- Global
- Lens mount
- M12
Case decisions: flat label with a plain string — integrated-light smart camera; etched or embossed metal — mono C-mount camera with low-angle light; code plus string on one label — code reader; many recipes on one line — the X86 tier.
What do you check before ordering the parts?
Measure four things on the line first — character height in mm, print zone width in mm, the working distance you can physically mount, and whether the part stops or moves — then the arithmetic above sizes pixels, focal length and exposure before you order anything.
- Character height and zone, measured with calipers on the smallest font, not copied from the artwork: every downstream number scales from these two.
- Mountable working distance, with fixture blocks and gripper paths in place: the 150 mm in the example exists because a gripper swings under the lens.
- Stopped or moving, and the speed in mm/s: this sets the exposure budget and the shutter choice.
- A dozen good and bad sample prints under the planned light angle: contrast decides the station before the camera does.
- PLC side counted: one spare 24 V input, two output points or an Ethernet port, and scan time for the handshake.
- Changeover count: one stored template and threshold per recipe, recalled by job number.
Then filter the camera finder by the resolution and interface your numbers allow, and let the configurator below walk the light choice with you.
The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.
When is a template check the wrong tool for the characters?
Verification fails two ways: a wrong string that prints perfectly looks exactly like a good one, and a shiny or curved surface changes the print's appearance from part to part — the first needs OCR to read the text, the second a dome light before any template holds.
The split has names: OCV checks print quality, OCR reads content. When the feared defect is a well-printed wrong string — yesterday's date off an unset wheel, a lot number from the previous batch — add an OCR read and compare the string with the one the PLC expects, keeping the OCV score for print quality. The OCR versus OCV guide lays the two apart. Reading demands more pixels, 25-30 px per character, plus its own confidence threshold.
On glossy bottles or curved caps, print brightness shifts with each part's curvature. A diffuse dome light wraps the whole field in even light and flattens that variation before any template is taught; this is a lighting decision first, and the lighting guides collect the options by geometry.
OCR libraries, several tools per shot and long recipe lists want an open platform: the LS-SMC-0017 is an 8.8 MP global-shutter smart camera on the X86 platform, with a C-mount that takes the lens your field requires.
- Interface
- USB 2.0
- Resolution
- 6-10 MP
- Sensor format
- 1"
- Shutter
- Global
Final decisions for the exception cases: well-printed wrong strings — add OCR and compare against the expected string; curved or mirror-finish parts — dome or polarized light, then re-teach; characters under 1 mm or a long recipe list — the X86 tier with 8 MP and up. Send us your character height, field width and line speed and we will run the pixel, focal-length and exposure numbers with you before you order: start at the contact page, and the systems topic page collects the handshake and data-handling guides this one builds on.
Questions
Can one camera check two print zones on the same part?
Yes, as long as both zones fit one field of view with at least 20 pixels across each character height. Teach one golden template per zone and score them as two separate tools; the part fails if either score drops below threshold. If the zones sit on opposite faces of the part, fire two triggers rather than widening the field until the characters go soft.
What happens when the ink, font or part changes at changeover?
Re-teach, from stored recipes. Keep one golden template and one threshold per product, recall them with the job number the PLC already sends, and re-score 20 to 30 fresh good parts after every ink lot, font or surface change. A threshold tuned to yesterday's ink can sit within five points of today's good prints, exactly the margin your false-reject rate lives on.
Can the same camera check a barcode next to the characters?
Often, if one light serves both marks. Printed text and label barcodes both decode best under even diffuse bright field, so one ring light can run an OCV tool and a decode tool on the same frame. Dark-field rigs tuned for laser etch can starve a label code of light; when the code is the critical mark, a dedicated fixed code reader with its own optics reads faster and reports a grade.
How do I tell a vision fault apart from a real bad part?
Send three states, not two: pass, fail and no-result. Give the camera a heartbeat output that toggles a few times per second and let the PLC alarm when it stops; treat a missing result after a trigger as a station fault, not a reject. That keeps a smudged lens or a loose cable out of your defect statistics and out of your scrap bin.




