Hello Guest it is April 26, 2024, 07:44:38 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 - smurph

81
Mach4 Plugins / Re: XHC WB04 plugin
« on: September 30, 2021, 03:45:44 PM »
I just tested the latest build (4758) and it works in step mode.  So I must not have broken it like I thought.  It does show % instead of the increment and it always has.  That is the MPG's firmware, unfortunately.  It is a nice MPG, hardware wise, but the crappy firmware and their lack of support for Mach 4 is just plain awful. 

Thanks for the typo find.  There was a nut loose on my keyboard. :) 

Steve

82
Mach4 General Discussion / Re: activate script on button from script
« on: September 30, 2021, 01:37:16 PM »
I would use mc.mcCntlGetState(inst) over the #var.  The G code variables can be stale depending on what the interpreter is doing. 

This compiles fine:
Code: [Select]
function WaitForIdle()
    local inst = mc.mcGetInstance()
    local state = mc.mcCntlGetState(inst)
    if (state == mc.MC_STATE_IDLE) then
return true
    end
    return false
end

Steve

83
Mach4 Plugins / Re: XHC WB04 plugin
« on: September 30, 2021, 01:30:40 PM »
Go back a to say build 4746 and get the plugin out of that.  I was working on cont mode and didn't finish it for that dev build.

Steve

84
With a 3040 type machine, I assume that you need Step/Dir control.  I like the PMDX, ESS, Pokeys, and the HiCON controllers (in no particular order) for Step/Dir control.  They are all good controllers.  All of them will blow away what you have.  Pick one that fits your budget or machining preferences.  You will want to make sure whatever you pick can run your spindle drive.

Steve

85
Mach4 General Discussion / Re: Lua script for feeding OEE
« on: September 22, 2021, 03:48:51 PM »
Yes, LUA has access to the Mach API.  See the API documentations in the doc folder.  And Luasockets is provided in the modules directory.  Will it be easy?  Probably not unless you are a seasoned programmer.  You will have to learn a few things, be able to handle a fair amount of frustration, and be willing to read a lot of very dry programming manuals (the LUA manuals).

Steve

86
Mach4 Plugins / Re: Mach4 Plugin-Development
« on: September 22, 2021, 03:43:13 PM »
here you go
http://www.machsupport.com/ftp/Mach4/DevlopmentVersions/
Oh, you don't have to update to the latest Mach build to use the plugin.  Just install the latest build into a different directory (not installing any profiles) and just copy the mxXhcMpg files out of the plugins directory from the new build to your old build.  The plugin will be backward compatible with the older builds unless you are using a 10 year old build of Mach 4.  :) 

Steve

87
Mach4 General Discussion / Re: Mach4 Boss Probing Not Working
« on: September 21, 2021, 01:06:19 PM »
What happens if you manually run a G31 in MDI? 

Steve

88
Mach4 General Discussion / Re: Mach4 Boss Probing Not Working
« on: September 21, 2021, 01:47:59 AM »
That's a very good point about using G31 for all the moves with a probe. There must be some underlying set up issue then because as I said and as it came up in a few other threads recently that the set up moves in some of the probing routines werent working as it would do the pre probe moves and then spit an error when it never touched anything even though it wasnt meant to
What I think happens is the probe is too sensitive to machine vibration when moving in setup moves (usually faster moves than when probing for a surface).  Or noise on the probe input.  In any case, I would call it false triggers.  I see a lot of people trying to run mechanical probes on 3.3v or 5v. and that ALWAYS leads to false triggers.  Mechanical switches need more than logic level voltages to work properly.  That is why the machine tool voltage standard is 24v. 

My machine probes just fine using an old Renishaw MP3 on a 24v imput.  It only triggers when it hits something.

Steve

89
Mach4 General Discussion / Re: activate script on button from script
« on: September 21, 2021, 01:36:37 AM »
I did mention the module load file. 

In a file called MyToolbox.mcs in your profile's macros directory:
Code: [Select]
mt = require("MyToolboxModule") -- mt is the namespace by which you access the functions in the module.  Short for "My Toolbox". :)

There are several examples out here on the forum that use one file to load/require all modules that you want in the macro script environment.  But I like to put each require into their own separate file, named appropriately of course.  To me, it is a little more clear when you go looking at the stuff months from now.  :) 

Steve

90
Mach4 General Discussion / Re: activate script on button from script
« on: September 19, 2021, 02:47:26 PM »
Use mc.mcCntlSetLastError() to debug instead of wx.MessageBox().  That way you can see the history. 

Steve