gasin
Hi,

I try to create project with Raspberri Pi and OPENPLC. I install OPENPLC and setup OPENPLC to communicate with slave device via modbusRTU. Everything work fine and i can see value from Monitoring page on OPENPLC webpages.

The problem was i use my PC to read this data from Raspberri+OPENPLC via ModbusTCP (on PC i use Modscan software). i can communicate with them but when i read data every data was 0.

i setup slave on OPENPLC with Discreate Input %IX100.0 - %IX100.7 and Coil %QX100.0 - %QX100.7. On PC i setup modscan to read data via modbustcp with function read input register address 1-8 and function read coil register address 1-8. And the reply from OPENPLC was 0 every address.

so, please suggest how can i read data from OPENPLC via modbustcp.

other question, when i setup slave device to OPENPLC with holding register %IW100. On Monitoring page cannot show analog value. i config type of variable on OPENPLCEditor to INT, WORD, UNIT but on Monitoring page stil show value 0. If i do something wrong, please suggest.

Thanks.
Quote 0 0
thiagoralves
Wrong address. Check the reference page on documentation about plc and Modbus addressing. %QX100.0 is Modbus coil 800, not 0. Also %IW100 is an Input Register, not Holding Register
Quote 0 0
gasin
thanks for your reply.

i've another question. if i want to use OPENPLC to read many from modbus slave devices via modbusRTU and i want  to read all slave devices via modbusTCP from OPENPLC, i can read all slave devices by create variable on OPENPLCEditor only. Not neccessary to create any ladder logic because i want to read data only.

if i want to do any function (such as input1=on then output1=on) then i must create ladder logic.

is it correct?

And i create slave device on openplc via webpage. i add holding register read address when i save and go back to slave device page, openplc will add holding register read address to input register. so i must read this data from modbusTCP by read input register intead of holding register as you mention, right?
Quote 0 0
thiagoralves
gasin wrote:

is it correct?

Yes
gasin wrote:

so i must read this data from modbusTCP by read input register intead of holding register as you mention, right?

Yes
Quote 0 0