Hi,
local inst=mc.mcGetInstance()
local analogRegHandle=mc.mcRegGetHandle(inst,'Analog input/PokeysCNC_41744/41')
if analogRegHandle==0 then
wx.wxMessageBox('Failed to find Register Handle')
else
local analogString=mc.mcRegGetValueString(analogRegHandle)
local percent= tonumber(analogString)*250
mc.mcCntlSetFRO(inst, percent)
end
Would this work?
Note I am not sure how the Pokeys registers are named, I am familiar with the ESS. I put a test in there so that if
a valid register handle is not found then the remainder of the code will not execute and crash Mach with an invalid handle.
Craig