I am building a cnc foam cutter ( X and Y only) and I am using the PWM spindle output to control the wire current. At the moment the current tracks the spindle speed requested. I want to change that so that the current tracks the combined motion velocity vector and, via a lookup table (using HAL lincurve,) alters the wire current according to the velocity vector. Found the reference:

As the wire current is dependent upon the cut length, (ie the length of the foam block to be cut), the lookup table is generated for unit wire length and a factor, set by a slider in the Axis display, will multiply the lookup table output by the square root of the value on the slider (range 0 to 0.5).
I have generated custom HAL for Axis to set jog speed, but never generated a user entered variable via a slider.
Pointers to methodology for implementation would be appreciated.



Malcolm