A scan lands in the HMI field, the data sits there, and nothing commits until someone reaches over and presses Enter on the keyboard. The fix is neither in the barcode nor in the HMI: it is one setting inside the reader. Once you add the Enter suffix, every read sends its data followed by a carriage return, and a keyboard-wedge reader delivers that as the Enter key. This guide shows where the programming barcodes live, how to regenerate them when the printed card walks away, how to scan them in, and how to prove the result in a plain text editor before the reader goes on the machine.
What the Enter suffix actually is
Enter is the carriage return: ASCII 13, written in hex as 0D. Its neighbour, the line feed, is ASCII 10, hex 0A. The ASCII table maps every character a reader can send, and these two decide how a scan terminates.
Every scan leaves a reader as one frame: prefix, data, suffix. The Enter suffix appends 0D after the data, and the setting lives in the reader's memory — the programming barcode carries none of your data; it is a settings command. What the 0D becomes depends on the interface. In USB HID or keyboard-wedge mode the reader types the data and then presses Enter, exactly as a person would. On an RS-232 or USB serial link there is no Enter key at all: the suffix rides the stream as the byte 0x0D, and the receiving program must watch for it. If the wedge concept itself is new, using a USB scanner as a keyboard wedge into your HMI starts from the first cable. The frame layout is set out in prefix and suffix framing for scanner input, and what CR and LF characters do in an HMI text field takes the receiving side further. Where the HMI fires an action off the Enter key event itself, a walkthrough of catching a scanner's Enter key event shows one way to wire it.
Where the programming barcodes live
Three places, in the order most benches meet them.
The printed card in the box. Most industrial readers ship a quick-start or programming card with the Enter, Tab and restore-defaults barcodes on it. It is the fastest route and the first thing to disappear, so laminate it and tie it to the station.
The user guide's programming appendix. The chart at the back of the manual holds the suffix barcodes, usually grouped on a 'commonly used suffixes' page, and maker support sites publish a dedicated article for enabling a carriage return / line feed (Enter key) suffix on USB and keyboard-wedge readers. Searching the model together with 'Enter suffix' finds that page fast.
The setup utility. Connect the reader to a PC over USB, select the model, open the data-editing step, choose append Enter, and finish. The utility then writes the configuration straight to the reader or prints a programming sheet — which becomes the replacement card when the original is gone. Save the profile file too, so the next station can reuse it instead of rebuilding from scratch.
What you need
- The reader with its printed programming card or manual, or a PC with the maker's setup utility and a USB cable
- A plain text editor on the host machine, for the test that comes before any wiring
- A serial terminal that displays hex, if the reader talks RS-232 or USB serial
- Ten minutes at the bench rather than on the live line
Program the suffix
Both routes end the same way: the suffix slot holds 0D, and a test scan shows one line jump. If the reader can run as an HID keyboard or as a serial device, settle that first — HID keyboard mode or serial port on a PLC HMI compares the two — because the suffix turns into a keypress on one path and into a data byte on the other.
Route 1: scan the barcodes
- Find the Enter suffix barcode on the card or chart page. It usually sits beside the Tab and CR+LF options.
- Scan it, then wait about three seconds: readers save programming barcodes with a short delay, and some charts close the sequence with a Save or Exit barcode that you must scan as well.
- Multi-step charts follow the same pattern — clear any existing suffix, switch the suffix slot on, then key the character in. One widely used chart opens the character sequence with the digits 9 and 9, followed by the hex pair 0 then D for CR.
- Listen for the acceptance tone, then run the editor test in the next section before the reader goes near the HMI.
Route 2: build it in the setup utility
- Connect the reader over USB and select its model.
- Open the data-editing step and choose append Enter, or add a suffix and type the hex value 0D directly, which some utilities accept.
- Finish, then print the programming sheet as the replacement card or send the configuration straight to the reader over the cable.
- Save the profile file where the next engineer can find it, then test.
Mind the slot size: at least one widely used reader guide caps prefix and suffix at four characters each — enough for CR or CR+LF, not for a longer tag.
Worked example: CR suffix for a 13-character part number into an HMI IO field
Inputs, and where each comes from:
- Data: PRD-2025-0417 — a 13-character part number read off a production label
- Reader mode: USB keyboard wedge (HID), the standard workstation set-up
- Target: an HMI IO text field that commits its value when Enter arrives
- Prefix: none; suffix: CR, hex 0D, programmed as above
The rule in words: the wedge sends each data character as one keystroke, then sends the Enter keystroke, and the field commits the moment Enter lands. Over a serial link the same scan is a byte frame — prefix, then data, then suffix.
The commit lands on keystroke 14: the field takes all 13 characters and closes within the single scan, hands free. On the serial path the PLC receives 14 bytes and reads the trailing 0D as the terminator.
Decision: for an Enter-committing field, one CR is the complete suffix. Add LF and the frame grows to 13 + 2 = 15 bytes with Enter firing twice — on most HMIs the second terminator commits an empty value or pushes the cursor into the next field. Fit CR+LF only where the receiving side genuinely requires both bytes, and let the editor test judge it: one line jump per scan is correct, two jumps means the LF comes out.
Verify in a text editor before it touches the HMI
- Open a plain text editor on the host the reader will serve.
- Scan any test label once.
- Read the result: data on one line, cursor at the start of the next — exactly one jump. Two jumps means CR+LF is programmed and the LF has to go; no jump at all means the suffix did not take, so rescan the Enter barcode and check you were on the suffix page rather than the prefix page.
- For a serial or USB-CDC reader, open a terminal in hex display instead: a good scan ends with the data bytes followed by 0D.
Only after the editor test passes should the reader meet the screen. Wiring and screen-side behaviour is its own exercise — one end-to-end walkthrough of a programmed scanner feeding an HMI runs from cable to committed value. If the design needs a key before the data instead of after — a function key that opens the right screen, say — that is the mirror job, covered in sending a function key before the data.
Common mistakes
- Prefix and suffix pages look alike. A CR in the prefix slot commits an empty field first and leaves the text standing in the next one; the editor shows a blank line above the data. Fix: rescan from the suffix page.
- CR+LF double commit. The worked example's arithmetic predicts it, and one editor scan confirms it.
- Waiting for an Enter that serial will never send. A program reading the port like a keyboard waits forever; the receiver must treat 0D as the terminator. The serial-port framing guide for scanner data shows the wire format, and a scanner-to-PLC pinout example shows where the wires land.
- Keystrokes dropping on remote sessions. A wedge typing into an HMI over remote desktop sheds characters when the link hiccups; why scans drop over remote desktop explains the timing and the fixes.
- The card walked off. Regenerate it: the utility prints a fresh sheet for the exact model, which beats borrowing a card from a different reader family.
If you are specifying the hardware too
Every reader in the station needs the same suffix behaviour, so choose hardware that exposes prefix and suffix editing in its card or utility. For a bench or workstation, a handheld on USB covers it; the handheld code readers range runs from wired USB models to wireless ones. The LS-HCR-0001 is a 1.0 MP handheld reader on USB 2.0, the exact wedge case this guide programs.
- Resolution
- Up to 3 MP
- Shutter
- Global
- Interface
- USB
- Connection
- Wired
Fixed readers take the same idea to the line: set the suffix once in the reader's configuration, and every read leaves the port framed identically. The fixed code readers range spans compact USB units to Ethernet models; the LS-CRD-0047 reads at 60-120 mm over USB 2.0, so one suffix setting serves every scan at its station.
- Resolution
- Up to 3 MP
- Shutter
- Global
- Interface
- USB
For fixed line work, the MV-ID3013PM-12M-WBN pairs a 12 mm lens and 1.3 MP resolution with Fast Ethernet, sending the same framed reads straight down the wire to a PLC.
- Interface
- Fast Ethernet
- Resolution
- Up to 3 MP
- Shutter
- Global
- Lens mount
- M12
If the station is still on the drawing board, the code reader finder narrows both ranges by interface and mounting, and the code-reading topic page collects the rest of the integration fixes, from framing to parsing. When a suffix still refuses to behave after the editor test, talk to the applications team with the reader model, the target field and what the editor shows.
Questions
I lost the printed programming card. Where do I get the Enter barcode again?
Three sources: the user guide prints suffix barcodes in its programming appendix, the maker's support pages publish a dedicated 'enable carriage return / line feed (Enter key) suffix' barcode for USB and keyboard-wedge readers, and the setup utility rebuilds the sheet — select the model, choose append Enter, finish, print. Keep the replacement laminated at the station so the next engineer finds it.
Why does the HMI field commit twice after one scan?
The suffix is CR+LF (hex 0D 0A) and each terminator fires Enter. The text-editor test shows it immediately as two line jumps per scan. Re-program the suffix as CR alone: most IO fields commit on the carriage return, and the trailing LF only adds a second, empty commit. Utilities that accept typed hex make the fix a one-character edit.
I added the Enter suffix but the PLC serial port never sees an Enter. Why?
A serial link carries no keypresses. In USB HID or keyboard-wedge mode the reader sends the Enter key; in RS-232 or USB serial mode the suffix is the byte 0x0D appended to the data, and the receiving program must watch for that byte as the terminator. Confirm it with a serial terminal set to hex display before you blame the reader.
Can one scan fill two fields instead of committing one?
Yes — swap the suffix for Tab, hex 09. Tab moves focus to the next field without committing, so the first field holds the data and the cursor waits in the second. Most reader charts print a ready-made Tab suffix barcode on the same page as the Enter one; scan it, repeat the text-editor test, then try the two-field layout.
How many characters can a prefix or suffix hold?
Caps vary by reader family. At least one widely used laser reader's guide allows four characters per slot, which covers single terminators such as CR or CR+LF but not a longer tag. When you need more, build the format in the setup utility instead, because it manages the reader's data-editing settings directly and prints the result as one programming sheet.
Does the Enter suffix survive a wireless link?
Yes. The reader appends the suffix before it transmits, so the base station hands the host the data plus CR exactly as a wired reader would, whether the link is Bluetooth or another radio. Program it the same way, by barcode or utility, and run the text-editor test on the host machine rather than trusting the reader's good-scan tone.


