Rick16bit

MrPLC Member
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Rick16bit

  • Rank
    Hi, I am New!

Profile Information

  • Country Netherlands
  1. Communication between CP1L USB and .NET program

    Didn't hear about AdvancedHMI (just starting a Youtube video now). Sounds good! Might be an overkill for the simplistic needs we have so far, and I managed to talk with a CP1L using FINScommand, the serialport, and a RS232 cable. Don't know if its truly stabile yet, hopefully we can find out this friday when we put it to the test. But anyway, that sounds good! Got to play with it and see if/how it can help. Thanks!
  2. Communication between CP1L USB and .NET program

    Well, I did search the web multiple times about this matter, but the amount of terms and options is overwhelming for a newbie. Profibus, Toolbus, SYSMAC, FINS Command, RS232C, DDE, OPC, CX-Server, CX-Lite, CX-Compolet... And not to mention the billion different cables and pin lay-outs. Piece of a cake for experts, but a dense jungle for a guy like me. Finding the *right* stuff isn't easy if you don't know where to look for in the first place. Anyhow. thanks for pointing directions. That FINS command example sounds like what I need. In our case we don't have Ethernet modules. I guess that's just a matter of buying an expansion unit, but since its just a tiny application here, I was hoping the options we have right now, will do the job. The CP1L has a USB & RS232 "snap-in" module. The CJ1M has a RS232 and (no idea what its called!) it's programming port. In the meanwhile I found another (old) Serialport - FINS command based example. And it works (after trying several different cable pin assignments!). Now I wonder 2 things: - Polling; As far as I know, you have to request values when using FINS command ("read address x") I just need to know the state of a few digital inputs, and toggle a couple of digital outputs (basically the PLC is just an IO unit). This isn't really time critical, but the faster It's not really time critical, but the sooner I know digital inputX is on, the better. Do I have to poll many times per second ( I'd like the delay to be lower than 50 millisecs, thus 20 polls / second), or are there smarter methods, using FINS command? - Are there good reasons to chose Ethernet (or one of the other available ports) over a serial connection, in terms of stability? As explained, we already had a RS232 cable (using no protocol & TXD / RXD instructions), but it didn't work very well. I suspect the cable wasn't 100%, but it could just as well be Windows7 running on the IPC, the notorious System.IO.Net SerialPort component, a bad setting, or my own code. Ciao
  3. Dear reader, I'd like to read and write a couple of (CIO) addresses in a CP1L PLC. Basic stuff. The same must be done sooner or later on a CJ1M PLC as well by the way. First I tried to make use of the 2nd COMport, set the mode to RS232C in the PLC, and wrote a VB.NET program that connects using the SerialPort class. It worked...sort of, but unstable. To begin with, I had a hard time finding the right RS232 pin layouts - the ones in the Omron documentation didn't work. Now I can receive commands from the PLC, but sending commands back often doesn't work for unclear reasons. Whether its the PLC, the cable, the VS2008 SerialPort class or my program, I have no clue. What I really want is to get rid of the self produced "hobby" cables and use a more robust protocol. For example, is it possible to communicatie via the USB cable with my CP1L, using FINS command (or something else). Pretty much the same way as CX-programmer would communicatie with the PLC? Same question for CJ1M PLC's, though I'm using a different cable here (connecting via the Toolbus protocol & CN226 cable). There are various code snippets when googling, but they are often old, plus the variaty of articles, different cables, techniques and is overwhelming to pick directions. I also noticed several ActiveX libraries from OMRON are available on my computer that might be useful, but again I have no idea how to use them. Another way might be buying CX-Compolet maybe. But its quite expensive (for the basic stuff we need), plus I want to make sure it fits with our desires. Anyone experience with solid & simple communications between the CP1L (or CJ1M) and a PC?