The manuals for both the Nano-10 and the Fx1616-BA indicate that they should support up to a baud rate of 230.4kbps; however, I am unable to successfully communicate between them over 100k.
The Fx1616-BA COMM2 is connected to the Nano-10 COMM port with 18 AWG shielded twisted pair. They are less than 1 metre apart. I have tried both with and without 120 ohm terminating resistors, but at this distance, it really shouldn't make a difference.
Fx1616-BA Test Code (Simplified)
1st.Scan Init
---| |-----------------------{dCusF}
Clk:1.0s ReadSlave
---| |-----------------------{dCusF}
Init
----
SETBAUD 2,&H09
ReadSlave
---------
T = STATUS(21)
READMB2 12,8,64,DM[1],8
R = STATUS(2)
V = STATUS(21) - T
Nano-10 Test Code
1st.Scan Init
---| |-----------------------{dCusF}
Init
----
SETBAUD 1,&H09
This setup works perfectly fine at the default, at &H07 (56.7k), at &H08 (100k), but not at all at &H09 (115.2k) and &H0A (230.4k).
Statistics (100 samples per baud rate)
Baud Rate | Mean ReadSlave Time | Std Dev
==========+=====================+=========
38,400 | 17.59ms | 1.92ms
57,600 | 15.11ms | 1.99ms
100,000 | 12.77ms | 1.97ms
The ultimate goal in this is to minimize latency between the Fx1616-BA, which acts as the master and 3 Nano-10s along with a third party RS485 device that act as slaves. From the time the user pushes a button on the HMI that requires a change in the devices controlled by the Nano-10s, too much time is passing before the slave devices receive the command via Modbus RTU from the Fx1616-BA. Just as a note, we are working on other ways to optimize the speed (e.g., batching multiple WRITEMODBUS commands into a single WRITEMB2 command, etc.)
Any advice would be appreciated!