<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Issues with Modbus Slave with Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/</id><updated>2025-03-09T06:10:42.216000Z</updated><subtitle>Recent posts to Issues with Modbus Slave with Raspberry Pi</subtitle><entry><title>Issues with Modbus Slave with Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/?limit=25#7ae7" rel="alternate"/><published>2025-03-09T06:10:42.216000Z</published><updated>2025-03-09T06:10:42.216000Z</updated><author><name>zdenekkrejci</name><uri>https://forge.codesys.com/u/zdenekkrejci/</uri></author><id>https://forge.codesys.comed213df4771a634256c209abe5304bc911007ed5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did you find out what was wrong? I have the same issue&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Issues with Modbus Slave with Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/?limit=25#fb8e" rel="alternate"/><published>2025-03-09T06:10:40.186000Z</published><updated>2025-03-09T06:10:40.186000Z</updated><author><name>zdenekkrejci</name><uri>https://forge.codesys.com/u/zdenekkrejci/</uri></author><id>https://forge.codesys.com832d75773177322cd284509d4ea9ef2cf63b006e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did you find out what was wrong? I have the same issue&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Issues with Modbus Slave with Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/?limit=25#bf9c/5a5c" rel="alternate"/><published>2024-07-11T09:59:13.307000Z</published><updated>2024-07-11T09:59:13.307000Z</updated><author><name>ahuckphin</name><uri>https://forge.codesys.com/u/ahuckphin/</uri></author><id>https://forge.codesys.com8719be9c9c4c8a073c20c5f42533761093355075</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;codesyscontrol_user.cfg&lt;/strong&gt;&lt;br/&gt;
&lt;span&gt;[SysCom]&lt;/span&gt;&lt;br/&gt;
Linux.Devicefile.1 = /dev/ttyUSB0&lt;br/&gt;
portnum:=COM.SysCom.SYS_COMPORT1;&lt;/p&gt;
&lt;p&gt;**parameters are used in the python-script **&lt;br/&gt;
method: "rtu"&lt;br/&gt;
port: "COM8"&lt;br/&gt;
baudrate: 9600&lt;br/&gt;
stopbits: 1&lt;br/&gt;
bytesize: 8&lt;br/&gt;
parity: 'N'&lt;br/&gt;
timeout: 1&lt;br/&gt;
register address for humidity: 0x000&lt;br/&gt;
register address for temperature: 0x001&lt;br/&gt;
unit ID: 1&lt;/p&gt;
&lt;p&gt;**parameteized in the modbus-master-comport **&lt;br/&gt;
see attached files &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Issues with Modbus Slave with Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/?limit=25#bf9c/415e" rel="alternate"/><published>2024-07-11T09:59:10.972000Z</published><updated>2024-07-11T09:59:10.972000Z</updated><author><name>ahuckphin</name><uri>https://forge.codesys.com/u/ahuckphin/</uri></author><id>https://forge.codesys.com4e5bdffd9ef263e809c0add61be166e189ce3963</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;codesyscontrol_user.cfg&lt;/strong&gt;&lt;br/&gt;
&lt;span&gt;[SysCom]&lt;/span&gt;&lt;br/&gt;
Linux.Devicefile.1 = /dev/ttyUSB0&lt;br/&gt;
portnum:=COM.SysCom.SYS_COMPORT1;&lt;/p&gt;
&lt;p&gt;**parameters are used in the python-script **&lt;br/&gt;
method: "rtu"&lt;br/&gt;
port: "COM8"&lt;br/&gt;
baudrate: 9600&lt;br/&gt;
stopbits: 1&lt;br/&gt;
bytesize: 8&lt;br/&gt;
parity: 'N'&lt;br/&gt;
timeout: 1&lt;br/&gt;
register address for humidity: 0x000&lt;br/&gt;
register address for temperature: 0x001&lt;br/&gt;
unit ID: 1&lt;/p&gt;
&lt;p&gt;**parameteized in the modbus-master-comport **&lt;br/&gt;
see attached files &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Issues with Modbus Slave with Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/?limit=25#bf9c" rel="alternate"/><published>2024-07-11T04:05:14.455000Z</published><updated>2024-07-11T04:05:14.455000Z</updated><author><name>nano</name><uri>https://forge.codesys.com/u/nano/</uri></author><id>https://forge.codesys.com868b32aea637cd62b9a8f93cdbcedbafbd68924e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;in the codesyscontrol.cfg or codesyscontrol_user.cfg you have to declare whoch comport-ports from runtime are used.&lt;/p&gt;
&lt;p&gt;please tell us how the comport is called in linux an post the codesyscontrol.cfg files&lt;/p&gt;
&lt;p&gt;also write down here, which parameters are used in the python-script and what is parameteized in the modbus-master-comport of your codesys-application.&lt;/p&gt;
&lt;p&gt;mostly the errors occurs in ine of these areas&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Issues with Modbus Slave with Raspberry Pi</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/b048a635e9/?limit=25#fd60" rel="alternate"/><published>2024-07-10T09:30:12.319000Z</published><updated>2024-07-10T09:30:12.319000Z</updated><author><name>ahuckphin</name><uri>https://forge.codesys.com/u/ahuckphin/</uri></author><id>https://forge.codesys.com7a85984cf2552f2fbc4803f973769bd6fc42cc8e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have a DFRobot RS485 temperature &amp;amp; humidity sensor (SEN0438) connected to my Raspberry Pi via a USB to RS485 adapter. I am able to connect and read the sensor data when running a python code locally. However in Codesys, I encounter this error "A bus error has occurred." and "There was no response in time".&lt;/p&gt;
&lt;p&gt;Could this be because of Modbus Server Channel and Modbus Server Init configuration on my part? &lt;/p&gt;
&lt;p&gt;Admittedly I am new to Codesys. To get to this stage, I:&lt;br/&gt;
1. added some lines to CODESYSControl_User.cfg&lt;br/&gt;
2. added "Modbus_COM" in Codesys and set "Serial Port Configuration" under "General"&lt;br/&gt;
3. added "Modbus_Master_COM_Port" in Codesys and checked transmission mode is set to "RTU"&lt;br/&gt;
4. added "Modbus_Slave_COM_Port" in Codesys and checked server address is set to 1 (also set 1 in my sensor)&lt;br/&gt;
5. added 1 channel and 1 init for "Modbus_Slave_COM_Port" under "Modbus Server Channel" and "Modbus Server Init"&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>