Page 1 of 1
Rtu master to temperature sensor rs485-usb
Posted: 22 Mar 2022, 16:30
by agro0305
I am having a problem to read values from my temperature and humidity sensor(XY md02--> http://www.sah.rs/media/sah/techdocs/xy-md02-manual.pdf) whish is attached to my ravpi core. I enable the modbus master and in pictory i add modbusRTU master. Device path is /dev/ttyUSB0, baudrate is 9600, patity None, data bits 8, stop bit 1. At extended data window i set up Slave adress 1, function code Read input registers, register adresse 0001, quantity of registers 1, action interval 1000, device value temperatura. In the manual of sensor the input register adresse for temperature is 0x0001 2 byte, and 0x0002 for humidity, read input register command is 0x04. When i type piTest -r temperatura i am getting zeroes (=0000 hex). any help please? thanks in advance.
Re: Rtu master to temperature sensor rs485-usb
Posted: 12 Apr 2022, 12:08
by giuseppe
Hello,
as I have interpreted your system, it looks like this:
- 4694.png (18.33 KiB) Viewed 2757 times
can you check following steps:
- is PiCtory config correct?
You can load the default PiCtory "Start-Config" and show if the ModbusRTU master is connected or visible
Likewise you can check the configuration of the ModbusRTU master in the following file:
Code: Select all
/var/www/revpi/pictory/projects/_config.rsc
- is the ModbusRTU master service running correctly?
Code: Select all
sudo systemctl status pimodbus-master.service
- is the slave connected correctly?
- 4694_connect.png (9.04 KiB) Viewed 2757 times
- is the master and the slave configured right?
bautrate, stopbit, ...
Other tips:
Mit freundlichen Grüßen | Best regards
Giuseppe Pagano | Technical Support