joshua1909
Hi,

I've got OpenPLC running on a Rpi, with a USB-connected Arduino Nano as a Modbus slave. I've got an analog sensor connected to A0 on the Arduino.

The connection looks like it works, the Rpi can see the Arduino, and from OpenPLC I can see values from the sensor connected to A0:
Capture.png 
I have tested a Modbus TCP scanner to try and read the values of the analog pin, but I can't read the Arduino pins. Am I missing something with this? Will OpenPLC on the Raspberry Pi expose the Input Registers of the Arduino through Modbus TCP? Or is there another way I can use ModbusTCP to get the analog values of the A0 pin on the Arduino?

Any tips or links would be appreciated.

Thank you
Reply 0 0
thiagoralves
You need to point your modbus scanner to Openplc (not arduino) and pay attention to the location. Your sensor is at IW100, so you’ll find it on openplc modbus input register 100
Reply 1 0
joshua1909
Thank you! I was scanning the OpenPLC IP address of the Raspberry Pi, but it didn't show any values in those registers (that I could see).
I realise I didn't offset the register I was scanning, seems to be showing in 30102

Cheers,
Josh
Reply 0 0
Reply