July 5th, 2011 05:29 PM
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?
Last edited by mstjohn; August 9th, 2011 at 02:23 PM.
July 8th, 2011 03:12 PM
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;
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?
August 9th, 2011 04:13 PM
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:
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.
- The "local" scratch pad area
- Another I/O Unit's scratch pad area
- Your PC running OptoMMP Server (New & very exciting)
Check this out: neat-o!
Download this nifty server now: OptoMMP Server.
Last edited by mstjohn; August 10th, 2011 at 09:46 AM.
Reason: added link to download
May 22nd, 2013 05:04 PM
Here's another method of doing peer-to-peer, or connecting a groov to a Factory Floor controller!