I'm working on a BMS (Building managment system) using an UNO and MAX485 as the Master to talk with a RADA OUTLOOK shower. I followed Anthony Cartwright's tutorial for communicating with his solar inverter but adapted the code to talk with my OUTLOOK network box.
The baud rate for the OUTLOOK is 9600 in the manual. I set my serial monitor to 9600 but all i get is giberish in between my dashes. I've looked at other forums and they mostly indicate that the baud rate is wrong and is causing the issue. i've tried fix/repair in v1.8 but i'm currently the Arduino IDE 2.0.0. The OUTLOOK supports read holding register (0x03). and i'm atempting to get an outlet temperature (Register 31) in C. the dashes print out but it's just giberish in between.
Am i using Modbusmaster wrong?
Current pin out is:
MAX485 -
VCC - 5V,
GND - GND,
A - D+,
B - D-,
0V - GND
DI - TX,
DE - 3,
RE - 2,
RO, RX
The garbage is the binary modbus data. You are using the hardware serial port for both debugging and modbus. On an Uno, you can use a software serial port for your modbus comms.
Thank you for your quick response. I've finally had a look at the code and added a software serial port out of pins 10 & 11. i changed my modbus master to my software serial. my read out is a bit better and i feel i'm getting closer but still not there. Am i closer?
@markd833 i removed those lines and it didn't seem to have any effect other than it didn't break the program. so you were right that the serial library took care of the input/output
@pylon this is with Serial.println(node.getRsponeBuffer(0x000));:
Wow that's embarassing. Thank you @pylon, I'm getting different responses now. They don't seem correct but i do seem to have found a clock that is counting up at register 0x121. I'll mess around with this for a while. Thanks for all of your help everyone!