Skip to Content
On this page

Keyence SR-2000

Scan, status, reset and lock control for KEYENCE SR-2000 code readers.

Compatible devices and models

Device series / model examplesConnection requirements
SR-2000Enable the TCP control interface matching the commands used by this plugin. Check command port, trigger mode and response format. Check the command table before using another SR model.

Configure the reader in AutoID Network Navigator

This entry uses SR-2000 ASCII command communication. The gateway connects to the reader and sends queries or triggers. It does not use PLC D/DM registers or accept an outgoing TCP client connection from the reader.

  1. Connect power, Ethernet and the required I/O according to the reader manual. Connect the configuration PC to the same network, open AutoID Network Navigator, identify the reader by model/MAC/IP, and read its current configuration.
  2. Open Ethernet and assign the site’s fixed IP, subnet mask and gateway. The original SR-2000 manual window below uses 192.168.100.100/24, as does this example. Give the gateway host a different unused address in that subnet.

AutoID Network Navigator SR-2000 IP, subnet and gateway

  1. Under Table → Ethernet → Command communication, select TCP and check Port (Waiting). The default listening port is 9004. Enter the same port in the gateway if changed. Ethernet data (client) Remote IP/port settings describe a different connection direction. This plugin has no login credentials fields and requires a directly usable command interface.
  2. Use ASCII without an extra header, terminated by CR (0D). Do not append data length or a checksum. Send read data after reading completes so a trigger can return its barcode. Transfer the settings, then disconnect the configuration tool’s online connection.
  3. For RS-232C, use a SerialPort channel matching the actual RS-232C settings. Factory defaults are 115200 bps / 8 data bits / Even / 1 stop bit. Select communication method None, no header and CR terminator. Wire TX, RX and signal ground using the reader’s RS-232C pinout; RS-485 electrical levels are different.

AutoID Network Navigator serial parameters and CR framing without a handshake

The windows are from SR-2000 User’s Manual Rev.6.0. Page 47 lists the command listening settings; pages 75–77 describe serial, socket and command operation. Matching software is available from the KEYENCE reader support page .

Configure the gateway channel and device

Open Development configuration → Collection configuration and select Keyence SR-2000. For Ethernet, create a TcpClient channel with remote address 192.168.100.100:9004. Leave backup/bind addresses empty for a direct connection and SSL off. For serial communication, select SerialPort and match the actual COM port and serial parameters. See Collection configuration for shared fields.

SR-2000 TCP client and port 9004

Associate the saved channel and enable Allow method invocation. Save and enable the connected channel/device, then query the version and status to identify the target.

SR-2000 plugin and method invocation permission

Plugin properties

SR-2000 timeout, pre-frame delay and format properties

ParameterMeaning and setting
Read/write timeoutDefault 10000 ms. Barcode reading starts a read and waits for its result. Allow for exposure, decoding and data transmission timing. Check the port and CR framing first if status queries fail.
Pre-frame delayDefault 20 ms, a pause before each request. This is separate from exposure time and a periodic variable’s execution interval.
Retry countDefault 3, a shared scheduler property. Inspect each explicit command result; do not assume that every trigger is executed three times.
Read/write duty cycleDefault 3, minimum 1. The shared scheduler arranges one read after n writes. Use device/variable intervals to schedule periodic status methods.
Write priorityOff by default. Allows shared write scheduling to cancel a read; it does not turn barcode triggering into periodic reading.
Reverse string byte wordsOff by default. A register-string setting; barcode and status responses are decoded from ASCII directly.
Data orderDefault ABCD, also BADC/CDAB/DCBA. Does not reorder ASCII barcodes, ON/OFF text or NUM decimal counters.

Query status, then trigger one read

Select the device and open Protocol debugging. Query version, command status and error status. The version should identify SR-2000; CMDSTAT=none means no pending setting operation and ERRSTAT=none means no reader error.

Place a known test label, such as TGW-1234, in view, then execute Read barcode. This sends LON, starts reading and waits for barcode text. Compare the returned characters with the label, including leading zeroes, separators and any multiple-code formatting.

SR-2000 version, command status and barcode controls

This plugin has no ordinary register addresses, additional variable properties or register data types. For periodic monitoring, select a supported Special method on a variable. Do not enter LON, 9004 or KEYENCE as an ordinary register address.

For example, create ScannerVersion, select Read-only and the Read version special method, and use a 1000 ms interval. Open Field editor and confirm the argument-free method to fill [], then save; remove a previous DM register address. The value follows the method return type; the normal register Data type selector is disabled in this mode.

SR-2000 version method, argument-free configuration and interval

MethodParameters, result and use
ReadVersionAsyncNo parameters; returns a version String. Direct or periodic read.
ReadCommandStateAsyncNo parameters; returns a String such as none/wait/update. Direct or periodic read.
ReadErrorStateAsyncNo parameters; returns a String such as none/ip/over/plc for no error, duplicate IP, buffer overflow or PLC link error.
CheckInputAsyncnumber=1/2 identifies IN1/IN2. Returns Boolean: ON=true, OFF=false. Direct or periodic read.
ReadRecordAsyncNo parameters; returns an integer array in OK, NG, ERROR, STABLE, trigger-count order. Each counter is 0–65535. Power-off/RESET clears them; trigger-count overflow clears all counters.
ReadBarcodeAsyncNo parameters; sends LON and returns barcode String. Explicit call or variable write trigger, without periodic read binding.
SetOutputAsyncnumber=1/2/3 selects OUT1/2/3; value=true/false sends OUTON/OUTOFF. For variable writes, configure number and supply value through the write input.
ResetScannerAsyncNo parameters; sends RESET. The reader resets after its response and counters clear.
OpenIndicatorAsync / CloseIndicatorAsyncNo parameters; send AMON/AMOFF to control the reader pointer.
LockAsync / UnlockAsyncNo parameters; send LOCK/UNLOCK. LOCK prevents reading until unlocked.
ExecuteCommandAsynccommand contains one command and comma-separated parameters, such as INCHK,1. Explicit calls only. CR is appended automatically; do not include a literal \\r or multiple lines.

I/O and device control

On IO, enter terminal 1 and check the input against the wired IN1 signal. Output control uses the terminal number and target-value switch. Confirm the terminal’s purpose before applying it. Inputs are 1–2 and outputs 1–3; zero is not a valid terminal number.

SR-2000 terminal number and output target

Use Device control for reset, pointer and lock operations. A parameterless write-trigger method executes on each write; writing false does not cancel LON or reverse a reset. Control trigger counts upstream when an edge is required. The Raw command input accepts 1–1024 printable ASCII characters and appends CR; enter one command without a newline.

SR-2000 custom command and device controls

For no response, check the command listening port, serial settings, CR framing and configuration-tool connection. ER,...,00 means unknown command; 01 means wrong parameter count; 02/03 means parameter out of range; 20 means disallowed mode; 21 means buffer full; 23 indicates serial command access affected by the configuration tool. If version queries work but barcode reads time out, check the label, trigger mode, output timing and reader errors before repeating LON.