The controller enable for the drive controller should only be assigned when the drive controller has been initialised and is thus ready for enable (ReadyToSwitchOn state).
The status bit 'AxisRef-Name.xAxisAvailable = True' signals that the drive controller can be enabled.
Hint:
It only makes sense to request the controller release of the drive controller if it is also ready for this.
Querying the status bit xAxisAvailable as a condition for the controller enable is therefore generally sensible, even without the function restriction described here.