I have a RS232 device that sends data following the modbus protocol. I have problems communicating with it and I think my wiring is wrong. Since most modbus devices work over RS485 it is hard to find information about this.
This is the cable from the sensor:
I have an USB to RS232 converter and an RS232 cable. I stripped one side of the RS232 cable and attached the RXD, TXD and GND wires to corresponding wires of the sensor. following the this diagram:
The sensor is powered by an external 5v power supply. I don't get any communication going to the sensor. I have tried this by reversing the RXD and TXD and also on an raspberry pi with power for the sensor coming from the pi.
I have also tried using an RS485 to USB converter, I do get data this way but they don't make any sense following the modbus protocol, they seem random. I have used the minimalmodbus python module and serial test tools. The sensor is an Calex PyroCube S, according to the datasheet it uses a bout rate of 9600, Parity none and 2 stopbits. I think that the slave number is 1?