Sign in to follow this  
Followers 0
TERdON

Omron PLC + compute with Visual studio?

8 posts in this topic

Hi, I'm currently working on a project evaluating the possibility using a usual PC as a central controller point, instead of using a top-of-the-line-CS1. What we basically want to do, is replace one huge, expensive CS1 with lots of small cheap CPM2C's (say in the range 10-20 PLCs at max, depending on installation), that more or less only handle I/O and very basic processing. All the heavy information processing the CS1 used to do, we would let the computer do instead (it's probably way to overpowered for that anyway!). The communications in this case would have to be over serial (don't think about the hardware, I have that piece of the puzzle already solved). As CPM2C only supports host link, pt link, 1:1 PLC link and no-protocol, I'm not sure how to best implement the communication. On the computer, I would like to be working with Visual Studio, preferrably C# but C++/VB will be quite okay to. I have a colleague that has done pretty much development in CX-Supervisor, and he thinks it won't cut it, btw, so that's out of the question already. I'm perfectly sure that it would be possible to do this by making a custom protocol (no-protocol) however I would rather not be debugging the thing for two weeks when it doesn't work as it should. :) Has anyone worked with a similar setup before? Is it possible to use CX-Server or something else to easily implement communications in the programs I develop myself in Visual Studio? Or would it be easier to implement a (more simplistic) protocol myself? I have looked in the Host Link Manual and it actually seems like overkill to me for the purpose - I basically just want to be able to exchange really short messages (< 32 bytes) or somehow else be able to edit contents of a few words in the PLCs. The host link would probably be a possible solution, just not one I'd take if there is a better alternative (IIRC we did similar things before with host link - that project wasn't finished anywhere near it should have, even though we used it between PLCs then) that doesn't require me to implement the protocol myself. The PLC program isn't written yet so it won't be a problem to put them out "nicely" if that's necessary. Basically - any feedback and thought is really welcome, even with other DEs and/or PLCs (I have aswell C200H*/CQM1* programming experience as computer programming experience, I just haven't done any development where I need to get both to work together).

Share this post


Link to post
Share on other sites
Hostlink is the way to go considering your decision to use CPM2C for the following reasons. 1. Hostlink supports up to 32 units by node address. 2. The only program you will have to maintain for communications is in the PC. All other solutions demand a seperate program in the PLC to handle the response (RXD-TXD.) 3. Hostlink offers many third part driver solutions although it is very easy to write for. If all your outputs are contingous in one register, the string will look as follows: @00WR0010FFFF42* See the following links at MrPLC.com Download section: Sysway(Hostlink) Demo Program w/VB Source Code @ MrPLC.com W143-E1-5 C Series Rack Mount Host Link Manual @ MrPLC.com

Share this post


Link to post
Share on other sites
1) Doesn't matter, probably I'm using separate ports anyway (!). I'll be using "serial device servers" (just google them) - they basically let you connect to their IP and a specific port and output it all over serial. So I won't need a bazillion serial ports in my PC anyway. :) 2) Good point. C# is better at those things than ladder... 3) Checked the code for the demo program, you seem to be right. I was mostly scared by our previous experiences with it... So, thanks for the info, at closer look it seems easier than I thought (but not really simple). It should be possible to make a decent solution out of it anyway if I get a few days or so (perhaps not complete solution but what I really need and not more than that). I do understand why it took time to implement it using a PLC, ugh! :)

Share this post


Link to post
Share on other sites
Do you already know which serial server you're going to use ? If not I recommend Moxa Nport DE311. Extremely easy to set up (basically only configure IP and port) and works with Omron PLCs. Affordable too.

Share this post


Link to post
Share on other sites
Thanks for the help, I was actually already looking into Moxa's product portfolio already in fact. We didn't end up with the one you're suggesting though, I ordered an NPort W2250 instead today. I didn't mention it, but the reason I'm using that instead is that we are primarilly looking into wireless device servers. We are intending to use them on moving robots, so the cat5e cable isn't really wanted... Hopefully, the W2250 is more or less as easy to use as the DE311. :) For Jay: I'm up and running with the programming since approximately 2-3 weeks, thanks for the info again. This is gonna be a cool project when finished... :)

Share this post


Link to post
Share on other sites
I tried to use this program sample you mentioned, and I get a ton of errors with it, and it never runs. Is there something special that I need to know about it? Also, is it supposed to be read only? I wanted to run it from the IDE, but it wont allow me to without saving a copy. EDIT: I managed to figure out how to get teh errors to stop. Unfortunately its still a read only program. Edited by ChrisKozanecki

Share this post


Link to post
Share on other sites
Yeah, the sample program is an old pre-.NET VB program and thus isn't editable in current Visual Studio versions without conversion work... If I get som time sometimes I could try to polish-up my test programs and put a C# sample on the forum as well - but for the time being, it's just to messy to show some one else. :)

Share this post


Link to post
Share on other sites
Yeah, I had to run it in VB6. The issue was that it didn't like the fact that my first 8 com ports were in use and I had to change which com ports it looked for.

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