<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Codesys + Raspberry + Arduino via Modbus TCP</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/220552f201/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/220552f201/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/220552f201/</id><updated>2020-02-27T16:10:39.525000Z</updated><subtitle>Recent posts to Codesys + Raspberry + Arduino via Modbus TCP</subtitle><entry><title>Codesys + Raspberry + Arduino via Modbus TCP</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/220552f201/?limit=25#4316" rel="alternate"/><published>2020-02-27T16:10:39.525000Z</published><updated>2020-02-27T16:10:39.525000Z</updated><author><name>jru</name><uri>https://forge.codesys.com/u/jru/</uri></author><id>https://forge.codesys.com452295f53a8bece5eec26b6491d192d3b2fc7546</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hello juan, thanks for yours advice!&lt;/p&gt;
&lt;p&gt;for me, the solution was different.&lt;br/&gt;
I used the 28j60 ethernet shield model and there was a problem.&lt;/p&gt;
&lt;p&gt;I bought a classic shield Ethernet "Arduino Ethernet shield R3 with micro SD connector" &lt;br/&gt;
like this:&lt;br/&gt;
&lt;a class="" href="https://botland.com.pl/produkty-wycofane/1217-arduino-ethernet-shield-z-czytnikiem-kart-microsd.html" rel="nofollow"&gt;https://botland.com.pl/produkty-wycofan ... crosd.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and the connection worked!&lt;/p&gt;
&lt;p&gt;Settings:&lt;br/&gt;
for input register code 4&lt;br/&gt;
for register 100, enter offset 0x0064 in the channel&lt;/p&gt;
&lt;p&gt;The whole works perfectly with raspberry pi 3 B + &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codesys + Raspberry + Arduino via Modbus TCP</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/220552f201/?limit=25#3ad6" rel="alternate"/><published>2020-02-27T16:10:37.278000Z</published><updated>2020-02-27T16:10:37.278000Z</updated><author><name>juan356</name><uri>https://forge.codesys.com/u/juan356/</uri></author><id>https://forge.codesys.com943dce26e53fbdf5af863af59b658b22b6f281c8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello. I made the same like you but with MODBUS RTU using a max485 chip to convert ttl signals to rs485 standard (plug on pins 0, 1 and 2 on arduino pcb)and the usb port from the raspberry pi. It works very well.&lt;br/&gt;
Maybe you have a problem with the number of register to read. I think arduino can't stor on its buffer more than 64 words.&lt;br/&gt;
As I told you before, my system with four arduino hanging from a raspberry pi serial port works very well, even if I turn off any arduino pcb it continues working.&lt;br/&gt;
BR&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codesys + Raspberry + Arduino via Modbus TCP</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/220552f201/?limit=25#584f" rel="alternate"/><published>2020-02-27T16:10:36.460000Z</published><updated>2020-02-27T16:10:36.460000Z</updated><author><name>jru</name><uri>https://forge.codesys.com/u/jru/</uri></author><id>https://forge.codesys.com1e6d91bcff6a3b2e87685d5bddb6929d160db1fc</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everyone.&lt;br/&gt;
I encountered a problem reading the modbus TCP registers in Codesys.&lt;/p&gt;
&lt;p&gt;Registers are correctly read in eg. ModbusScanner, but in Codesys I can not read any values.&lt;/p&gt;
&lt;p&gt;I am trying to read eg. Input Register offset 100.&lt;/p&gt;
&lt;p&gt;Due to this difficulty I can not continue the project, I am asking you for help in configuring Codesys. What to do to read anything over Modbus TCP.&lt;/p&gt;
&lt;p&gt;I'm attaching a program file in Codesys and Arduino Uno with Ethernet Shield.&lt;/p&gt;
&lt;p&gt;Sample of code for Arduino:&lt;/p&gt;
&lt;p&gt;//Modbus Registers Offsets (0-9999)&lt;br/&gt;
const int SENSOR_IREG = 100; &lt;br/&gt;
//Used Pins&lt;br/&gt;
const int sensorPin = A0;&lt;/p&gt;
&lt;p&gt;I will be grateful for your help, greetings. !!!&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bez tytułu2.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3757"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bez tytułu.png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=3756"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=3755" rel="nofollow"&gt;RPI1_1.project &lt;span&gt;&lt;span&gt;[194.35 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=3754" rel="nofollow"&gt;RPI1_1.project &lt;span&gt;&lt;span&gt;[194.35 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>