Hello Guest it is April 18, 2024, 09:39:00 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dude1

621
Mach4 General Discussion / Re: tool height probing
« on: July 06, 2015, 05:34:15 PM »
well it`s still not quite right it comes up with this now

mcLua ERROR: Lua: Error while running chunk
[string "C:\Mach4Hobby\LuaExamples\m1005.mcs"]:27: bad argument #2 to 'tonumber' (base out of range)
stack traceback:
   [C]: in function 'tonumber'
   [string "C:\Mach4Hobby\LuaExamples\m1005.mcs"]:27: in function 'GetRegister'
   [string "C:\Mach4Hobby\LuaExamples\m1005.mcs"]:45: in function 'm1005'
   [string "C:\Mach4Hobby\LuaExamples\m1005.mcs"]:112: in main chunk


mcLua ERROR: Lua: Error while running chunk

I changed this

function GetRegister(regname, num)--Added the return type def param
      local rc;
      local inst = mc.mcGetInstance();
      local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s", regname));
      local ReturnValue = 0;
      if num == 1 then
         ReturnValue = tonumber(mc.mcRegGetValueString(hreg));
      else
         ReturnValue = mc.mcRegGetValueString(hreg);
      end
        return ReturnValue;
      end

back to this
function GetRegister(regname)
local inst = mc.mcGetInstance()
local hreg = mc.mcRegGetHandle(inst, string.format("iRegs0/%s", regname))
return mc.mcRegGetValueString(hreg)
end

and ran through fine but still with the no probe contact error

622
Mach4 General Discussion / Re: tool height probing
« on: July 06, 2015, 03:10:34 PM »
thanks scott that was a simple one

623
Mach4 General Discussion / Re: Line following (tracing)
« on: July 05, 2015, 03:14:56 PM »
that`s good to know BR549

624
Mach4 General Discussion / Re: Line following (tracing)
« on: July 05, 2015, 10:19:24 AM »
there are a lot of ways to do it trace is as accurate as the person doing it, a camera can be zoomed right into the line and used to find center of holes it`s all down to the budget there are a number of free one`s out there

625
you can set toggle buttons to do stuff on up and down click, change color, different wording, flash they are quite fun to play with you could have I am not homed, then have I am homed anything really.
but you wont to keep it as simple as possible if there is a function built in to the button or what ever use that save`s have to use code.

626
Mach4 General Discussion / Re: Custom DRO script
« on: July 03, 2015, 07:21:57 PM »
he will run in to the same problem I had SL with the laser zero while statement.

action, while, if, zero unless you can come up with a way around it I could not

627
Mach4 General Discussion / Re: tool height probing
« on: July 03, 2015, 03:10:35 AM »
I give up

628
to find what G is working  type it in to the MDI

629
Mach4 General Discussion / Re: Custom DRO script
« on: July 02, 2015, 09:53:58 PM »
you need to zero the dro using it`s name and a if statement

630
it`s name needs to be the same as the scr.GetProperty