<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://lamaplc.com/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>lamaPLC - automation:code</title>
        <description></description>
        <link>https://lamaplc.com/</link>
        <lastBuildDate>Thu, 07 May 2026 13:15:13 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://lamaplc.com/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>lamaPLC</title>
            <link>https://lamaplc.com/</link>
        </image>
        <item>
            <title>rp2040_eth_modul_modbus_tcp_example_1</title>
            <link>https://lamaplc.com/doku.php?id=automation:code:rp2040_eth_modul_modbus_tcp_example_1&amp;rev=1778094407&amp;do=diff</link>
            <description>lamaPLC: RP2040_ETH_Modul: Modbus TCP example

The RP2040 module has Ethernet integrated, which can be accessed via UART1. This code creates Modbus Holding registers on the module with contents from 1 to 10.



from machine import UART, Pin
import time

# --- Konfiguráció ---
uart1 = UART(1, baudrate=115200, tx=Pin(20), rx=Pin(21), timeout=50)

# Regiszterek inicializálása: 10 darab regiszter (index 0..9)
# Értékek: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
holding_registers = [i + 1 for i in range(10)]

pr…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 06 May 2026 19:06:47 +0000</pubDate>
        </item>
    </channel>
</rss>
