Robodyn Arduino Mega w/ Eth not communicating with Acromag963en-4012 io expander

Hello all.
I am trying to connect a Robodyn Arduino Mega 2560 w Ethernet to a Acromag 963EN-4012.
I am trying to identify the Acromag so I can begin reading and writing registers.
Here is my code.

type or paste /*
  Ethernet Modbus TCP Client Toggle

  This sketch toggles the coil of a Modbus TCP server connected
  on and off every second.

  Circuit:
   - Any Arduino MKR Board
   - MKR ETH Shield

  created 16 July 2018
  by Sandeep Mistry
*/

#include <SPI.h>

#include <Ethernet.h>

#include <ArduinoRS485.h> // ArduinoModbus depends on the ArduinoRS485 library
#include <ArduinoModbus.h>

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
// The IP address will be dependent on your local network:
byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 1, 177);

EthernetClient ethClient;
ModbusTCPClient modbusTCPClient(ethClient);

IPAddress server(128,1,1,100); // update with the IP Address of your Modbus server

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  pinMode(7, OUTPUT );
  digitalWrite(7, HIGH);
  delay(3000);

  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);

  // Check for Ethernet hardware present
  if (Ethernet.hardwareStatus() == EthernetNoHardware) {
    Serial.println("Ethernet shield was not found.  Sorry, can't run without hardware. :(");
    while (true) {
      delay(1); // do nothing, no point running without Ethernet hardware
    }
  }
  if (Ethernet.linkStatus() == LinkOFF) {
    Serial.println("Ethernet cable is not connected.********************");
  }

}

void loop() {
  if(!modbusTCPClient.connected()) {
    // client not connected, start the Modbus TCP client
    Serial.println("Attempting to connect to Modbus TCP server");
    if (!modbusTCPClient.begin(server, 502)) {
      Serial.println("Modbus TCP Client failed to connect!");
    } else {
      Serial.println("Modbus TCP Client connected");
    }
  } 
  
  else {
    // client connected

    // write the value of 0x01, to the coil at address 0x00
    if (!modbusTCPClient.coilWrite(0x00, 0x01)) {
      Serial.print("Failed to write coil! ");
      Serial.println(modbusTCPClient.lastError());
    }

    // wait for 1 second
    delay(1000);

    // write the value of 0x00, to the coil at address 0x00
    if (!modbusTCPClient.coilWrite(0x00, 0x00)) {
      Serial.print("Failed to write coil! ");
      Serial.println(modbusTCPClient.lastError());
    }

    // wait for 1 second
    delay(1000);
  }
}code here

All I want to do is connect so I can begin using the Acromag.

My output to the serial monitor repeatedly writes
12:35:57.247 -> Modbus TCP Client failed to connect!
12:35:57.297 -> Attempting to connect to Modbus TCP server
12:35:58.276 -> Modbus TCP Client failed to connect!
12:35:58.276 -> Attempting to connect to Modbus TCP server
12:35:59.259 -> Modbus TCP Client failed to connect!
12:35:59.305 -> Attempting to connect to Modbus TCP server
12:36:00.288 -> Modbus TCP Client failed to connect!

Ant help would be greatly appreciated

Did you realize that the two IP addresses are in completely different networks? I don't know how your network is constructed but if you don't have an extremely odd network setup I would expect that to fail. 192.168.1.177 is in a private network while 128.1.1.100 is a publicly routed address owned by a company named Zenlayer Inc.
The Arduino Ethernet library uses a C-class network if not explicitly told otherwise, so your Arduino won't see the Acromag using this sketch.

Hey Thanks for the quick response pylon.
So I changed my arduino IP to 128.1.1.110 and the connection was successful.
Regards.

I would have changed the IP of the Acromag as you're most probably not the owner of the 128.1.1.0/24 network. Did you configure that strange IP to the Acromag?

It ships with that IP.
Unfortunately the LAN connection on my computer is not functioning.
In order to change the acromag IP, I need to plug it into my computers ethernet port.
I would then ping it with a web browser so I can change the IP.
That or I think I can Dynamically change it .
But right now my setup is Arduino->acromag. With just an ethernet crossover cable between them.

I will change it asap

In this case I must strongly advise against that device. A manufacturer doing such a no-go should go out of business immediately.

Just out of Curiosity. Why is the 128 ip a no no pylon?