I took a quick look at the M580 Specs and see it does support EtherNet/IP. I’m going to assume that it supports Implicit Messaging (also called I/O messaging)…which is probably what you used on the ControlLogix. Then it would be a similar process to establish comms. You’d create a Generic Ethernet module for the M580 and input/output assemblies. On the S2 side it would also be the same as what you did before (create input/output assemblies, and use the scratchpad).
I noticed that the M580 also supports Modbus-TCP. So that’s another option. If it is a Master, then the S2 is a slave out of the box, and you can use our Modbus-TCP Protocol guide for addressing. If the M580 is a slave, then you’d need the Opto 22 Modbus Integration Kit to set up the S2 as a master.