Connecting the SICK SEC200 Ethernet Barcode Scanner Directly to a PC

The SICK SEC200 is an industrial barcode scanner available in USB and Ethernet variants. In a previous article I introduced the USB variant. This engineering brief completes the series by focusing on the Ethernet variant. Note that both SEC200 variants are configured using the SICK SOPAS engineering tool. The general configuration information will not be repeated here.

Featured Products


This article is part of the DigiKey Field Guide for Industrial Automation

Location: Understand It → Sensors
Difficulty: :wrench: Technician — difficulty levels explained
Author: Aaron Dahlen | MSEE | Senior Applications Engineer, DigiKey, Author bio.
Last update: 13 Sep 2026


Figure 1: Image of the SICK scanner and supporting cables.

Summary of Activity

  1. The SEC200 Ethernet cable was connected directly to PC’s Ethernet port.

  2. The SEC200 was powered via a 24 VDC source:

    • brown wire to 24 VDC
    • blue wire to return (negative)
  3. The PC was set to DHCP. Without the router the devices aligned to the local-link addresses:

    • PC: 169.254.254.137.
    • SEC200: 169.254.7.114

    Your addresses may differ. Refer to Figure 2.

  4. With no additional work, SOPAS recognized the SEC200.

  5. The SEC200 was configured using the same settings as described in the previous article.

  6. The Python script as shown in Listing 1 was used to communicate with the SEC200.

Figure 2: PC set to DHCP with the now successful SICK SOPAS in the background.

import socket

HOST = "169.254.7.114" # Your scanner IP address here
PORT = 2112

buffer = bytearray()

with socket.create_connection((HOST, PORT), timeout=10) as camera:
    print(f"Connected to {HOST}:{PORT}")
    print("Waiting for barcode scans...")

    camera.settimeout(None)

    while True:
        data = camera.recv(4096)

        if not data:
            print("SEC200 closed the connection.")
            break

        print("Raw data:", repr(data))
        buffer.extend(data)

        while True:
            start = buffer.find(b"\x02")

            if start < 0:
                buffer.clear()
                break

            if start > 0:
                del buffer[:start]

            end = buffer.find(b"\x03", 1)

            if end < 0:
                break  # Wait for the rest of this frame.

            frame = bytes(buffer[1:end])
            del buffer[:end + 1]

            message = frame.decode("utf-8", errors="replace")
            print("Decoded:", message)
            
# AI-Generated Code Notice: The preceding Python example was generated by ChatGPT. It is provided as an educational example and should be reviewed, tested, and validated for the intended application before use.

Listing 1: Rudimentary TCP/IP client used to connect to the SEC.

About this Author

Aaron Dahlen, LCDR USCG (Ret.), is a Senior Applications Engineer at DigiKey in Thief River Falls. His background in electronics and industrial automation was shaped by a 27-year military career as both technician and engineer, followed by over a decade of teaching.

Dahlen holds an MSEE from Minnesota State University, Mankato. He has taught in an ABET-accredited electrical engineering program, served as coordinator of an electronic engineering technology program, and instructed military technicians in component-level repair.

Today, he has returned to his home in northern Minnesota, completing a decades-long journey that began with a search for capacitors. Read his story here.