Rtu master to temperature sensor rs485-usb

Topics about the Hardware of Revolution Pi
Post Reply
agro0305
Posts: 2
Joined: 01 Dec 2021, 19:12
Answers: 0

Rtu master to temperature sensor rs485-usb

Post 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.
giuseppe
KUNBUS
Posts: 91
Joined: 09 Mar 2022, 13:08
Answers: 0

Re: Rtu master to temperature sensor rs485-usb

Post by giuseppe »

Hello,

as I have interpreted your system, it looks like this:
4694.png
4694.png (18.33 KiB) Viewed 1532 times
can you check following steps:

  1. 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
  2. is the ModbusRTU master service running correctly?

    Code: Select all

    sudo systemctl status pimodbus-master.service
  3. is the slave connected correctly?
    4694_connect.png
    4694_connect.png (9.04 KiB) Viewed 1532 times
  4. is the master and the slave configured right?
    bautrate, stopbit, ...
Other tips:



Mit freundlichen Grüßen | Best regards
Giuseppe Pagano | Technical Support
Post Reply