Hi all,
I am trying to connect RS485 devices to Neuron M203 over modbus rtu protocol.
I have started from raspbian kernel and then installed kernel modules from unipi repository: https://repo.unipi.technology/debian/
ending up with kernel:
Linux M203-sn21 5.10.17-v7+
then I can see the serial device in: "/dev/extcomm/0/0" ("/dev/ttyNS0")
However, when I switch in my minimal python script from existing serial interface connected to USB (USB<->RS458 converter) to the ttyNS0 device I get timeout error (No communication/answer). The TX light on Neutron blinks once when I send the request.
#!/usr/bin/env python3
import minimalmodbus
#instrument = minimalmodbus.Instrument('/dev/ttyUSB0', 1, minimalmodbus.MODE_RTU)
instrument = minimalmodbus.Instrument('/dev/ttyNS0', 1, minimalmodbus.MODE_RTU)
instrument.serial.baudrate=9600
instrument.serial.bytesize = 8
instrument.serial.parity = minimalmodbus.serial.PARITY_EVEN
PV = instrument.read_register(4096, 1)
print("PV: ", PV, "C")
in Evok I have added the setting for the UART Port:
Could you please advise me how to setup Neuron as a master for RS-485 communication?
Thanks,
Jaroslav