Are there default values for each motor type ?

How do I make a program for a limit switch ?

Here is one way to do it if the positions are sent from outside - RS232/485.

Set Velocity and the new position from PC and when Input 7 is activated, the motor stops.

The motor will not continue in this direction until Position Register 8 is set to a value different from 1.

The program could be increased with a similar "subroutine" for negative a limit.