# Connecting the SICK SEC200 Ethernet Barcode Scanner Directly to a PC

**URL:** <https://forum.digikey.com/t/connecting-the-sick-sec200-ethernet-barcode-scanner-directly-to-a-pc/73445>\
**Category:** Industrial Automation and Control\
**Tags:** field-guides\
**Created:** [November 13, 2026, 9:37pm UTC](https://forum.digikey.com/t/connecting-the-sick-sec200-ethernet-barcode-scanner-directly-to-a-pc/73445 "2026-11-13T21:37:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![APDahlen](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/apdahlen/32/40191_2.png) [@APDahlen](https://forum.digikey.com/u/APDahlen)\
**Post date:** [November 13, 2026, 9:37pm UTC](https://forum.digikey.com/t/connecting-the-sick-sec200-ethernet-barcode-scanner-directly-to-a-pc/73445/1 "2026-11-13T21:37:28Z")

</div>

The SICK SEC200 is an industrial barcode scanner available in USB and Ethernet variants. In a [previous article](https://forum.digikey.com/t/reading-multiple-barcodes-from-the-sick-sec200-over-tcp-ip/72227) 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](https://www.sick.com/us/en/catalog/products/digital-services-and-software/engineering-tools/sopas-et/c/g584721). The general configuration information will not be repeated here.

## Featured Products

- [SICK SEC200 Ethernet variant](https://www.digikey.com/en/products/detail/sick-inc/1154592/29808258)
- [SICK M12, 4-pin, straight, D-coded to RJ45](https://www.digikey.com/en/products/detail/sick-inc/2106182/21746537)
- [SICK 2 m M12 cable with flying leads](https://www.digikey.com/en/products/detail/sick-inc/2095607/9380542?s=N4IgTCBcDaIIwA4FgLRgAwE4CsA2dA7CALoC%2BQA)

* * *

This article is part of the [DigiKey Field Guide for Industrial Automation](https://forum.digikey.com/t/field-guide-for-industrial-automation-and-control/65993)

**Location** : [Understand It](https://forum.digikey.com/t/field-guide-to-industrial-automation-and-control/65993#p-125826-understand-it-2) → Sensors  
**Difficulty** : 🔧 Technician — [difficulty levels explained](https://forum.digikey.com/t/difficulty-levels-used-industrial-control-field-guide/66209)  
**Author** : Aaron Dahlen | MSEE | Senior Applications Engineer, DigiKey, [Author bio](https://forum.digikey.com/u/apdahlen/summary).  
**Last update** : 13 Sep 2026

* * *

 ![Figure 1: Image of the SICK scanner and supporting cables.](https://global.discourse-cdn.com/digikey/original/3X/c/3/c3c5c8be5801c904a400fb6e3be01e307ff84dd7.jpeg)

**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:

3. The PC was set to DHCP. Without the router the devices aligned to the local-link addresses:

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

5. The SEC200 was configured using the same settings as described in the [previous article](https://forum.digikey.com/t/reading-multiple-barcodes-from-the-sick-sec200-over-tcp-ip/72227).

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.](https://global.discourse-cdn.com/digikey/original/3X/2/b/2b960282df236b41fd305f19137842d57ef18f58.png)

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

```auto
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.](https://forum.digikey.com/t/from-radios-to-microcontrollers-my-digikey-journey/57654)
