Jump to content

New Project - Need COM advice


cmarcus

Recommended Posts

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.

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...