Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: pbarratt on April 26, 2015, 02:03:32 PM
-
I've got G31 working with my probe. When I try to use G31.1, it still uses the same probe input although I have configured Mach4 to use a different input signal for Probe 1 which I assume is actually probe 2 as referenced in the online G Code manual, page 20, under Mach 4 Manuals.
If I try G31.2 or G31.3, I get no motion or DRO changes.
BTW, the old problem of MachGui not shutting down when Mach 4 is shut down has returned. True, I can stop it with the task manager but it's a bit of a PITA.
What is the status of G31.X in Mach 4?
Peter
-
Not sure the answer to your primary question, but MachGUI does not shut down when there is an unresolved G31. Mine does that too. Your options are to let the G31 finish or sometimes Reset, Enable/Disable takes care of it for me.
-
Thank you. I think you just answered both questions. G31.X is not working correctly and that causes the hangup with MachGUI on shutdown.
Peter
-
Support for the extended probe commands is motion plugin dependent. I'm not sure who supports them yet.
Steve.
-
Well shoot, we can code it without G31 theoretically I think. G31 just makes life easier on us by automatically storing the coordinates in a file upon contact, then retract and incrementally jog by say 0.001, move in a pattern by same amount until contact, write to file, retract and repeat unto ~= contact while moving across a user defined coordinate plane. How did Mr. Barker do his probing video on youtube with Mach4? Bet you he just coded a script for execution or maybe that's why we only see a short video clip...I'm near done with code for auto tool setting without using G31. Well that's my intent anyways. I know tool setting is just one point. But if you succeed in accurately reproducing that coordinate over so many instances then all is needed is just to expand the code for top of material across your table to produce a file. Then...import it to Solidworks or Rhino 5 for conversion, alterations, toolpath and back to Mach for production. I know, it's sounds easy but it's not.
-
its coming soon
-
Well shoot, we can code it without G31 theoretically I think. G31 just makes life easier on us by automatically storing the coordinates in a file upon contact, then retract and incrementally jog by say 0.001, move in a pattern by same amount until contact, write to file, retract and repeat unto ~= contact while moving across a user defined coordinate plane. How did Mr. Barker do his probing video on youtube with Mach4? Bet you he just coded a script for execution or maybe that's why we only see a short video clip...
Brian posted a probing script on the Yahoo group either yesterday or the day before.
-
Steve,
Thank you for the reply. I figured since G31 was working, the motion plugin was not at fault. Maybe it's a mapping issue.
20,000 Axes,
I'm not making a point cloud or setting tool heights.
daniellyall,
What's coming? G31.X support or what 20,000 Axes is trying to do?
ger21,
Can't see any recent related postings by Brian on the Yahoo group. Can you provide a pointer please?
Thanks all.
-
do a search for m400 and m401
I am not sure whats coming Brian said on yahoo group probing going to be added after hes finished lathe stuff
-
ger21,
Can't see any recent related postings by Brian on the Yahoo group. Can you provide a pointer please?
Thanks all.
The posts were about point cloud probing, titled Mach4 Swap Axis on 5/26.
-
I've been playing with the probing code posted by Brian on the Yahoo group. It works fine and you have control of how the data in the output file is formatted - comma separated, having XYZ prefix before the coordinates, omitting particular axis, etc. For your convenience, here is the orginal code Brian posted:
function M401()
inst = mc.mcGetInstance();
-- create the wxFrame window
mainframe = wx.wxFrame( wx.NULL, -- no parent
wx.wxID_ANY, -- whatever for wxWindow ID
"Mach4 Bolt Hole Wizard", -- frame caption
wx.wxDefaultPosition, -- place the frame in default position
wx.wxDefaultSize, -- default frame size
wx.wxDEFAULT_FRAME_STYLE ) -- use default frame styles
-- create a panel in the frame
panel = wx.wxPanel(mainframe, wx.wxID_ANY)--We are not going to show it but we need to have this to use the File dialog
local file = wx.wxFileDialog(panel, "Select Probe File", "", "", "Text files (*.txt)|*.txt|Tap files (*.tap)|*.tap",
wx.wxFD_SAVE,wx.wxDefaultPosition,wx.wxDefaultSize, "File Dialog" );
if(file:ShowModal() == wx.wxID_OK)then
local path = file:GetPath()
wx.wxMessageBox(tostring(path))
mc.mcCntlProbeFileOpen(inst, path, "X%.3AXIS_X Y%.3AXIS_Y Z%.3AXIS_Z \r\n", true);
end
end
if (mc.mcInEditor() == 1) then
M401()
end
You have to put it in a file and name it M401.mcs
To close the file, in a file named M400.mcs put this code:
function M400()
inst = mc.mcGetInstance();
mc.mcCntlProbeFileClose( inst );
end
if (mc.mcInEditor() == 1) then
M400()
end
Dan
-
This is actually pretty good. It demonstrates the following functions:
1. How to create a frame and panel for GUI purposes
2. How to open a file and define the input parameters when the file is appended
3. Tell the input of the probe where to go (ie, the file path above)
4. Close a file
What is not demonstrated is the code to actually move across a coordinate plane and collect the data. G01 moves in exact stop mode. This code uses the mc.Motion functions to interface with the core. I think G31/G31.X scripting is done by motion controller plugin OEM and the core because electrical latching signals on the PCB itself. I think we can code around this...specific code for your particular requirement.
We can use poppabear's switch case statement example or just use a signal table where the input would be high/low signals and a function call ie mc.MotionSetProbePos()...to emulate G31.X
-
just one thing M needs to be m