Hello Guest it is April 26, 2024, 04:17:15 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

121
Mach4 General Discussion / Re: mcLua reference
« on: January 28, 2018, 06:35:02 AM »
You will find the API docs in the Mach4Hobby/Docs directory.

DazTheGas

122
Mach4 Plugins / Re: Plugin File extensions
« on: January 26, 2018, 05:45:30 PM »
Once the files are in the plugins directory then all you have to do is enable the plugin as it is already installed.

DazTheGas

123
I hate when something is right in front of you but cant see it!!!!!!

Try something like this, hell you have to press cycle start but still  ;D ;D

Code: [Select]
function m6()
local inst = mc.mcGetInstance()
local selectedtool = mc.mcToolGetSelected(inst)
local currenttool = mc.mcToolGetCurrent(inst)

if selectedtool == currenttool then
mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
else
        mc.mcCntlCycleStop(inst)
        wx.wxMessageBox("Please change tool and press Cycle Start\nAfter setting tool please RAISE Z Axis")
mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedtool) .. "   Previous Tool == " .. tostring(currenttool))
        mc.mcToolSetCurrent(inst, selectedtool)
end
end

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

After the cycle is stopped in the m6 mach is then in a jogable state, you can then jog around as much as you like. before pressing cycle start again you must put your Z at a safe hight.
I have only tried this on the sim so cannot say how it will go with variables or anything else.

DazTheGas

124
Mach4 Videos / Re: Mach4 and Coroutines
« on: January 22, 2018, 02:23:49 PM »
Hold that last "simple no" whilst I try something Chaoticone has suggested.

DazTheGas

125
When you click cycle start this sets the OSIG_RUNNING_GCODE signal to HIGH and also sets the OSIG_JOG_ENABLED signal to LOW preventing ANY jogging.

If you try and enable the OSIG_JOG_ENABLED whilst OSIG_RUNNING_GCODE is HIGH this can and more likely will crash the core and kill your part, there is a little extract from the api docs

Quote from: API Docs
The Mach core communicates with the outside world via a signal mechanism. All signals are "owned" by the core. The core drives output signals and input signals direct the core. This means that a user should never set an output signal and the core will never set an input signal.

So to answer the question, jogging should`nt be done or allowed

DazTheGas

126
Mach4 Videos / Re: Mach4 and Coroutines
« on: January 22, 2018, 03:30:59 AM »
Simple answer is no, the only way you can share data across 2 instances of lua is to use registers.

DazTheGas

127
Mach4 General Discussion / Re: Mach4 won't shut down
« on: January 19, 2018, 12:37:30 PM »
I think the first thing I would do is to create a new profile using the blank screen set then  close down mach4 and check that the core isnt still running, if all is ok then you know its nothing to do with xp then start adding what plugins you need 1 by 1 shuting down mach between each one until you get to the state of the core still running on shutdown. Its too easy to ignore the problem and manually force the core to shutdown. 9/10 times you can guarantee its a lua fault

DazTheGas

128
Mach4 General Discussion / Re: crash on starting edit mode
« on: January 18, 2018, 06:54:48 AM »
Out of curiosity what version of windows are you running??

DazTheGas

129
Mach4 General Discussion / Re: Lua Fails Me
« on: January 15, 2018, 11:42:27 AM »
Just had a quick look at code, are you using the load modules.mcs?? as there is a bit of code looking for a table at line 34 "rt.rtAudio("chord")"

DazTheGas

130
Mach4 Videos / Re: Creating an M6 Toolchange in Mach4 (Part 3)
« on: January 12, 2018, 02:21:37 AM »
Mach4 has come on a long way since making these videos and lots of new commands added, there will be an updated video soon on the way i now do it but still ask away  ;)

DazTheGas