<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to MODBUS RTU - how connect a meter to rpi 3</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/698ac83c72/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/698ac83c72/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/698ac83c72/</id><updated>2020-02-27T16:40:09.390000Z</updated><subtitle>Recent posts to MODBUS RTU - how connect a meter to rpi 3</subtitle><entry><title>MODBUS RTU - how connect a meter to rpi 3</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/698ac83c72/?limit=25#1cda" rel="alternate"/><published>2020-02-27T16:40:09.390000Z</published><updated>2020-02-27T16:40:09.390000Z</updated><author><name>John Martin</name><uri>https://forge.codesys.com/u/john-martin/</uri></author><id>https://forge.codesys.comf0001813f2166ed368efd5efba8ee63eeffd9125</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;szymon077 hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi, &lt;br/&gt;
I'd like to  connect energy meter with modbus rtu protol (3 pins, gnd, rx, tx) to rpi 3. Do I need to use usb to rs485 converter or can I do it by connection directly to gpio pins (gnd, tx, rx)? What is the next step in codesys if I'd like to read registers from my device? The rpi is master then and meter is a slave? Should I prepare (install, upgrade files etc.) rpi for this connection or it is enought to use Codesys? My rpi is connected with Codesys and it works with other in/out pins well. Thank you very much for your answers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;In my case, I use a USB-RS485 adapter connect directly to USB raspberry pi.&lt;br/&gt;
It is not necessary to upgrade anything.&lt;/p&gt;
&lt;p&gt;After connect USB adapter, use the command "dmesg" to check the port&lt;br/&gt;
in my case it reports: ttyUSB0&lt;/p&gt;
&lt;p&gt;so you need to add in /etc/CODESYSControl.cfg&lt;br/&gt;
(Attention you need to remove the 0 from USB0)&lt;/p&gt;
&lt;p&gt;&lt;span&gt;[SysCom]&lt;/span&gt;&lt;br/&gt;
Linux.Devicefile=/dev/ttyUSB&lt;/p&gt;
&lt;p&gt;And ...... voala !!!!!!!!&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="http://larraioz.com/wp-content/uploads/2016/10/larraioz_elektronika.jpg"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>MODBUS RTU - how connect a meter to rpi 3</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/698ac83c72/?limit=25#ef0b" rel="alternate"/><published>2020-02-27T16:40:08.491000Z</published><updated>2020-02-27T16:40:08.491000Z</updated><author><name>szymon077</name><uri>https://forge.codesys.com/u/szymon077/</uri></author><id>https://forge.codesys.com1add6c9d3e463bc187a8321df53b83a3d3e31859</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, &lt;/p&gt;
&lt;p&gt;I'd like to  connect energy meter with modbus rtu protol (3 pins, gnd, rx, tx) to rpi 3. Do I need to use usb to rs485 converter or can I do it by connection directly to gpio pins (gnd, tx, rx)? What is the next step in codesys if I'd like to read registers from my device? The rpi is master then and meter is a slave? Should I prepare (install, upgrade files etc.) rpi for this connection or it is enought to use Codesys? My rpi is connected with Codesys and it works with other in/out pins well. Thank you very much for your answers.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>