The motor is with encoder, the encoder has 6 cables, which are 2 for the supply voltage of + 12V, 2 cables are the activation voltages of the encoder + 5V and 2 cables are the outputs of the encoder output A and output B. I already set some mach3 data, for example kernel speed is 35khz, engine outputs> spindle> step pin # 5 and dir pin # 4, input signals> index pin number # 15, timing pin number # 13, output signals> output # 1 pin number # 4 to activate the relay and pin number # 5 is used as output for the pwm, encoder / MPG'S> encoder 2> A-port # 15 and A-port # 13, the maximum rpm is 2300 and minimum 150, attach the screenshots of the mentioned values.