<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Codesys Modbus Comport</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8a45c56051/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8a45c56051/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/8a45c56051/</id><updated>2022-10-12T06:15:15.516000Z</updated><subtitle>Recent posts to Codesys Modbus Comport</subtitle><entry><title>Codesys Modbus Comport</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8a45c56051/?limit=25#de72/df66" rel="alternate"/><published>2022-10-12T06:15:15.516000Z</published><updated>2022-10-12T06:15:15.516000Z</updated><author><name>happychappy</name><uri>https://forge.codesys.com/u/happychappy/</uri></author><id>https://forge.codesys.com18fefb6ab47d2428ee61aa99ba68d89f145a14f9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;ol&gt;
&lt;li&gt;Exactly the same hardware setup on Ecockpit.&lt;/li&gt;
&lt;li&gt;the port is configured as RS485 via the PLC shell&lt;/li&gt;
&lt;li&gt;So there is a 120ohm resistor at the PLC and a 120 ohm resistor at the busend (between A and B). I also tried adding pull up and pull down resistors, since the wago Engineer advised me to try that since it is mentioned in the Wago manual on page 40.&lt;br/&gt;
&lt;a href="https://www.wago.com/wagoweb/documentation/750/eng_manu/coupler_controller/m07508212_xxxxxxxx_0en.pdf" rel="nofollow"&gt;https://www.wago.com/wagoweb/documentation/750/eng_manu/coupler_controller/m07508212_xxxxxxxx_0en.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I am also running shielded cable, and have tried to connect the shield to PE/GND only on the PLC side, then I tried to only connect it to PE/GND at the bus end. I have also tried connecting the shield on both the PLC and the bus end at the same time, but nothing solved the issue.&lt;/li&gt;
&lt;li&gt;I can also reproduce the issue with a a replacement PLC and replacement slave devices.&lt;/li&gt;
&lt;li&gt;Like i menntioned, the only way I can get completely rid of the errors is using a TCP to RS485 gateway in between or using Ecockpit&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;</summary></entry><entry><title>Codesys Modbus Comport</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8a45c56051/?limit=25#de72" rel="alternate"/><published>2022-10-11T18:59:14.640000Z</published><updated>2022-10-11T18:59:14.640000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.combb44199632e36f5bd061f3e4ae3c4da3f782f372</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;not really a clue -&lt;br/&gt;
if you use the exact same device (plc) and slaves and wiring this works like charm with Ecockpit (or is it a different application other slaves other pfc)&lt;br/&gt;
I just want to verify if it is physical problem on wiring or slaves.&lt;br/&gt;
For Modbus RTU and CODESYS you need to set RS485 in the plcshell, this is what you have already done?&lt;br/&gt;
What about the busend resitors on end of the line (last device)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Codesys Modbus Comport</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8a45c56051/?limit=25#d8d4" rel="alternate"/><published>2022-10-11T09:35:40.712000Z</published><updated>2022-10-11T09:35:40.712000Z</updated><author><name>happychappy</name><uri>https://forge.codesys.com/u/happychappy/</uri></author><id>https://forge.codesys.com323a13ef5f82969b057892d710b87c253f3e1329</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Brief background:&lt;br/&gt;
Hardware: Wago 750-8214&lt;br/&gt;
PLC Wago FW: 16-21&lt;br/&gt;
Codesys Runtime: V4.4&lt;br/&gt;
Modbus RTU&lt;/p&gt;
&lt;p&gt;I have a issue where I have a number of the same type of modbus slave device connected to my PLC, which is the master of the network. Between 1-10 hours, I would get a CRC or a Timeout Error report from the a random slave device in the device tree on the left hand side inside codesys,&lt;/p&gt;
&lt;p&gt;When I just use Wago Ecockpit as the runtime on the PLC, I do not experience any modbus issues on the network. &lt;/p&gt;
&lt;p&gt;The obvious difference between the 2 runtimes is the library that is being used for the communication. Wago has its own Library for modbus communication in e!Cockpit, and in codesys the library that I see being used by the device tree on the left hand side is 3S - Smart Software Solutions GmbH. &lt;/p&gt;
&lt;p&gt;I have contacted Wago about this problem, and they of course  they mentioned if it works on e!Cockpit then it must be a codesys issue.&lt;/p&gt;
&lt;p&gt;The only way I can get rid off the modbus CRC and timeouts inside codesys, is to configure the modbus communication as TCP, and then use a Modbus TCP to RTU gateway between the PLC and slave devices. This is not what I want to do.&lt;/p&gt;
&lt;p&gt;Is there any suggestions/recommendations on what I can try to do to get the Modbus RTU stable?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>