Page 1 of 1

ATR144-ABC-T serial control using RS485 modbus RTU

Posted: 07/04/2024, 18:56
by Halsteads
Raspberry Pi 4 Model B with Zihatec RS485 hat connected to pins 6,7 on ATR144-ABC-T.

ATR144 parameters confirmed via front panel:
  • modbus slave: enabled
    slave address: 247
    baud: 19,200 bit/s
    serial port format: 8 bit, no parity, 1 stop bit
    serial delay: 5mS
I've written a bit of test code to try to establish communication with the ATR144:
WhatsApp Image 2024-04-07 at 17.15.22.jpeg
Running the code causes Tx LED to flash on the Pi Hat, confirming serial port is working correctly. However, as can be seen in screenshot, NoResponseError shows ATR144 is not responding.

I'm trying to read and write to what ATR144 manual (p35) refers to as Modbus Address 1200:
Screenshot 2024-04-07 at 17.53.53.png
I've tried various different modbus addresses but no response.

Any advice on setup or code would be appreciated. Thanks.

Re: ATR144-ABC-T serial control using RS485 modbus RTU

Posted: 08/04/2024, 9:52
by Pixsys tecnico 1
Hi,
first off all, try to only read the process value of the controller, so the register 1000.

Then, keep in mind this details:
- the registers are all Holding Registers, so the Modbus RTU function you have to use in the rPi for reading is FC-03
- accordingly to the code you are using, the register to be set could be 1000 or 41000
- modbus standards are different by 1 unit, so the register could be 999/1000/1001 (or 40999, 41000, 41001)

Please check also time-out in the master, try to set it to at least 500mS and remember to set the answer delay of the controller at about 5/10mS (and off course less than the time-out set in the master).

Re: ATR144-ABC-T serial control using RS485 modbus RTU

Posted: 08/04/2024, 12:46
by Halsteads
Thanks, I will continue to experiment with those details.

Incidentally, I'm using the ATR144's USB socket to provide power while experimenting. Would that affect its RS485 serial port's behaviour, or does it not matter whether unit is powered by USB or on pins 1&2?
Screenshot 2024-04-08 at 11.46.29.png

Re: ATR144-ABC-T serial control using RS485 modbus RTU

Posted: 08/04/2024, 14:19
by Pixsys tecnico 1
The USB open a virtualCOM port into the controller and supplies only some part of the internal circuit of the controller, so please supply it using terminals 1-2.

Re: ATR144-ABC-T serial control using RS485 modbus RTU

Posted: 08/04/2024, 17:46
by Halsteads
problem solved.

with ~230VAC on terminals 1,2 the RS485 serial port now works perfectly.

thank you!