Hello Guest it is April 26, 2024, 05:07:17 PM

Author Topic: Draft Mach3 v3.x Programmers Reference Manual  (Read 8295 times)

0 Members and 1 Guest are viewing this topic.

Draft Mach3 v3.x Programmers Reference Manual
« on: October 02, 2009, 11:58:33 AM »
All,

Below is the first draft of the Programmers Reference Manuals for Mach3 v3.x posted for user comment.  This manual documents almost all of the existing Mach-specific VB functions for Mach3 v3.x.  The Modbus and Serial chapters are still in-process, and will be posted in an updated version shortly.  Everything here has been tested against Mach3 v3.042.020, so, as pointed out in the introduction, you may find some differences with other, particularly earlier, versions.

Brian and I have had a significant shift of focus since this project began a few months ago.  Our original intent was to thoroughly document the existing interface in a Programmer Reference, and add to that a detailed step-by-step tutorial manual, aimed at making it possible for almost anyone to learn to write Mach macros.  However, as we started working on the documentation, we realized the interface itself, as a result of its rather "organic" growth, actually made learning to write Mach macros much more difficult than it needed to be - there were missing functions, duplicated functions, and the function naming and argument conventions had little consistency.  For example, Feedrate() returns the current feedrate in units/minute, while SetFeedRate() sets the new feedrate in units/second.  GetRPM() and SetRPM() don't actually Get and Set RPM, but the S-word value.  In addition, there is the need to insert delays in certain operations, in order to get the result you expect.

As a result, we made the decision that Mach3 v4, while it would continue to support the v3 interface, would also begin the shift to a completely new VB interface with very regular naming and argument conventions, and a GREAT deal more functionality.  This new interface will make it far easier to write well-documented macros, to do more with less code, and to make maintenance and updates of the underlying code far easier.  It will greatly simplify macro writing, and enable you to do many things that are difficult, if not impossible, with the current interface.  And, it will be much easier to learn and use, with far fewer of the quirks that those of us who've done a lot of macro programming have torn our hair out over.

This manual is being published to document what is there now, primarily so that existing macro code can be more easily maintained and, if necessary, extended.  But development on this interface will eseentially cease.  So, what you see is what you get, and there will likely be no further updates or bug fixes to this code.  Instead, all efforts will be focused on the new v4 interface going forward.  The v3 interface will continue to be supported, and you will be able to enable the "legacy mode" on a script-by-script basis.  Once Mach3 v4 is released, it is *strongly* recommended that all new code be written using the new v4 VB interface.

A v4 Programmers Reference will be published in the near future, as a preview of the great things to come.

So, happy reading, and comment away!

Regards,
Ray L.
Regards,
Ray L.