cmarcus Posted November 22, 2013 Report Posted November 22, 2013 Hello Everyone, I have a new project that would require me to integrate a V130 PLC into an existing .NET application. Basically I'll need to send a "recipe" to the PLC. This will involve setting a series of values (via serial) to a mix of MB's, and MI's. Then the PLC will run autonomously sending status information, and the .NET application will go into a listener mode and simply act as a terminal. So I'm kicking around the best method to do this, and would appreciate any advice on which would be the best method to go forward: Ideally I'd prefer to use the .NET driver, but I'm not sure it's best suited... Does the .NET driver support events? I would image this would require setting the .net driver off on a thread that simply polls a MB or series of MB's for a state change. The obvious approach is that I could use the PCOM protocol, but that would require a fair amount of coding, over the .NET driver. Another approach would be to simply use the protocol scan and send functions in visilogic and establish my own simple protocol for the back and forth. Are there any others options that would be well suited? Please note, I'd prefer to leave the system as it is today (PC <--(RS-232) ---> PLC). Any thoughts would be appreciated.
Saragani Posted November 25, 2013 Report Posted November 25, 2013 Well, the .Net driver does not support events. What kind of events you are expecting? The PLC does not notify the PC about values changes so you have to poll them each time and compare then to the previous values. Either way you will need to communicate with the PLC and request the values of tags. The .Net driver does it for you an a wrapped protocol, and it also splits reqests if they are too big for the Tx or the Rx
cmarcus Posted December 2, 2013 Author Report Posted December 2, 2013 Thank you Saragani, The events I'm looking for are indicators in an input state change. I wasn't sure if the .NET driver would do the polling for me or if I would have to build the loop. I was hoping it would do the polling for me with the option to have the loop either be blocking or non-blocking. The alternative that I was thinking about was to use the PLC's protocol send command in the ladder and have the PLC send the input status via the serial port. This way the .NET application just waits for a data received event on the COM port. I'll play with both methods and see which is best suited for this application. Thanks again, -Chris
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now