First of all, thanks to all of you, that forum is a great resource!!
Then..i need your help.. i'm trying to make Arduino Mega talk as MASTER with some Mitsubishi industrial stuff that implements Modbus RTU.
At the moment i'm just trying to make sure that my program works fine, so i'm developing it and trying to test it linking the serial output of the Arduino Mega to an rs232 usb port on another pc, and tryin to run some Modbus Slave simulator on it.
Well..i can see stuff going out from the serial but noone of the simulators i tried can read any correct input.
I tried using
GitHub - 4-20ma/ModbusMaster: Enlighten your Arduino to be a Modbus master.
I read the whole MOdbus specifications trying to figure it out but i can't.
So... is anyone so kind to post a surely working (even simple!) code that sees an Arduino as a master, commanding some slaves?
I'll try to put it on my arduino and run the same system i did with my code, so if the various slave simulators still won't work i'll know i have some other problem on my rig
Any idea/suggestion is welcome!
a question came to my mind while i was writing...... actually i connect the arduino 2560 board and the usb rs232 just using GND,TX and RX. Do i have to connect some other stuff for Read Enable/Write Enable even if i'm "simulating" it via rs232 and not on 485????