<div dir="ltr"><div dir="ltr">Please provide a link to the modbus library you use.<div><br></div><div>This is where I found the informationĀ I saw about RTU on RS-485 board</div><div><br></div><div><a href="https://www.arduino.cc/en/ArduinoModbus/ArduinoModbus" target="_blank">https://www.arduino.cc/en/ArduinoModbus/ArduinoModbus</a></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 26, 2020 at 11:11 AM John Vaughters via TriEmbed <<a href="mailto:triembed@triembed.org">triembed@triembed.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">oh, forgot to mention the Pi 3.3v Tx -> ard Rx is just accepted via threshold limits and therefore is just a direct connect.<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Monday, October 26, 2020, 11:08:57 AM EDT, John Vaughters via TriEmbed <<a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a>> wrote: <br>
<br>
<br>
<br>
<br>
<br>
Rodney,<br>
<br>
There are a number of modbus libraries out there, so I'm not sure which one you are referring to. Yes, when I said UART, I specifically meant TTL. I use a very simple voltage divider for the ard Tx -> Pi Rx with one resister value and 3 resistors. I think I have used both 10k and 1k ohms and parallel two resistors to get half the value and series the third resistor. This gives you a super simple interface to the arduino that is 5V -> 3.3 Pi. I use the 5V pin of the Pi to power the 5v pin of the arduino. GND common of course. I use the simple-modbus Library code and I hesitate to give you a link, because in doing a quick search, I am not sure which code I am currently using, but the concept of this library is to use a very minimal set of modbus functions with holding registers only. This can be used to gang bits into a single register for binary, if I remember correctly. Thinking from the top of my head, so check that. I think you will find a couple forks of the original simple-modbus. Then I pass it onto mbusd to convert it TCP. So the serial is MODBUS RTU and mbusd converts it to MODBUS TCP. <br>
<br>
What I like about this config and have been using it for a couple years is it is super reliable. UART being one of the oldest most reliable comms and MODBUS being one of the oldest most reliable industrial protocols, it makes for a a very reliable and recoverable from hard reboot combination. However, there are even more complete modbus libraries that I have used in the past, but simple-modbus, well..... is simple :)<br>
<br>
John Vaughters<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Monday, October 26, 2020, 10:23:19 AM EDT, Rodney Radford <<a href="mailto:ncgadgetry@gmail.com" target="_blank">ncgadgetry@gmail.com</a>> wrote: <br>
<br>
<br>
<br>
<br>
<br>
I have not used the modbus Arduino code before, but it does look interesting. However in reading the description they state it is designed to use with either their Ethernet shield or the RS485 shield, but I did not see anything on running it with just a standalone Arduino. If it is possible to just use the TTL serial port of the Arduino, that would be very nice, indeed.<br>
<br>
_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<br>
To post message: <a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a><br>
List info: <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" target="_blank">http://TriEmbed.org</a><br>
To unsubscribe, click link and send a blank message: mailto:<a href="mailto:unsubscribe-TriEmbed@bitser.net" target="_blank">unsubscribe-TriEmbed@bitser.net</a>?subject=unsubscribe<br>
<br>
<br>
_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<br>
To post message: <a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a><br>
List info: <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" target="_blank">http://TriEmbed.org</a><br>
To unsubscribe, click link and send a blank message: mailto:<a href="mailto:unsubscribe-TriEmbed@bitser.net" target="_blank">unsubscribe-TriEmbed@bitser.net</a>?subject=unsubscribe<br>
<br>
</blockquote></div>