thanks for your reply....but this example not use protocol Modbus TCPYou should use Socket (Network library) + AsyncStreams (RandomAccessFile library):
I am not an expert in network communication.Did you install that protocoll on you windows machine (Network) as an extra protocoll? Otherwise it's just a TCP/IP socket connection. It's more about the data you send. But you should know that as you have a working VB program.
The Plc respond only with correct format of data send by TCP/IP Modbus send from PC (example read command)Follow Erel's example (see his post). The modbus device is listenling via TCP/IP to a special port. So try to connect to this port with the example code and send some data.
A few years ago, I implemented the ModBus protocol on PC under VB 6.0 and in C on an ARM microcontroller. From what I remember, you could reuse a lot of your VB6.0 code to make a B4A implementation using the AsyncStreams library. The most painstaking part is parsing and creating the messages, and that code will be largely the same.How can i communicate by Modbus TCP with my Plc on Android device?
I already make a program with Visual Basic 6 that communicate (read and write) with my Plc by Modbus TCP protocol.
But now i want upgrade and using Android device (smartphone or tablet)