Hi mk,
Since the PWM value is an incrementing value it isn't needed in the array so a simpler 1D array of doubles might be used. Here is ab uexample:
Code:
#include "KMotionDef.h"
double spindle_pwm[]={0,0,0,0,0,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
172.981068,306.17,315.544674,344.282368,373.545116,392.323716};
main()
{
int i=12;
printf("Index %d Value %f\n",i,spindle_pwm[i]);
}
Another problem has arisen, I will not create a new topic. I am setting up a new lathe. I set up both axes, they move good in Kmotion step response, from C code and manually in KMotionCNC. But when i try to use G code (like G0 X0 for example) nothing happened. Also I cant move manually by steps both from keyboard with Ctrl and from screen button. When pressed screen button appears message like "Soft Limit Actuator 103126 Limit 1000000 X+ Rapid Traverse Job Halted" although the limits are still very far away.
Post your Initialization C Program and all of your KMotionCNC Tool Setup Screens