How to initialize the stepper driver with the encoder N channel
How can I use the encoder N channel to initialized X_ACTUAL of the stepper motor driver?
First set the encoder for correct interpretation of the N signal, as required by your encoder.
Set clr_once for a single initialization / latch of the encoder counter upon the next N event. Additionally set clr_enc_x to clear the encoder to 0.
In order to also set the actual motor position to 0, activate latch_x_act, too.
Stop the motor after detection of the encoder event and then subtract the latched position from x_actual.