Hello Guest it is October 26, 2025, 06:14:18 AM

Author Topic: Read and Write to Registers  (Read 374 times)

0 Members and 1 Guest are viewing this topic.

Read and Write to Registers
« 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?
Chad Byrd

Offline cncmagic

*
  •  113 113
  • what me worry? heck...it ain't my machine anyway
Re: Read and Write to Registers
« Reply #1 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 ::)
any semblance of information posted to anything remotely  close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds