I can see you are some of the way there, so forgive me for helping those that follow in the future and go back to basics.
Lets start at the start for doing peer to peer…
In controller 1, set controller 2’s IP address as an IO unit. (A real IO unit or generic, it does not matter for scratch pad use).
In controller 2, set controller 1’s IP address as an IO unit. (A real IO unit or generic, it does not matter for scratch pad use).
(Dont worry about modules, you just need them for their scratchpad areas).
In both strategies, setup each controller in the IO enabler chart so if they go off line, they will get back online automatically.
Ok, so now that each one can see the other, we are ready for the strategy to exchange data.
Open up doc 1703. You can do this from PAC Control, click on Help->Manuals-> Commands quick reference.
Go to page 5. It has the ‘I/O Unit- Scratch Pad’ command section.
As an example; Controller 1 will issue the command ‘Set I/O Unit Scratch Pad Float Element’ every (say) second.
When you pull up the command, you will see how it works.
You will be setting the I/O unit to be Controller 2. The index you will need to keep track of (perhaps make 0-99 controller 1 and 100-199 to be controller 2, just a thought) so you don’t use the same index twice.
It will come from a float variable (or an int if you use the int version of the command, or a string if you use the string version).
Put the status in a trash variable if you don’t care if it gets written to the other controller or not, or in a variable that you do a check of if you do care.
That’s all it takes for controller 1 to write a float var to controller 2.
In controller 2 you will have a chart that uses the command ‘Get I/O Unit Scratch Pad Float Element’, only here it will read it from itself, this way it will read the value that controller 1 wrote.
Done. The loop is complete.
Controller 1 writes it to controller 2, controller 2 reads it.
Reverse the whole thing for controller 2 to write to controller 1 and controller 1 reading itself to get the value.
Note that Opto has already defined the scratch pad area for you.
No better way to do this than to open up Pac Manager and click on Tools->Inspect.
Enter the IP address of either controller 1 or controller 2.
Once that data comes up, on the menu on the left, click on ‘Scratch Pad - > Floats’.
There you can see the whole scratch pad area, and the index for each element.
If your strategy is running those commands, you will see data in the matching elements.
Lets know how you get on.