I did some other tests by changing the baudrate, but nothing changed, I still get garbage.
I did also these other tests:
- if I disconnect both data+ and data-, then I get nothing
- if I swap the wire data+ with data-, then I get garbage, but the output is different
At the moment, this is my current wiring:
The sensor works at 24VDC, so the power supply is +24VDC and GND
Then, I connected data+ to the A+ pin on my usb to rs485 converter and data- from the sensor to the B- pin on the converter.
I also connected gnd from the power supply to GND on the converter.
So, in total, there are three wires from the sensor to the converter: data+, data- and GND.
Should I use a resistor?
The wire from the sensor to the converter are about 1.5 meters long.
The sensor is the Lambrecht u[sonic]WS6 sensor, it is a very expensive sensor (2000EUR) and from the manual it says that the standard connection is 19200, 8E1, address 5
I post here the rs485 description coming from the manual.