+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Super Moderator mstjohn's Avatar
    Join Date
    May 2011
    Location
    Temecula, CA
    Posts
    769
    Blog Entries
    1

    Peer-to-Peer - how do YOU do it?

    I've been looking through various requests for Advanced Training and the requested topics are wide-ranging. One topic that comes up often is Peer-to-Peer where devices share information with each other.

    When the devices are controllers, the "how" varies from the older Factory Floor controllers (where peer-to-peer was much trickier, via TCP), to the recommended usage of our Scratch Pad commands in PAC Control as described in Chapter 10 of form 1700.

    There's also the option of doing Mirrored I/O (click that link to see a recent description in OptoNews), if you're sharing data between two brains.

    Any of you OptoForum users out there doing some form of sharing data between Opto 22 devices, either using the methods mentioned above, or something different?

    Do share!

    Thanks,
    Mary
    Last edited by mstjohn; August 9th, 2011 at 01:23 PM.

  2. #2
    Senior Geek ben orchard's Avatar
    Join Date
    Oct 2001
    Location
    Temecula
    Posts
    349
    Blog Entries
    1
    Mary,

    Our first attack at this topic was pretty crude, but it got the job done so well, that we left it in place for some years.
    (If I get some time we can dig into some of the more advanced ways we did this).

    In a nut shell we just ran a chart every three seconds and it just wrote the data into the scratch pad of the other unit (or itself depending on what we needed from that peer).
    Here is how it looks from the outside;

    Peer to peer 101

    In each block was the appropriate command "Set I/O Unit Scratch Pad Float Element".
    Floats, ints and strings..... as needed....
    We just had to keep track of what index had what values in it and make sure we did not double up on the index numbers.
    Not all that hard to do in the comments / text.

    At the other end, we just read that scratch pad index, and hey presto, peer to peer.

    So as you can see it was really simple, but it got the job done.

    Those commands made life soooooo much easier than when first tried it when the M4SENET-100 cards first came out and none of those commands existed in Factory Floor....but lets not drag up past horror stories (My first attempt at that chart bricked the LCM4 controller about 4-6 times before I figured out what I was doing wrong. The only way to get it back was to do a fail safe boot loader recovery....but I said that we were not going to drag up those old war stories!).

    So, yeah, peer-to-peer, how you all doing it?


    Ben.

  3. #3
    Super Moderator mstjohn's Avatar
    Join Date
    May 2011
    Location
    Temecula, CA
    Posts
    769
    Blog Entries
    1

    Now make your PC a "peer" too

    Here's the latest chapter to help make peer-to-peer even better--now your data can be stored in either:
    1. The "local" scratch pad area
    2. Another I/O Unit's scratch pad area
    3. Your PC running OptoMMP Server (New & very exciting)
    FYI - to allow my R1 to "see" this "Generic OptoMMP Device" running on my Windows 7 PC, I needed to turn off the Domain piece in my Windows Firewall.

    Check this out: neat-o!
    Name:  OptoMMPServer.jpg
Views: 207
Size:  20.1 KB

    Download this nifty server now: OptoMMP Server.
    -OptoMary
    Last edited by mstjohn; August 10th, 2011 at 08:46 AM. Reason: added link to download

  4. #4
    Super Moderator mstjohn's Avatar
    Join Date
    May 2011
    Location
    Temecula, CA
    Posts
    769
    Blog Entries
    1
    Here's another method of doing peer-to-peer, or connecting a groov to a Factory Floor controller!
    http://www.opto22.com/community/showthread.php?t=491

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts