<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to RS485 read failure</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8c1b5f65de/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8c1b5f65de/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/8c1b5f65de/</id><updated>2020-02-27T17:46:15.150000Z</updated><subtitle>Recent posts to RS485 read failure</subtitle><entry><title>RS485 read failure</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8c1b5f65de/?limit=25#02f4" rel="alternate"/><published>2020-02-27T17:46:15.150000Z</published><updated>2020-02-27T17:46:15.150000Z</updated><author><name>GiorgioT</name><uri>https://forge.codesys.com/u/giorgiot/</uri></author><id>https://forge.codesys.com153c42358cfd2524b19c95eab931b8bb5cf85e55</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi, it should be the right way. My BBB is the master wired with N. slaves along the bus.&lt;br/&gt;
Anyway i solved using a MAX13488E with AutoDirection Control.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>RS485 read failure</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8c1b5f65de/?limit=25#464a" rel="alternate"/><published>2020-02-27T17:46:14.119000Z</published><updated>2020-02-27T17:46:14.119000Z</updated><author><name>boldive</name><uri>https://forge.codesys.com/u/boldive/</uri></author><id>https://forge.codesys.combaeb0ee37a8e812eb9fd300b8b4138115fdf84ca</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;you have declared Modbus_Slave under Modbus_Master. Under one port it can be Master or Slave, not both. I am not sure it this is the right way to do it.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>RS485 read failure</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/8c1b5f65de/?limit=25#f3b3" rel="alternate"/><published>2020-02-27T17:46:11.123000Z</published><updated>2020-02-27T17:46:11.123000Z</updated><author><name>GiorgioT</name><uri>https://forge.codesys.com/u/giorgiot/</uri></author><id>https://forge.codesys.comad6f1c2018454cc5e40a2cff519cb26921bdf62a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm trying to communicate with a TOSHIBA inverter through RS485.&lt;br/&gt;
I use a SN75LBC184 (MAX485 equivalent) connected to RX/TX channels of the BBB through suitable 5v - 3.3v level shifters.&lt;br/&gt;
I decided to control the DE/RE pins of the MAX485 in hardware, without enabling RTS/CTS pins of the UART, by means of  NE555 as explained here:&lt;br/&gt;
&lt;a class="" href="http://www.mcmajan.com/mcmajanwpr/blog/2014/01/20/arduino-e-rs485/" rel="nofollow"&gt;http://www.mcmajan.com/mcmajanwpr/blog/2014/01/20/arduino-e-rs485/&lt;/a&gt;&lt;br/&gt;
Unfortunately, Codesys returns RESPONSE_WRONG_SLAVE (see attachment) even if i'm always able to write the registers and spin the motor. Moreover the read function occasionally works fine and i can read the registers but the most of the time the read fails.&lt;/p&gt;
&lt;p&gt;Then, i adapted the RS485 shield for Raspberry Pi : &lt;a class="" href="https://www.sparkfun.com/products/13706" rel="nofollow"&gt;https://www.sparkfun.com/products/13706&lt;/a&gt; to work with the BBB but i get the same exact results as above.&lt;/p&gt;
&lt;p&gt;I then tried that shield on a Raspberry Pi and I always read and wrote successfully all the registers.&lt;/p&gt;
&lt;p&gt;I also loaded the overlay BB-UART4-RS485-00A0 to control directly the MAX485 DE/RE pins through the P9.27 pin but it does not work either. I couldn't see any signal from P9.27 using an oscilloscope.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Screenshot (166).png" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2607"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>