Also remember that most mechanical brakes take time to release, you may need a timer or at least release the brake a couple of scans before energizing the motor so you don't build up too much start amperage/heat in the motor and/or wear on the brake.