Hi swat cat,
Congrats!
The desired speed is passed into the variable configured for the S Action in KMotionCNC | Tool Setup. See the Spindle.c example that prints the RPM read from Var=0 as a 32-bit floating point value.
However it does include the SSO. Why wouldn't you want to include the SSO?Code:#include "KMotionDef.h" main() { float speed = *(float *)&persist.UserData[0]; // value stored is actually a float printf("Spindle Set to %f\n",speed); // print the desired speed }