Sign in to follow this  
Followers 0
khkertje

PLC -- vb 2005

4 posts in this topic

Hellow, I'm making for school a project that needs to read values from a plc, over the ethernet with a PC pogram that I need to make with vb 2005. The PLC has an ip adres and a port where he send his data (short values). Do you know how I can read that value on the ethernetnetwork with a program in vb 2005? Does somebody has some code that i can use for that? Bart

Share this post


Link to post
Share on other sites
Please specify the requirements in terms of PLC type (brand, model, etc). You could use a standard like OPC. Alternatively, Archie from PLCTalk is working on free VB libraries to communicate with AB PLCs. Not a lot of activity in the open source world, but you can always check out Sourceforge.net. http://www.plctalk.net/qanda/showthread.php?t=33836

Share this post


Link to post
Share on other sites
Hi, You have (at least) two problems. 1. This is the easy one, to send/receive data using VB2005 you will need to learn about socket programming. .NET has a framework that makes it fairly easy to send/receive data over ethernet. Use Google and the following search words: socket tcp .net 2. Now, the tricky part. You will need to know the protocol that the PLC supports. In some cases you can get a protocol specification from the manufacturer but I guess that most manufacturers does not want to share this information. What kind of PLC are you using? Even if you don't have the protocol you can try to "reverse engineer" the protocol. For an example, connect an OPC-server to the PLC and read a few words, see what telegrams that are sent/received and try to determine what datafields that contains e.g the address, number of words that you want to read etc. Also, most PLC's supports Modbus, maybe it's possible to configure the ethernet module to communicate using Modbus instead. Modbus is an "open" protocol and you can find the specification at www.modbus.org I hope this helps... //Supporter Edited by Supporter

Share this post


Link to post
Share on other sites
Hellow, I'm using an HPC V10. It's a plc from the belgium company ED&A If selected to use the modbus tcp protocol. That protocol uses port 502. Edited by khkertje

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0