derihermawan
Hallo,

I've created a project using openPLC and simulate that using factory io via modbusTCP. 
now, i want to read value from digital output, digital input, holding register and input register from openPLC using java's program. I'm using PLC4X library that support modbus TCP.
I've succesfully to connect with openPLC.
but when I read value from digital output , its always have false value.
the digital output address that i've called should be true when read by java program, because at the monitoring page in openPLC runtime it has a true value.
hopefully anyone able to help me to fix this problem.
Here's my slave config 
slaveconfig.png  and this is my java's code
java's code.png  hopefully anyone can help me to fix this problem.

Thank you
Reply 0 0
thiagoralves
I don’t speak Java, but I’m pretty sure you’re reading the wrong address. What coil address do you want to read?
Reply 0 0
derihermawan
Revised :
I try to do the same thing using scadaBR, the return value was same.  i called coil address start from 0 with 200 numbers of register. it should be there are some true value there. but the return value still false. I'm using port 502 , but when I'm using port 503 the value that return was right , I set port 503 for slave device that connected with factory IO. 
Reply 0 0
thiagoralves
If you want to read coils from a slave device check the address, you are doing it wrong. Coils of slave devices start on Modbus address 800
Reply 0 0
derihermawan
Thanks thiago, it works and solving my issue . I didn't know that coils of slave devices start on Modbus address 800. my java's program can read data correctly from openPLC now.
Reply 0 0
thiagoralves
https://openplc.discussion.community/post/mapping-modbus-ip-io-in-scadabr-with-slave-esp8266-10171059?pid=1308867207&highlight=major+minor
Reply 0 0
Reply