Visual Basic with Winsock to read/Write from/to Device


Thread Starter

Khue Tran

We developed a Visual Basic application to read/write from/to the Modbus PLC and it works great! Thank you for the VB sample in your Web!
Then we found that the PLC has to read/write from/to the devices, the VB application has to wait for the PLC and it seems double works, so we want to read/write direct from/to the device. We modify the application to break in more read/write times for each function number using the first word as the function number, and it does not work!. Maybe the syntax must be different
because when we send data to Winsock we receive an error "Wrong protocol ..." but the state of the Winsock is "Connected". If you can tell me it's possible to read/write from/to the devices, could you help me with the syntax to create the data to send to winsock (a VB sample is perfect!)
Thank you very much
Khue Tran