Hello Guest it is February 18, 2020, 05:06:56 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

Mach4 General Discussion / Re: Super Simple Screen Set (Mach4 Beta)
« on: August 17, 2017, 04:10:51 PM »
Cool!  Perfect frill free screen set.  I like it. 

Mach4 General Discussion / Re: LOVING the PMC!! Thanks Steve!!!
« on: July 27, 2017, 11:08:01 PM »
I can't possibly explain all of that in a forum post.  My advice is to search this forum for PMC examples.  Then familiarize yourself with the LUA scripting API to figure out how to get the selected tool, etc..  Look at some of the M6 example scripts.  They might help.  You may not even need the PMC, depending on what you want to do. 


Mach4 General Discussion / Re: Mach4 Tangential
« on: July 27, 2017, 10:14:29 PM »
Have you tried it?  Tangential is a choice in the config dialog. 


Mach4 General Discussion / Re: LOVING the PMC!! Thanks Steve!!!
« on: July 27, 2017, 09:13:23 PM »
You don't start a PMC file from any macro script.  The PMC is running all of the time (it is a software PLC).  Regulars ways of interfacing to a hardware PLC from a macro script can be used.  Typically by using Mach registers to communicate.  For your tool change stuff, you could load the selected tool into a register that the PMC is watching, etc...


Mach4 General Discussion / Re: Mach 4 Feature Request
« on: July 17, 2017, 09:47:23 AM »
Separate motor acceleration and deceleration settings would be nice. I need a slower accel rate but then I'm also stuck with a longer time to decel and stop when I jog. Would be nice to have a slower accel rate but quickly decel when I let my finger off the jog button.

You can set the jog accell and velocities as a percentage of the maximums for the axis.  See mcJogSetAccel() and mcJogSetVelocity() in the API manual.  It will take a little scripting, but what you want can be done.  You will basically have to write button up and button down scripts using mcJogVelocityStart(), mcJogVelocityStop(), mcJogIncStart(), and mcJogIncStop(), depending on the current jog mode. 


Mach4 General Discussion / Re: Mach 4 Feature Request
« on: July 17, 2017, 09:41:58 AM »
"Which output was that again??"

I'm setting up a machine right now and Can't remember waht some of my outputs are used for (stack light colors, spindle brake, etc....).  It would be really awesome if there was a "Description" column in the mach config for inputs and outputs.  I've got all my outputs documented on in excel on my computer but its annoying to keep walking back and forth to input data and utilize data from the spreadsheet.  So if there was a Description Column, that would be a great quick reference.

New builds have this.  :)

The LUA scripts is that they are only available in M codes.  In other words, you can't embed LUA script in the G code directly.  Otherwise, LUA is certainly fast.  Both Macro B and LUA scripted M code will break the CV chain, so the move right before them will be an exact stop move.  

With Macro B, one can write a subroutine and associate the sub with a G code.  Say your sub is called 9099 and it is written to take the IJK values.  You can then associate that sub with say G103 and call it in the program like G103 I_ J_ K_.

You could also call the sub with G65.  Like G65 P9099 I_ J_ K_.

So it is about up to the way you want to do it.  The M codes CAN take parameters too.  But probably the M code would do the calculation in LUA and then stuff the output into some #var range that you define.  Then you would need to write the G code to handle the movement that uses those #vars.

But it would be far easier to write a sub that calculates the desired values and moves the head/table all in G code.  I would prefer Macro B.  But...  it does come at a cost.  


Mach4 General Discussion / Re: Mach4 Rotary Feedrate
« on: July 15, 2017, 03:36:40 PM »
Yes, A axis is rotation around X.  And it is in degrees.  So un-map the motor from the Y axis and map that motor to the A axis.  Then use A instead of Y in the G code.


Macro B is as fast as the interpreter is.  And the interpreter is pretty darned fast!  Not many big name CNC solutions can match the G code lines per second that Mach 4 can process.  However, it will depend a lot on the PC hardware.  Meaning, don't expect an Atom to process the same G code lines per second that an I7 will, etc...

So the delay will be proportional to the amount of G code lines that it takes to do your calculations.  But those G code lines will runs just as fast as regular G code lines.


Mach4 General Discussion / Re: Mach4 Jog Increments
« on: July 15, 2017, 02:57:23 PM »
Again, the knowing the build is pertinent.  So please guys...  include the build (and other information like which OS and screen set you are running).

Newer builds follow the state of G20/G21.  With older builds, you had to change the jog units with a script API call.