Hello Guest it is February 19, 2020, 06:16:44 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

Yes!!!!  This is one of my pet peeves.  Eliminate the one switch wonders with extreme prejudice!  It just makes life sooooooo much better.  Life is short.  Why let one switch wonders ruin it?  LOL  Buy a few $13.00 switches and be happy! 

To the OP, those limit switches that Craig pointed to have been used on many many CNC machines.  My Matsuura MC500 has them on it.  They are mostly used in center mounted positions with ramps to engage the switches at the ends of the table/stage.  These ramps eliminate the issue of a runaway crunching the switch.   Meaning that the plunger of the switch is mounted perpendicular to the movement of the table instead of inline with the movement.  The table has the ramps mounted in inline with the direction of movement.  The ramps have a starting slope, a slew, and a trailing slope and are of a height that will never be more than the travel of the switch plunger.  This is a solid configuration that prevents damage and naturally keeps coolant away from them as they are usually well under the table.  They can be enclosed in boxes (and most are) to further limit coolant ingress.  I call these "the $13.00 switch" because as Craig noted, that's about what you pay for them. 

On thing though...  do not run mechanical switches on logic level voltages (5v or less).  Use 12v at a minimum with 24v being preferable. 

The prox switches are pretty nice since a lot of the time they are already pretty much coolant proof.  And if you are wanting to switch at logic level voltages, these are the better choice. 


Mach4 General Discussion / Re: New user - ToolPath Not Showing
« on: September 18, 2017, 12:45:02 AM »
There is an option in the Tool Path tab to revert to the older OpenGL code.  It might work for you.  I can't make any guarantees, though.  But it might be worth a shot. 


Mach4 General Discussion / Re: Canned solutions? M6 and others....
« on: September 18, 2017, 12:43:06 AM »
If it were a snake, it would have bitten you.  :)  Have a look in the LuaExamples\Toolchanger directory of your Mach 4 installation.  There you will find and assortment of tool changer M6 macros.  One of them will do exactly (or close to) what you want.  And if it doesn't, then what you are wanting to do doesn't fit the handful of basic operations.  Luckily, we gave you the ability to do anything you want with a tool changer.  But at that point, you will have to make it do your bidding with a small amount of LUA self education.  It isn't rocket science.  And the forum is here for help if you need it.  

MOST of the time when people are having to write code it is because they DO want something special.  Or they THINK they need something special and just don't know any better because the first time they thought about a CNC machine was the week before when they ordered it.  I'm speaking from experience because yeah...  I used to be that guy that didn't know any better.  Everybody starts at square one.  

95% of the time, people just buy a machine that already had Mach installed and configured.  This forum makes up the 5% that don't do that.  This group of people either retrofitted an existing machine, or built their own.  Like it or not, they are now the machine control integrator.  In both cases, each person has (knowingly or not) accepted the challenge of having to do more than the 95% did.  

If you don't have an auto changer, have you thought about not even messing with M6 codes in a program?  I write (or generate) a G code file per tool and just run them separately.  Way less hassle, IMHO.  


Mach4 General Discussion / Re: lua error or is it
« on: September 15, 2017, 10:32:51 PM »
Guys, you really can't "debug" the PLC script like a macro.  Why?  Because the PLC script is only part of a larger script.  If you do Operator->Lau Script, you will see ALL of the screen scripts merged together.  What you will find is that testcount is declared in the screen load script. 

The reason all of the various scripts are merged together is so that each script can access these global variables.  The scripts are all merged to form one "LUA chunk". 

So to debug the PLC script, one can do Operator->Lau Script, copy the contents, and then past the whole script into the mcLuaEditor.  Then, at the bottom, insert a line that calls the PLC script function. 


Docs...  yeah, well...  sore subject.  LOL  It is time consuming.  You really need a staff of technical writers to do it right.  And we are not big enough to do/afford that.

One could also use the PMC for connecting panel button inputs to these functions as well.  The PMC is ladder logic and doesn't require LUA programming knowledge.  But you do need to be familiar with ladder logic.  Damned if you do and damned if you don't, right?  :)

We won't ever say that it is 100% compatible with any Fanuc.  It has similar functionality and most Fanuc 21i stuff works.  But Mach 4 can also do things that a Fanuc 21i can't.  For example, both G76 lathe threading cycle formats are accepted in Mach 4 where only one is accepted on a 21i.  Mach 4's dwell (G04) can be HAAS style or Fanuc style, etc...

So no, the manual will never say this, officially.  But a person familiar with running a Fanuc 21i type machine will feel right at home in Mach 4. 

Peter Smid has a good book on G code programming.  And also a book on Macro B.  These two books were used during the development of Mach 4.


Mach4 General Discussion / Re: Mach4 V3468
« on: September 06, 2017, 01:44:14 AM »
This is a Fanuc compatible function.  Mach 4 pretty much emulates a Fanuc 21i.  So reading a Fanuc 21i manual will get you must of the stuff on Macro B and the more advanced stuff related to it.  However, Mach 4 is not a perfect emulation of a Fanuc 21i and will probably never be, so some things won't work.  MOST things do.  An example of the major difference between Mach 4 and a Fanuc 21i would be some system variable and parameter settings. 


SETVN ********* [name1, ...]

Where ********* is the starting #var.  #500 to #549 are assignable by default.  However, G code lines can only be a max of 80 characters long.  Hence the reason for the starting variable number.


names #500 to MYVAR1, #501 to MYVAR2, and #502 to MAYVAR3


continues the variable naming. 

Variables can now be accessed and set via their names.  The names are not case sensitive. 

#myvar1 = 1024
#myvar3 = #myvar1


It is important to note that these variable names are saved.  If you shutdown Mach, they will be preserved.  So be careful!!!!  It is common practice that SETVN is used at the beginning of a G code program to explicitly set the variable names.  Similar to the common practice of inserting a safety line at the beginning of a G code program. 


Mach4 General Discussion / Re: Mach4 build released
« on: September 05, 2017, 06:51:11 PM »
Make sure that no desktop shortcuts are setting the working directory to the plugins directory.  This is a symptom of the Mach installation directory not being the current working directory upon startup.


Mach4 General Discussion / Re: Mach4 V3468
« on: August 17, 2017, 04:20:48 PM »
SETVN: Set Variable Name.  It is a way to name G code variables.  Originally, the range was limited (#500-#549).  Now the range is definable.
Angled meter:  A new control in the screen editor.  To make angular meter type gauges like a speedometer or tachometer.
The tangential planner now has the same CV optimization capabilities that the mill/router planner enjoys.