I've read this statement online when it comes to driving the stepper motor "Do not connect or disconnect the stepper motor from the driver when energized" What does this exactly mean. And what will happen if I disconnect the stepper motor from the driver? How will this damage the motor drive?
When the current is flowing trough a winding, the inductance doesn't allow for a quick change in current flow. If you disconnect, then you break the current path, the winding will produce such high voltage until the current will continue to flow. Now the dielectric strength of airis 3kV/mm, so guess what happens with your electronic parts.