Hello Guest it is April 19, 2024, 12:46:07 PM

Author Topic: Spindle Override  (Read 1562 times)

0 Members and 1 Guest are viewing this topic.

Spindle Override
« on: May 01, 2018, 07:48:18 AM »
I have built a panel with a PoKey56E and several buttons, and 3 pots. I want to control Feed, Rapid and Spindle overrive.

The example in the PoKeys doc shows converting the analog reading for Feed and Rapid to a number between 0 and 100. It does not show an example for Spindle. I have found the spindle function requires a 0 to 1 number, not 0 to 100.

I suspect this is a bug?
Re: Spindle Override
« Reply #1 on: May 01, 2018, 08:21:26 AM »
Hey Ron,
Check this macro out.  It shows how to get and set the FRO, RRO, and SSO.  FRO and RRO return 0-250 and 0-100.  SSO returns 0.5-1.5

function m309()
local inst = mc.mcGetInstance()
local FRO = mc.mcCntlGetFRO(inst)--Returns:  0 - 250
local RRO = mc.mcCntlGetRRO(inst)--Returns:  0 - 100
local SSO = mc.mcSpindleGetOverride(inst)--Returns:  0.5 - 1.5

mc.mcCntlSetFRO(inst, 135)
mc.mcCntlSetRRO(inst, 75)
mc.mcSpindleSetOverride(inst, 1.2)

mc.mcCntlSetFRO(inst, 100)
mc.mcCntlSetRRO(inst, 100)
mc.mcSpindleSetOverride(inst, 1.0)


end --m309()

if (mc.mcInEditor() == 1) then
     m309 ()
end
Chad Byrd
Re: Spindle Override
« Reply #2 on: May 01, 2018, 02:17:07 PM »
Yes, that confirms my results that spindle takes a lower value than Feed and Rapid. In the API doc it looks like they take the same values. I see no reason for that, probably an original bug that wold break a lot of scripts now  if  it was changed.