I am able to ping a device from the current gateway and switches when I transfer the device to another gateway or switch I am not able to ping or communicate. What could be the reason?
Simply, the question is: I am not able to transfer the data across the switches.
It sounds like the devices or switches are on different subnets. You will need to keep them on the same subnet in order to communicate or add routes to the new subnet when you move the equipment.