Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: duritskiy on September 28, 2022, 09:32:46 AM

Title: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: duritskiy on September 28, 2022, 09:32:46 AM
Please add the ability to manually select modbus (serial-rtu rs485) baudrate . I am not satisfied with the maximum baudrate of 115200kbps and now I have to manually change the speed in Machine.ini.

USB FTDI rs485 Converter allows to increase the baudrate up to 1000000kbps
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: joeaverage on September 28, 2022, 05:01:44 PM
Hi,
does the MODBUS device to which you are connecting go that fast? The fastest setting I've ever seen on a MODBUS device is 115.2kbps no matter how fast the serial
link is.

Craig
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: duritskiy on September 29, 2022, 03:17:05 AM
my device is not standard - it can
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: duritskiy on September 29, 2022, 03:39:12 AM

As you can see, with a baudrate of 1000000 and also using a USB-RS485 converter (FTDI chip) I was able to read two read functions in 26ms - which equates to about 40Hz.

I am very pleased with the result.
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: duritskiy on September 29, 2022, 03:49:34 AM

Although at baud rate 115200 - the same read functions are read in 33ms.
Which is also very good.

All this thanks to the ftdi chip - it has the lowest latency among all USB-rs485 converters
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: joeaverage on September 29, 2022, 03:18:19 PM
Hi,
MODBUS is quite a versatile communication protocol and has a huge established base......but it was never a blindingly fast protocol.
If you want really fast low latency comms then Ethernet or better, EtherCat, is the answer.

Craig
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: KatzYaakov on September 30, 2022, 01:54:26 AM
why you think about speed with rs485?
rs485 its not close to be real time ,its can monitor the device or command the device but always with delay its not way to  interpolate  several axiss
or some thing like that,so speed ....9600 its more then need
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: smurph on September 30, 2022, 10:36:14 PM
The serial speeds are actually coming from the MODBUS library we use.  I'll ask them to see if they will make it customizable.

Steve
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: duritskiy on October 01, 2022, 03:58:02 AM
why you think about speed with rs485?
rs485 its not close to be real time ,its can monitor the device or command the device but always with delay its not way to  interpolate  several axiss
or some thing like that,so speed ....9600 its more then need

I work with what I have. And I have a breakout board for ESS SSM Ethernet, which includes STM32 as a port extension. And the connection between them is just rs485.
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: duritskiy on October 01, 2022, 04:02:48 AM
The serial speeds are actually coming from the MODBUS library we use.  I'll ask them to see if they will make it customizable.

There is a possibility to use non-standard baudrate.
I already use these settings now and it works.
[Machine.ini]
Baud=1000000
Title: Re: Serial-rtu Modbus baudrate up to 1000000kbps!
Post by: duritskiy on October 01, 2022, 04:11:35 AM
As far as I understand, modbus has not yet been brought to the ideal?
For example, it looks like the function
"Write multiple registers 32bit (0x10)" does not work in bit packing mode. And "Write multiple registers 16bit (0x10)" works.