Hi Guys, I want to thank, and in no order,
dude1, joeaverage, DazTheGas, Chaoticone & smurf. You guys have all taken time to try and help with this perplexing task of expressing a percentage range for the Spindle Override. I was starting to get somewhat overwhelmed by all the different options, most of which I don't understand, but thanks for taking the time and for all the tips and links to learning resources.
I contacted Matevž at PoLabs, which I had been reluctant to do, as I had harassed him quite a lot already about the PoKeys57E. Anyway, as always he graciously came back with this.
Hi, Craig
Although the analog inputs are 12-bit, the analog input registers contain a value between 0 and 1.
To get the 50-150% range, simply use
local percent = 50 + 100 * analog
I don't think he was aware that for "mcSpindleSetOverride" the percentage must be expressed as a decimal. So this works perfectly.
local percent = 0.5 + 1.0 * analog. Now the slider obeys my every command.
This question goes out to DazTheGas. Even though both override sliders are now working well, there is a slight amount of shuddering or dithering happening with both sliders. They are not completely still. Only small, but it's there.
You mentioned that you weren't keen on calling the lua file from the PLC script, do you think this could be causing the small fluctuations? How would you take the same info that Matevž has given for the FRO and Spin OVR and perhaps follow the same method that you first applied but without using the table?
Thanks again guys, you have all been great and I hope that others can use this as well.
Craig.