Hello Guest it is November 08, 2024, 03:44:37 PM

Author Topic: Mach3 Customization/Macro Programming Documentation  (Read 67790 times)

0 Members and 1 Guest are viewing this topic.

Mach3 Customization/Macro Programming Documentation
« on: August 15, 2009, 07:31:09 PM »
Brian has drafted me to write a real Customization/Macro Programming manual for Mach3 v4.  This will eventually be a complete tutorial/reference document covering everything from creating custom screensets, to writing complex macros, like a toolchanger macros, with detailed descriptions of every Mach-specific function, variable, constant, etc., as well as liberal examples and usage recommendations, to make proper things as clear as possible.  This should make it possible for almost anyone to learn how to write Mach3 macros. 

Since there is much I currently do not know, I suggested that rather than bugging Brian with a bunch of stupid questions, I would first see if I could get what I needed from folks on here, since many of you have actually done more macro programming than I have to date.  I am starting by writing a reference manual for the Mach macro functions.  I have a comprehensive list of what functions exist from the Mach3 source code, along with their argument lists and return values, but I do not know what the functionality of some of them is (like nFmt()??).

So, how many of you are experienced Mach3 macro programmers that can help out by answering some questions?

First question:  What is the difference between StraightFeed() and StraightTraverse()?

Regards,
Ray L.
Regards,
Ray L.

vmax549

*
Re: Mach3 Customization/Macro Programming Documentation
« Reply #1 on: August 15, 2009, 09:36:31 PM »
Ray do you have Scott's list? How about Chip's list

You also need to know there may be duplicates of functions with similar names(;-) SOME only ART knows IF he remembers them(;-)

Art did a LIST dump from the soure code a long while back, I have it somewhere. I think it is still on the FTP site

StraightTraverse(double x, y, z, a, b, c) //move to a point shortest path  ..................@ jogSPEED  ??????
StraightFeed(double x, y, z, a, b, c) //move to a point shortest path ........................@FEEDRATE  ???????

MOST NEED to be physically VERIFIED .

Will be glad to help, need a list (;-)  TP
Re: Mach3 Customization/Macro Programming Documentation
« Reply #2 on: August 16, 2009, 08:39:36 AM »
Terry,

Don't need the other lists, I have the source code....

After posting this, I jumped in the car, and headed into town, and on the way realized what the answer to my own dumb question was....

Regards,
Ray L.
Regards,
Ray L.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Mach3 Customization/Macro Programming Documentation
« Reply #3 on: August 16, 2009, 09:33:01 AM »
Really looking forward to this Ray :)

Hood

Offline ger21

*
  • *
  •  6,295 6,295
    • The CNC Woodworker
Re: Mach3 Customization/Macro Programming Documentation
« Reply #4 on: August 16, 2009, 10:13:49 AM »
Hopefully this turns out better than the Flash docs. Been over a year and still no sign of them.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

vmax549

*
Re: Mach3 Customization/Macro Programming Documentation
« Reply #5 on: August 16, 2009, 10:38:07 AM »
Ray does the source code explain what it does? the OTHERs list did

(;-) TP

Offline Dan13

*
  •  1,208 1,208
    • DY Engineering
Re: Mach3 Customization/Macro Programming Documentation
« Reply #6 on: August 16, 2009, 11:35:22 AM »
Finally we'll have some normal document to guide us. May be then I'll understand a thing or two about macros and other custom programming :D

Daniel
Re: Mach3 Customization/Macro Programming Documentation
« Reply #7 on: August 17, 2009, 12:29:43 AM »
Ray does the source code explain what it does? the OTHERs list did

(;-) TP

The source code I have does not always explicitly explain functionality, but I am testing each function myself, and will be trying to uncover any quirks/limitations/etc.

Regards,
Ray L.
Regards,
Ray L.

Offline RICH

*
  • *
  •  7,427 7,427
Re: Mach3 Customization/Macro Programming Documentation
« Reply #8 on: August 17, 2009, 09:04:26 AM »
Your effort will surely be appreciated by manny. I only have a flavor of your task and know how much time and effort
you need to spend. If it allows me to learn how to write Mach3 macros you will have really achieved something!
RICH
Re: Mach3 Customization/Macro Programming Documentation
« Reply #9 on: August 17, 2009, 01:39:27 PM »
Your effort will surely be appreciated by manny. I only have a flavor of your task and know how much time and effort
you need to spend. If it allows me to learn how to write Mach3 macros you will have really achieved something!
RICH


Rich,

My hope is to make it possible for anyone with a basic understanding of VB to be able to easily pickup Mach3 macro programming.  We will not only be documenting everything, with liberal use of example code to demonstrate proper usage, but also doing a lot of re-organizing, to make the function calls and OEM codes more "transparent", so less explanation will be needed.  For instance, many of the existing function calls have names which give no clue to their function.  These will be "aliased" to new names, with clear names that make their function obvious.  For example, "GetInBit()" gives no clue that it refers to a ModBus input bit.  So, all ModBus functions will probably be renamed to start with "Mod", to make this clear.  The old calls will still be there, to support legacy macros, but their use will be discouraged in new macros, as they will be removed at some point in the future.  Same with OEM codes - I am hoping that both numeric and symbolic (named) access will be provided to all OEM codes, variables, etc, to make the code more self-documenting.  For the programmers among us, I will also likely provide a few of my own utilities, to provide, for instance, and "include" capability, so it will be easy to define variables and constants in one place, but have them referenced in many macros, without having to cut and paste code.  This will make it easy, for instance, to define a particular variable used in many macros to reside in DRO 1234.  But, by changing a single line in a single file, to move that variable to DRO 1357, because the DRO will be referenced through a symbolic name, rather than a hard-coded numeric OEM code.

Regards,
Ray L.
Regards,
Ray L.