Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Cbyrdtopper on October 23, 2025, 02:41:03 PM

Title: Read and Write to Registers
Post by: Cbyrdtopper on October 23, 2025, 02:41:03 PM
I'm using build 6417.  I cannot read or write to registers. 
--Reg Read/Write Test   
function m200()
local inst = mc.mcGetInstance()
local SpinRPM = mc.mcRegGetHandle(inst, "iRegs0/SpindleRPM")
local SpinRPMVal = mc.mcRegGetValue(SpinRPM)
mc.mcRegSetValue(SpinRPM, 50)
end--m200()

if (mc.mcInEditor() == 1) then
   m200()
end

I copied the path right from the regfile diagnostics to make sure I had the path correct. 
This is the same code I'm using on build 4162 and it is no longer working on this newer version.
I'm at a loss here, anyone else run into this issue?
Title: Re: Read and Write to Registers
Post by: cncmagic on October 23, 2025, 10:46:50 PM
I'm not sure what version I'm using but I'm not having any problems writing/reading to any of the registers. I'll check tomorrow and we can compare notes as it were... Bob ::)