i have now gotten the controller on the BLDC controller to give out 5V dc between pin 2 and 7 on CN15..
that is a start.. i am working on getting it to run just using the wires like in the example i got from the manufacturer
i am also revisiting the old thread we had going..
Yes JP33 Pins 5,6, and 7 are the KSTEP Analog Output pins.
Apply KFLOP's +5V to JP33 pin 5.
Apply KFLOP's GND to JP33 pin 7 and also Spindle CN17 GND
Then JP33 Pin 6 will be a 0-5V signal that you can connect to the Spindle CN17 "Input".
Configure KMotionCNC | Tool Setup | M3-M9 | S = Exec Prog Thread=2 Var=1 <>\C Programs\KSTEP\KMotionCNC\Spindle_S_KStep.c
Check with a Voltmeter (DC Volts) to JP33 Pin6. Commanding in KMotionCNC MDI S100 should read about 1.0V, S250 should read about 2.5V, S400 should read about 4.0V. etc.
i did this with a small mod to it (did not know if i needed the "testfil.c" so i added it...
Code:
#include "testfil.c" <---- this is InitKStep4Axis.c with a tiny tweak to it
#include "KMotionDef.h"
#include "CorrectAnalogFunction.c"
#define RefVoltage 11.09f
main()
{
float V=5.0; <---- and by going from 1 to 19 i could achive 4,4V on JP33 pin6
FPGA(KAN_TRIG_REG)=4; // Mux PWM0 to JP7 Pin5 IO 44 for KSTEP
SetBitDirection(44,1); // define bit as an output
FPGA(IO_PWMS_PRESCALE) = 46; // divide clock by 46 (1.4 KHz)
FPGA(IO_PWMS+1) = 1; // Enable
FPGA(IO_PWMS) = CorrectAnalog(V/RefVoltage); // Set PWM
}
so now jp33 pin6 is outputting to max 90% of input i guess?
but i still don't know how to control the spindle from KmotionCNC.. when i push Start CC it does nothing
one more thing, now that i have found out that the BLDC motor is emitting 5V from pin 2, would the original wiring example be right? should we mix 2 different power sources like that?