I am trying to communicate with a measuring device using python with PySerial. I have it hooked up to a USB to RS422 convertor by Waveshare. When I send data in the led lights up, but I get no response from the device.
import serial
import time
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate = 9600,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=1
)
print(ser.name)
print(ser.baudrate)
message = 'GETINFO'
message = message.encode('ascii')
ser.write(message)
#time.sleep(1)
read = ser.read(100)
print(read)
ser.close()
I think it must be something I am not understanding about RS422 communication.
I tried sending different messages and setting up the serial port in different ways but none have worked so far.