Hello Guest it is October 04, 2023, 09:26:11 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 - rhtuttle

General Mach Discussion / Re: subroutine problems
« on: November 26, 2016, 11:06:03 AM »
Not an expert but:

at N008
N008 M30

then at end of sub


Also, at every sub call I add L1 or however many loops to be called


Mach4 General Discussion / Re: digital indicator serial port input
« on: November 04, 2016, 10:45:53 AM »
I too would like to know if this is possible.  I have previously read data from a digital caliper(cheap Chinese version)designed to take measurements from old bamboo flyrods.  Maryland Metrics has a kit that contains the necessary hardware.


Mach4 General Discussion / Re: Mach 4 G01 interpolation
« on: August 23, 2016, 03:06:09 PM »
G61 Exact stop
G64 Constant Velocity.  Produces rounded corners at higher speeds.  Controlled by General Config settings

Try putting a G61 before calling the subs.  Just a thought.

Your code works in my early version:

N060 G0 X[#1001] Y[#1002] Z[#1003]

Mach4 General Discussion / Re: LOVING the PMC!! Thanks Steve!!!
« on: August 04, 2016, 01:13:47 PM »
OK...what is a PMC?

Ok, that's a lot of questions!  Many of the answers depend upon what your are really trying to do and what programming environment you will use.  You stated that you wanted to be able to control monitor a file for changes.  This can be done with a plugin.  Mach polls your plugin every so often and your plugin(dll) could be checking to see if the date changed and tell mach to load and run a file.

The code (C or C++) that you referenced above shows how to create a connection to Mach and get a reference to a mach object that connects to the running Mach3 program.  Once  you have that object you can query and set various properties and objects within the running Mach3 program.  The Programmer Reference pdf has all of the calls and their parameters and returns.  It has been years since I programmed in C and each IDE has different capabilites so I can't help you there.

My program (Delphi Object Pascal) checks to see if Mach is a running and if not loads it.  My program initially asks for the Mach3.exe file location and saves that to an ini file.  It also asks for the mach profile you want to load (mach3mill.xml or turn.xml or whatever you named your active profile) so that it can load the program with the appropriate profile and saves that as well.

It then creates a IMyScriptObject that connects to Mach.  I extended the class by creating an inherited class object (wrapper) that does all of this and simplifies certain tasks.  For example have a property xDro that so that I can program xDro:=2.5 or set a variable myVar:=xDro instead of setOEMdro(800,2.5) or myVar:=getOEMdro(800).

The gui is the most complicated item to implement including threads that must be syncronized to update my displays.  So to answer your question I am simply reading the values and updating my gui just as mach is updating its gui.  Possible but not necessary for what you are trying to do.  MachMe has to have a running version of Mach to operate on, it just hid Mach's GUI.

The mach3 sdk can be downloaded here:


Contains .h files and some examples but I don't know of any manuals.

If your development environment has the ability to import a type library that will create the wrapper for you.

Yes you can control Mach3 from another program.  Mach3 exposes a COM interface that allows you to access just about anything.  Attached is a pascal file that shows the calls available.

General Mach Discussion / Re: M3 M4 switching
« on: March 12, 2016, 12:12:20 PM »
Okay, back to the original subject  ;),

When I started shopping for the relays I got confused by the nomenclature.  My motor at 70% power says 7.5 amps, 95vdc.  The product descriptions like the one below have ratings like the 4th line.  Will this one work? (DC 28V)

Product Name   Electromagnetic Relay
Model   JQX-13F
Coil Voltage   DC 12V
Load   10A AC 240V/ DC 28V
Type   DPDT
Pin Number   8
Size (Approx.)   40 x 27 x 20mm / 1.6" x 1" x 0.8" (L * W * T)
Weight   33g
Package Content   1 x Electromagnetic Relay