Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 09:25:36 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Draft Mach3 v3.x Programmers Reference Manual
Pages: 1 2 3 4 »   Go Down
Print
Author Topic: Draft Mach3 v3.x Programmers Reference Manual  (Read 3998 times)
0 Members and 1 Guest are viewing this topic.
HimyKabibble
V4 Screen Contributor

Offline Offline

Posts: 1,346



View Profile
« on: October 01, 2009, 10:01:54 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.

* Mach3 V3.x Programmer Reference Draft.pdf (443.48 KB - downloaded 545 times.)
Logged

Regards,
Ray L.
Dan13
Active Member

Offline Offline

Posts: 759


View Profile WWW
« Reply #1 on: October 01, 2009, 12:27:31 PM »

Hi Ray,

It is a great job you did there! It looks very comprehensive and I hope I finally will be able to write my own macros Wink

One thing I noted at first glance was the examples for FeedRate and SetFeedRate - looks like the first FeedRate in the examples has to be replaced with SetFeedRate.

Just curious, what happens if instead of 60 you put another number, will the feedrate change accordingly?

Also, will you make the content linked to the corresponding pages?

Thank you for a great document,

Daniel
Logged
Velly
Active Member

Offline Offline

Posts: 11


View Profile
« Reply #2 on: October 01, 2009, 01:51:50 PM »

Great Mach3 interface demistifying job, Ray!
Can't wait for the Modbus chapter, dreaming about a Brain one ;-)
Cheers and keep moving!
Velly 
Logged
HimyKabibble
V4 Screen Contributor

Offline Offline

Posts: 1,346



View Profile
« Reply #3 on: October 01, 2009, 05:04:48 PM »

New version of the document below:

Fixed the first round of bonehead errors and typos.
Added headers and page numbers

Regards,
Ray L.

* Mach3 V3.x Programmer Reference Draft v0.11.pdf (466.67 KB - downloaded 254 times.)
Logged

Regards,
Ray L.
Hood
Active Member

Offline Offline

Posts: 17,335


Carnoustie, Scotland


View Profile
« Reply #4 on: October 01, 2009, 05:40:54 PM »

Nice work Ray Smiley

Hood
Logged
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 3,598


Precision Chaos



View Profile WWW
« Reply #5 on: October 01, 2009, 07:37:23 PM »

Looks very good Ray.  Wink

Brett
Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
RICH
Global Moderator
*
Offline Offline

Posts: 4,707




View Profile
« Reply #6 on: October 01, 2009, 11:25:05 PM »

Appreciate the effort Ray.
RICH
Logged
Cruiser
Active Member

Offline Offline

Posts: 107


View Profile
« Reply #7 on: October 01, 2009, 11:51:47 PM »

I only took a quick peek but it looks just like what i have been wanting !
Great Job !
Logged

CRUISER
  Don
HimyKabibble
V4 Screen Contributor

Offline Offline

Posts: 1,346



View Profile
« Reply #8 on: October 03, 2009, 01:06:53 PM »

Latest version below.

Regards,
Ray L.

* Mach3 V3.x Programmer Reference Draft v0.12.pdf (407.47 KB - downloaded 259 times.)
Logged

Regards,
Ray L.
edvaness
Active Member

Offline Offline

Posts: 499



View Profile
« Reply #9 on: October 03, 2009, 09:03:04 PM »

Many Thanks Ray. Great job.

Ed
Logged

Ed VanEss
Pages: 1 2 3 4 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!