KStep Hardware Info
Need to get up and running with KSTEP fast? View this high-level explanation of a basic KSTEP setup:
|Block Diagram of KSTEP||Board Layout|
|KStep Use and Settings||KSTEP Basics Tutorial|
KStep Analog Output for Spindle Control
KStep has an isolated Analog output that operates much like a 3 pin potentiometer POT) where some supply voltage is applied (+5V, +10V, or +12V and GND) and the output voltage can be commanded to a voltage between GND and the Supply. See the section "Optically isolated PWM to Analog Circuit" here.
Note a separate supply (or voltage from the Spindle Drive) should be used as the analog source in order to avoid defeating the isolation between the Spindle and other control logic.
Once connected the Example Program \C Progams\KStep\Spindle_S_Kstep.c can be configured to KMotionCNC's S Action on the Tool Setup | M0-30 page. Configure as Exec Prog with Var #1 and some unused Thread (ie #2).
At this point commanding an S word in GCode or in the MDI input such as:
should set a Voltage on the Analog Output to control the speed. The Spindle Override Slider should then also control the speed. You might confirm this with a voltmeter connected with the Black wire to the GND and the Red wire to the Analog Output.
To Scale the speed properly for your system adjust the factor in the Spindle_S_Kstep.c Program to an RPM value that your system runs when commanded ith the full Analog Voltage:
define RPM_FACTOR 500.0 // RPM for full duty cycle (max analog out)