Hello Guest it is April 25, 2024, 07:08:51 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 - DazTheGas

221
Mach4 Videos / Re: Creating an M6 Toolchange in Mach4 (Part 3)
« on: May 01, 2017, 04:03:50 PM »
Thats quite a good point, since creating that script I have moved on to using vfd and spindle etc so it could do with a revamp. I see what I can muster up ;-)

DazTheGas

222
Mach4 General Discussion / Re: accessibility of lua functions?
« on: April 30, 2017, 01:45:08 PM »
You will need to declare your functions in the Screen_Load_Script this will make it available at all objects within the Gui except the Lua Panels

DazTheGas

223
Mach4 General Discussion / Re: List of Inputs and Outputs
« on: April 28, 2017, 05:09:00 PM »
Look in the Mach4Hobby docs directory at the Mach4CoreAPI.chm and look in the section for Signals.

DazTheGas

224
The Load GCode Action will already close any open gcode and toolpath thenload the new gcode and recreate the toolpath, so no other programming is required.

DazTheGas

225
Mach4 General Discussion / Re: mcCntlGcodeExecuteWait Inside a macro
« on: April 23, 2017, 03:37:17 AM »
I have mcCntlGcodeExecuteWait working in many macros, normaly an error in a macro will cause the macro to not be compiled at runtime, this in turn will mean that the m code will be skipped during operation.

DazTheGas

226
You may want to look at examples on the sigLib like the example in the Screen Load Script for mc.ISIG_INPUT1 / CycleStart, you can then create more to include your gcode with commands like

mc.mcCntlMdiExecute(inst, "G0G53X0Z0") or mc.mcCntlGcodeExecute(inst, "G0G53X0Z0")

For the feedrate you might want to check out the pokeys example for using an external pot  http://blog.poscope.com/mach4-tutorial-fro-using-analog-input/

DazTheGas

227
Mach4 General Discussion / Re: Simulate Probe Strike
« on: April 19, 2017, 04:41:36 PM »
Simulating a probe strike was very helpfull in designing some routines I done in lua without actually having to use my machine as a gineapig.

DazTheGas

228
Mach4 General Discussion / Re: Which is faster?
« on: April 16, 2017, 02:24:02 PM »
I would say both the same as they are both running from the core and the core.

DazTheGas

229
Mach4 General Discussion / Re: Screen load script question
« on: April 14, 2017, 05:48:36 PM »
So I have just read through this thread and puzzles me why you are trying to send the register name?? this will always stay the same if using the register plugin, you cannot change it.

In my own screen I use

Code: [Select]
function GetRegister(regname)
    local hreg = mc.mcRegGetHandle(inst, string.format("Custom_Gui/%s", regname))
    return mc.mcRegGetValueString(hreg)
end

function WriteRegister(regname, regvalue)
    local hreg = mc.mcRegGetHandle(inst, string.format("Custom_Gui/%s", regname))
    mc.mcRegSetValueString(hreg, tostring(regvalue))
end

so just change string.format("Custom_Gui/%s" to the reg you are using string.format("iRegs0/%s" and all should work fine

DazTheGas

230
Mach4 core will not allow you to home from an mcode,

DazTheGas