No, you should never unplug or plug in the pendant while the controller power is on.  Always power down the controller and wait a few seconds before installing or uninstalling any cables.

Check the owner's manual for the proper way to disconnect the Teach pendant when the controller is still power on.