Hello Guest it is February 19, 2020, 04:53:19 AM

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

11
Mach4 General Discussion / Re: MACH4 HOW TO DISABLE 1 AXIS
« on: February 02, 2020, 02:48:20 PM »
You can also use a different profile.  One with the 4 the axis enabled and another one with it disabled.  Then just launch with the desired profile.  No scripting needed.  :)

Steve

12
mc.mcCntlSetRRO(inst, percent)

Put a global RRO control variable in your screen laod script

masterRRO = 0 -- let 0 equal the normal state where the potentiometer controls both the FRO and RRO.

Then in a button left up event script for the 25% button:

inst = mc.mcGetInstance()
local rc = mc.mcCntlSetRRO(inst, 25);
if (rc ~= mc.MERROR_NOERROR) then
    mc.mcCntlSetLastError(inst, "RRO to 25% failed!!!")
end
masterRRO = 25 -- set the global variable.

Now, you will probably have to do some work in whatever code evaluates your potentiometer and make it NOT adjust the rapid rate override while one of your % buttons is in effect.  Test for masterRRO == 0 for normal FRO/RRO operation and masterRRO ~= 0 for keeping the pot from affecting RRO. 

Steve

13
We have a Mori at the shop that threads all day every day.  Threading is a motion controller dependent function.  For Mach, we treat G32 moves (the basis for all threading ops) as a regular feed moves.  But we mark them so that the motion controller can sync them with the spindle.  There is nothing else Mach can do, at this point, because the motion hardware has to do the real-time stuff. 

Steve

14
Mach4 General Discussion / Re: Installing Mach4 on Windows 10 Pro 64
« on: February 02, 2020, 02:25:33 PM »
That is the OS I use to develop Mach with so it is the preferred OS.  XP is dead, Vista was crap, nobody knows what Windows 8 was, and Window7 was good but the world has moved on.  There are probably not a lot of Windows 7 installations out there because MS offered the free upgrade to Windows 10. 

And of the different versions of Windows 10, I like Pro the best.  With Windows 10 Pro, you can postpone updates for a year and the bi-annual refreshes for 6 months.  But still, not connecting it to the internet is the primary means of keeping Windows 10 from automatically updating you at the worst possible moment.  But on an initial installation, I would suggest updating the OS fully, then install Mach, and then never let it see the internet again (unless you want it to update). 

Steve

15
Mach4 General Discussion / Re: Mach 4 Lathe. Missing tool change script.
« on: February 02, 2020, 02:14:50 PM »
These folders are in the installer.  If they are not in your installation directory, you probably deleted them.  Download the installer and install to another directory like Mach4Hobby2.  Then copy the examples from Mach4Hobb2 to Mach4Hobby.

Steve

16
This single instance checking is done in the GUI.  To Craig's point, this is what tries to prevent multiple Mach programs running. 

When the Mach4GUI.exe program is executed, it loads the Mach4Core.dll file.  Mach4Core.dll then loads the plugins.  If something is hanging the core (most likely a motion plugin) after Mach4GUI is closed, then it is possible that the GUI shuts down and the cores remains running in the background.  In this scenario, it is possible to re-launch Mach4GUI.exe and startup another GUI, core, and a set of plugins.  Because the original instance of Mach4GUI is not running, but the core still is! 

Now, this is not a good thing at all, obviously.  It is why we don't allow two Mach programs running at the same time.  My GUESS at this point, because I have no information about what Mach build you are running or what motion controller you are using (things you should really mention when you are having problems), is that is what happened.  Two motion plugins fighting over the same motion hardware is probably going to affect performance at the very least!

Steve 

17
Mach4 General Discussion / Re: New to jogging/ non g-code moves
« on: February 02, 2020, 01:52:30 PM »
You can't jog a coordinated axis from an M code.  Period.  Because the machine is in automatic mode when running G code.  Jogging coordinated axes is only possible in manual mode.  Determining what the return code is would tell you this.  We know it is not MERROR_NOERROR.  But what is the return code exactly?  If you had looked at it, you would have seen that it is -18 (MERROR_NOT_NOW).  Meaning you cannot jog now. 

To RT's point, the return codes are numbers like -18.  As such, it is hard to know what they mean unless you have memorized them.  This is why mc.mcCntlGetErrorString() exists. 

Code: [Select]
function m91002()
local inst = mc.mcGetInstance()
rc = mc.mcJogIncStart(inst, 0, -.2)
if rc ~= mc.MERROR_NOERROR then
local rcText = mcCntlGetErrorString(inst, rc)
-- wx.wxMessageBox("failure") -- you have to be careful with message boxes in scripts!!!! 
-- Better to use mc.mcCntlSetLastError().
mc.mcCntlSetLastError(inst, "m91002(): " .. rcText)
end
end

Notice the comment about wxMessageBox().  You can paint yourself into a corner really quickly using wxMessageBox() in macro scripts.  It is best not to use them.  You should use mcCntlSetLastError() or mcCntlLog() (requires the log window to be up) instead. 

Steve

18
Mach4 General Discussion / Re: mach 4 machine coordinates not showing
« on: January 19, 2020, 06:52:36 PM »
It sounds like you need to install Galil's latest GDK.  Make sure GCAPS is running.

19
Mach4 General Discussion / Re: Mach4 + Plasma MACRO ALARM Help
« on: January 19, 2020, 06:51:31 PM »
Well... when you don't give a lot of information, people tend to stay silent.  What Mach build are you running and with what motion controller?  Did you build the machine?  What kind of motors and how are they hooked up?  What did you do between when it was working to now?  Etc...  Update something? 

Steve

20
Mach4 General Discussion / Re: Mechanical speed ranges in Mach4
« on: January 15, 2020, 07:31:21 PM »
Hi,
you've seen Smurph's recommendation about using lowercase in Gcode......is there any reason you ignore his advice?

Craig

I think there is a misunderstanding.  You don't have to call the m40.mcs macro script with lower case in G code.  But you do have to make the macro script filename lower case.  And the function name in the script should be lower case as well.

The first thing the interpreter does is lower case everything.  So if you had a line wit "M40" on it, when the interpreter processed that line it would do:

1. M40 -> m40  (lower case the M40 to m40)
2. Look for m40.mcs (notice the lower case filename).
3. Look for function m40() in the m40.mcs file (notice the lower case function name).

Steve