This was no small task and so they brought in Testeract. Some of my engineering colleagues were able to get it working again but this time they did something slightly different. They used a hardware abstraction layer or HAL. Why did they do this? Because using a HAL meant that if anything else in the system went bad, they would be able to replace the bad device without having to rewrite the software. As systems are getting older and things are changing so rapidly, having a HAL can help you avoid a ton of downtime by making hardware much easier to change.
For example, if he had originally written his software with a HAL, they would have simply had to make sure the new hardware was part of the HAL and then change a configuration file. The hardest part of this is usually adding the new model (a subset of the device type - motion controller) to the HAL. However, adding a new model to the HAL takes a fraction of the time it would take to rewrite all of the software.
Moral of the story? Create you automated test systems with a HAL if you want to make them significantly more future-proof.