Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: HimyKabibble on August 15, 2009, 07:31:09 PM

Title: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble 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.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 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
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble 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.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: Hood on August 16, 2009, 09:33:01 AM
Really looking forward to this Ray :)

Hood
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: ger21 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.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 16, 2009, 10:38:07 AM
Ray does the source code explain what it does? the OTHERs list did

(;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: Dan13 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
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble 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.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: RICH 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
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble 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.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 17, 2009, 10:58:45 PM
OH MY what a can of worms you are opening(;-)   REMEMBER there are huge volumes of VB that have been coded. Most of it runs things that the current users have no way of redoing.

IN realiality WHY even mess with them. THey are there and they work.  Needs better descriptors you say???

 NOPE I diasagree all they need is a good definition as to what they do and how to use them.

Take Gcode for example NOT ONE gcode has a descriptor built into the GCODE name.  YEt millions can read and write the code just fine. why because they are well documented and people LEARNED what they mean.


IF it is not broke please don't fix it. IT is way too late in the game to do that.

PLEASE be carefull in your endevors, (;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: poppabear on August 18, 2009, 09:34:53 AM
Ray,

   The docs I posted under Member docs for the VB stuff was ALSO from the Source Code that Art sent me, it was tested as to funciton, and for what had been depreciated, and added above and beyond the current Wiki........

it will save you some time, my friend,

scott
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 18, 2009, 10:17:50 AM
HimyKabibble,

I vote to go forward with aliases. If the original 'names' are retained to run legacy code, there is no logical objection.

Just having everything in one place and in some semblance of a similar format will be a huge step in the right direction. I hope you will release something like that as soon as it is assembled.

If you are accepting 'wish list' items, and if it is possible, can M codes be named or have aliases? If not, could a look-up table be created where descriptive names could be used that would then call the numbered macro?

And, although it does not seem like part of your responsibility, I'll just take advantage of the opportunity to throw out some more whining for serial or USB port bidirectional access.  :'(
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 18, 2009, 12:03:15 PM
Ray,

   The docs I posted under Member docs for the VB stuff was ALSO from the Source Code that Art sent me, it was tested as to funciton, and for what had been depreciated, and added above and beyond the current Wiki........

it will save you some time, my friend,

scott

Scott,

Yup, I'm using that.

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 18, 2009, 12:41:10 PM
Simpson,

I agree, no reason not to do the aliases - Old macros will still work for as long as the old calls are supported, and we can push people towards using the new ones.  Below is a sample of the format I'm using to document the function calls.

Don't think named macros will happen this time, though I'd sure like to see it myself.  In the meantime, you can get partway there:

MyBlivetMacro = "M978"
...
Code (MyBlivetMacro)

Not as good, but a small step in the right direction.

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: ger21 on August 18, 2009, 10:13:59 PM
"Assert an output signal". Why not just say "activate an output signal, or send an output signal. Seems to me that "Assert" will confuse the hell out of people. I've been writing VB code for many years, and when I first saw "Assert", I had to read through the description to make sure I knew what you were saying. Very confusing imo.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 18, 2009, 10:42:35 PM
"Assert an output signal". Why not just say "activate an output signal, or send an output signal. Seems to me that "Assert" will confuse the hell out of people. I've been writing VB code for many years, and when I first saw "Assert", I had to read through the description to make sure I knew what you were saying. Very confusing imo.

Gerry,

When defining the behavior of a piece of hardware of software, "assert" has a very definite meaning: it makes it clear that the output will be driven to its active state.  With a Mach3 output, this might mean it's driven to a logic high, or driven to a logic low, depending on how that output is defined in Ports&Pins.  But, whatever its active state, it will be driven to that state.  Assert has a very definite and unambiguous meaning, and is a term commonly used in technical literature, such as chip data sheets, to define such things.  If I read something was "activated" or "sent", I would not know what that meant, as those terms are quite ambiguous.  There may be a few new terms you'll need to learn to read this document, but once you do, you'll never have any doubts as to what a function does, once you've read its description.

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: RICH on August 18, 2009, 10:56:06 PM
HMM......
Ray, here is the challenge, so what would a dummy like me do, i would't even know where start looking
 for the definition......but don't let me fog up your progress.......I am sure you'll clarify as necessary.

I quess, just write at whatever level you wish, you have enough of a challenge!
RICH
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 19, 2009, 07:14:49 AM
Since I'm following this thread, I may as well make a nuisance of myself and chime in on this one also.

The difference between 'assert' and 'activate' is very clear in my mind thanks to the description provided and it should be obvious that a clearly defined distinction between the two will prevent many hours of trouble shooting and frustration in writing code for Mach.

I do not find the terms confusing, however, the different definitions do cause a conflict when the two terms are used for the same function. I have to agree that this inconsistency is confusing. When I read it, my first thought was 'typo'.

My vote would be to change the function name to 'AssertAnOutput()' in the interest of continuity and clarity, if the purpose of the function is an 'assertion' as described.

Assuming the big dogs are watching this thread, may I take advantage one again and ask if it is possible to change the Mach setting from 'step/dir' to 'PWM' for spindle control from within a macro. I have looked but not found such a function.

Thanks!
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: ger21 on August 19, 2009, 09:14:22 AM
There may be a few new terms you'll need to learn to read this document, but once you do, you'll never have any doubts as to what a function does, once you've read its description.

Regards,
Ray L.

I don't really care how you word it, I can figure it out. But imo you're going to make it very confusing for beginners. just my 2 cents.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 19, 2009, 09:29:26 AM
PLease keep it in laymens terms, They are the ones you will be writing this for. One of the of the marks of a sucessful author is to be able to write at the level that best serves the majority of his readers.

OR just write two versions(;-)

(;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 19, 2009, 02:49:39 PM

"Who will help me bake my bread . . "
- Little Red Hen
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: edvaness on August 20, 2009, 07:52:44 PM
 ASSERT ? unambiguous ?   ??? ???

Do you sell dictionary's ? How about more 4 letter words ?

Ed
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: poppabear on August 22, 2009, 12:14:05 PM
I have to agree with majority opion on this one.

PLEASE use the "KISS" pricinciple.......

The VB function, and function names where so that users who know nothing of programming can get into it to customize thier machine.

I think you should stick with "Laymans" terms, no dought.  Stuff like "ActivateSignal" and "DeActivateSignal", Or even "OutputON" or OutputOFF" would be better.  I new NOTHING of programming when I started with mach, and was VERY thankfull that the documentation put things  in terms that the NON-Programmer could understand, INCLUDING examples!!!  It is a Big hill to climb when all you have is the Wiki documents, and others code to learn from. Please dont complicate a "Laymans" programming launguage (VB Script).

Please understand, I am NOT complaining, just asking you to remember that 90% of the people on this site are hobbiest, and/or non-computer programmers.

The only reason I new what ASSERT meant was that I learned it when I was learning to write plugins, prior to that, it would have ment nothing to me.

scott
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 22, 2009, 01:48:04 PM
Turn on /Turn off  has always worked well.

(;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 23, 2009, 06:19:51 AM
It would seem that difficulty understanding the difference between 'assert' and 'activate' is an affliction that also causes confusion between the words 'manual' and 'tutorial'.

It matters little what words an author chooses if the reader is not paying attention to them. The OP clearly says that a person has been drafted to produce a "Programming MANUAL". Granted, that is more than  4 letters, but not exactly difficult to comprehend, in my view.

Nothing is stopping the Little Red Hens from taking a reference manual and using their own 'good authoring skills' to produce a follow on 'Mach Programming for Dummies' book . . .  except perhaps that it requires more effort than simply criticizing someone elses project.

Personally, I want a concise desktop quick reference in the form of "VBscript in a nutshell' from Childs, Lomax and Petrusba. Persons unwilling or unable to learn the proper syntax, structure and logic of a given language are not going to be able to program successfully regardless of whether the documentation is provided in layman or professional form.

Someone mentioned that 90% of this forum is hobbyists. Unfortunately this thread supports that "ASSERTION" . . . oops, sorry for the big word, but 'on' or 'off' just didn't seem adequate . . go figure . . . .
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: Hood on August 23, 2009, 06:34:25 AM
Simpson,
 just to let you (and Ray) know I agree 100% with what you have just said.

Hood
 
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: ger21 on August 23, 2009, 08:14:10 AM
There may be a few new terms you'll need to learn to read this document, but once you do, you'll never have any doubts as to what a function does, once you've read its description.


Where will one go to learn these terms.? Tried Googleing "assert" but didn't get the needed definition.

Didn't mean to open a can of worms here, Ray.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: RICH on August 23, 2009, 08:35:49 AM
Suggest that Ray just do the best he can, throw it out for commnets, and let folks go in and test verbage for understanding. Folks can always provide a description for a term based on their experience for his consideration.
If a user needs to bring oneself up to a certain level, define the required level, a good reference source to use, etc.

Assert is just one word out of the hundreds yet to come!  ???
RICH
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: Hood on August 23, 2009, 08:44:00 AM
I honestly find it very hard to believe people are arguing over the word assert. If you don't know what assert means in the context of the page view that has been shown then I am sorry to say but you are going to struggle to write a macro.
 Ray, go for it put it out then maybe once you are finished a glossary can be written by the members here.

Hood
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: Chaoticone on August 23, 2009, 09:23:13 AM
Guys, if the expanded definition Ray gives doesn't clear things up I don't know what to say.  ??? Go back and look at the sample he posted. Read it all and don't freeze up at the word Assert. A child would be able to use it with confidence. At first glance I was a little concerned myself but after reading the expanded definition..................... no brainer.

Ray, keep it as simple as possible and still do a great manual. If you have to use "3 to the third power" or "take the value of 3 multiplied by 3 and multiply it by 3" I think we can adjust. Two things we can count on, gravity and change. When we paint or houses it inconveniences us but still better than letting them rot down.

Looking forward to the finished manual,
Brett 
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: Hood on August 23, 2009, 09:25:36 AM
I hate painting, I am glad our houses are made of brick in Scotland because it is raining and my computer would get wet ;D

Hood
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: poppabear on August 23, 2009, 12:22:10 PM
simpson36:

   I understand your point, but understand mine, I was NOT critizing the author, he asked for comments I gave him mine. In my OPION (and we all know the saying), most users here are machine hobbiest. Who dont know VB scripting (the cypress version). All I was saying was make if for people who dont know anything. Perhaps you came to this site, and already knew programming. When I came here, I did not and had to learn, it was a tough climb using the "manuals".  

Further I and VMax (Terry), are not slamming anyone here or arguing over that one specific word that was just an example.  I just didnt want New people to mach3, and we where ALL new at one time.  

Ray: Thank you for what you are doing, since my comments are not appreciated, I will bow out of this thread. Look forward to your completed work!

Let me ask, would you also consider an "functional Grouping" format, i.e.  Modbus functions, Output functions, Input functions, G Code functions, Wizard functions, etc.  and put code that relates to that typ of operation(s).  If I am a new person, I would only know I want to turn on an output for instance, I would not know it is called ActivateSignal, I could look under the function groups and find quickly what I am looking for.

scott

Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 23, 2009, 12:51:08 PM
simpson36:

   I understand your point, but understand mine, I was NOT critizing the author, he asked for comments I gave him mine. In my OPION (and we all know the saying), most users here are machine hobbiest. Who dont know VB scripting (the cypress version). All I was saying was make if for people who dont know anything. Perhaps you came to this site, and already knew programming. When I came here, I did not and had to learn, it was a tough climb using the "manuals". 

Further I and VMax (Terry), are not slamming anyone here or arguing over that one specific word that was just an example.  I just didnt want New people to mach3, and we where ALL new at one time. 

Ray: Thank you for what you are doing, since my comments are not appreciated, I will bow out of this thread. Look forward to your completed work!

Let me ask, would you also consider an "functional Grouping" format, i.e.  Modbus functions, Output functions, Input functions, G Code functions, Wizard functions, etc.  and put code that relates to that typ of operation(s).  If I am a new person, I would only know I want to turn on an output for instance, I would not know it is called ActivateSignal, I could look under the function groups and find quickly what I am looking for.

scott



Scott,

Functions and variables are already listed both alphabetically (along with their long descriptions) and by function (with short descriptions), so it will be very easy to find the function you need, if it exists.  Many names are also being changed, to make them more clear.  For example, *all* Modbus functions will have bames now starting with "Mod".  All spindle control functions have names starting with "Spindle", etc.  Where there are functions to write and read variables, they will be named identically, except for "Set" and "Get" prefixes.  So, rather than the current SetFeedRate() and FeedRate(), we'll have SetFeedRate() and GetFeedRate().  Many old/obsolete/redundant functions are being deleted.  OEM codes will all have pre-defined symbolic names, making their function clear.  We're looking at adding named macros, and shared variable space as well.  Scripts will be able to "include" other files, so common definitions can be shared without cutting and pasting the same code into multiple macro files.  (Take a look at my probing macros - This change alone would reduce the lines of code by almost 90%)  Existing scripts will still run, in a new "legacy" mode that understands the "old ways", but there will be so many improvements in the "new way", and the code will be so much more readable, that people should WANT to use it for all new code.

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 23, 2009, 12:55:27 PM
I see that someone  thinks laymen can't program, Guess you better tell ART your assumption so he can stop fooling everyone.

I think I'll go with Scott and Bow out now and let the intelectuals have at it for a while.

SEEya , (;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: poppabear on August 23, 2009, 01:00:44 PM
Ray, 

That sound very nice indeed!! Sorry if I came across a "Critical", it was NOT meant that way at all.

Looking forward to your work.

OH ONE more thing, Since your doing modbus PLEASE ask Brian if you can get VB control like this to both
Serial and TCP Modbus (TCP currently has NO VB access, and Serial modbus VB was for the OLD style NON-serial plugin modbus.
(let me know if you need help in that area, some of those functions where ones I asked Art to add a long time ago).

Perhaps VB formats for Modbus like this for both Serial Plugin Enabled, and TCP.

For the Serial Plugin Modbus (both full Words and Bit of word): short = 16 bits

   'Word get and set funcitions:

      GetModSerial(short Cfg#, short LocalVar#)
      'Cfg# is what configuration 0-63,
      'LocalVar# is what register in that config 0-127.
      Returns: a Short that is the value of that register (local var).

      SetModSerial(short Cfg#, short LocalVar#, short Value)
      'Cfg# is what configuration 0-63,
      'LocalVar# is what register in that config 0-127
      'Value is the 16 bit value in decimal.
      
   'Bit of Word get and set functions:
   
      GetModSerialBit(short Cfg#, short LocalVar#, short GetBit)
      'Cfg# is what configuration 0-63,
      'LocalVar# is what register in that config 0-127,
      'GetBit is the bit number you want 0-15
      Returns: a BOOL that represents that bit in the words value.

      SetModSerialBit(short Cfg#, short LocalVar#, short SetBit, BOOL BitVal)
      'Cfg# is what configuration 0-63,
      'LocalVar# is what register in that config 0-127
      'SetBit is the bit number you want 0-15 to set,
      'BitVal is the value you want that bit to be 0 or 1.
      
For the TCP Plugin Modbus (both full Words and Bit of word): short = 16 bits

   'Word get and set funcitions:

      GetModTCP(short Cfg#, short LocalVar#)
      'Cfg# is what configuration 0-63,
      'LocalVar# is what register in that config 0-127.
      Returns: a Short that is the value of that register (local var).

      SetModTCP(short Cfg#, short LocalVar#, short Value)
      'Cfg# is what configuration 0-63,
      'LocalVar# is what register in that config 0-127
      'Value is the 16 bit value in decimal.
      
   'Bit of Word get and set functions:
   
      GetModTCPBit(short Cfg#, short LocalVar#, short GetBit)
      'Cfg# is what configuration 0-63,
      'LocalVar# is what register in that config 0-127,
      'GetBit is the bit number you want 0-15
      Returns: a BOOL that represents that bit in the words value.

      SetModTCPBit(short Cfg#, short LocalVar#, short SetBit, BOOL BitVal)
      'Cfg# is what configuration 0-63,
      'LocalVar# is what register in that config 0-127
      'SetBit is the bit number you want 0-15 to set,
      'BitVal is the value you want that bit to be 0 or 1.
   

scott
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 23, 2009, 01:10:04 PM
Ray, 

That sound very nice indeed!! Sorry if I came across a "Critical", it was NOT meant that way at all.

Looking forward to your work.

scott

Scott,

No problem, I don't mind at all.  I'm just surprised there's such a brouhaha over a single word, when the meaning is explained in the following sentence.  To me, the important thing is for the functionality to be *precisely* defined.  "Activate" may be a comfortable word for some, but in this context it is meaningless.  Does that mean drive it high?  Driive it low?  Turn on the "Enable"?  Who knows.  "Assert" does have a very clear meaning to those who are accustomed to reading data sheets and software manuals - It means drive it to its active level, whether that is high or low.  For those unfamiliar with it, this is an opportunity to learn a new wiord, because they'll probably see it in other places eventually.  Learning is good!  :-) 

It's impossible to do something like this and make everyone happy, but having this stuff actually documented will life SOOOOOO much easier for everyone in the long run, even if they have to learn a few new terms along the way (and it will be just a few, after all).  I sure wish I'd had it about a year ago.

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: Hood on August 23, 2009, 01:49:17 PM
but having this stuff actually documented will life SOOOOOO much easier for everyone in the long run, even if they have to learn a few new terms along the way (and it will be just a few, after all).  I sure wish I'd had it about a year ago.

Regards,
Ray L.

That is exactly what this is about and it WILL make things much easier even for dumb fishermen ;) So I am really looking forward to this manual :)

Hood
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 23, 2009, 03:16:23 PM
HIYA RAY I admire your work and it was not about the single word but more the hope that it would be simple to understand. Most newbies are already in a VERY STEEP learning curve adding in another layer just seems to make it worse.

Even if I take the time to read them a document which to me would be self explanatory they never seem to GET IT until I break it down to simple terms. 

Take for instance the assert , in your explaination it tries explain all the intrecise of the whole function as realated to active high or low and how it relates to the function.  All THEY really want to know is that it  turns it on or off.

It is a lot easier for the engineer to read the little red hen than it is for the newbie to read the technical side of PID and it's relation to machine accuracy.

First we Hand them the CNC for Dummies so they can get their machine up and running and making PARTS .  THEN if their interest grows larger  than just making parts.  THEN we hand them the Techie manuals

I find that the majority of the new crop of newbies  and OLDTIMER GCODERS(retired CNC Machinist)  do "NOT" want to understand the INTERNALS of VB they just want to make parts. MOST do NOT want to even dabble in VB but find in MACHs case a lot of times you have no choice. It is either that or just move on to other hobbies or controllers.

The paradyne of the average CNCer has changed in the last couple of years

Just a thought, (;-) TP



Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 24, 2009, 11:59:47 AM
Well, I now know just about everything there is to know about *all* of the VB functions available to us!  There are quite a few useful functions that have never been documented before, and quite a few others that will be discarded, as they either duplicate other functionality, are obsolete, were for special testing only, or were never completed in the first place.  There are "holes" in the functionality that we'll be able to plug up.  There are a number of functions that are sparsely, and/or incorrectly, documented.  There is a LOT we will be doing that will make this stuff a LOT easier to understand, and much more "approachable" for newbies.

And, one thing that will make several of us happy - Brian agrees that the serial port support needs to be completely re-done.

Regards,
Ray L.

Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 24, 2009, 04:44:11 PM
simpson36:

   I understand your point, but understand mine, I was NOT critizing the author, he asked for comments I gave him mine.


You are entitled to your opinion, and it is as valid as anyone elses. I just disagree with it, so I presented a different viewpoint, that's all there is to it.

My concern is in seeing the public development of a precedent where someone volunteers to do something that is, and has been, sorely needed and the negative reactions and gimmee gimmees make that person (and others reading the thread) think twice about continuing the effort or starting any other.

It would be logical to assume that since nobody has yet produced the desired 'Mach for Dummies' book, that the comments made thus far are not from the perspective of experience, so let me share something with those who are lobbying for a 'newbies guide to programming'.

I have written many tech manuals as well as several full training curriculum's and a few tutorials. From those experiences, which span many years and several, albeit all technical, topics, I can state confidently that writing a proper tutorial is at lease an order of magnitude more time consuming than writing a technical reference. A proper tutorial requires a test group and feedback and iterations. A manual does not.

To sum up my point: those who are asking that Ray "JUST' write in layman's terms and as close to a tutorial objective as possible . . . . well  . . .you just don't realize what you are asking for. It is a huge undertaking.

In any event, a good reference manual and a good tutorial are like a terminator movie and a chick flic, you just cannot combine certainthings and have either be any good for it's purpose.

As I said earlier, a concise reference manual is needed badly. That is what Ray said he is working on. I do not want to have to wade thru paragraphs of explanations, definitions, laymans terms, humorous analogies and the like, the get the the reference that I need to move on with my programming project.

Tutorials ALWAYS grow out of manuals, NEVER the other way round.

So first things first, and I suspect there is an opening for volunteers to write tutorials . . .  I am not in that line, however.

 





Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 24, 2009, 04:48:29 PM
YOUR responce describes EXACTLY why we asked to keep it simple.  IT was a simple request NOT a demand. I am sure i can get it interputated if needed. MAYBE we will get lucky and get pictures.

(;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 24, 2009, 05:36:27 PM
YOUR responce describes EXACTLY why we asked to keep it simple.  IT was a simple request NOT a demand. I am sure i can get it interputated if needed. MAYBE we will get lucky and get pictures.

(;-) TP

I have no idea what you just said . ., perhaps because I do not know what the word 'interputated' means!

Would you mind providing an elaborate layman's definition of that term  . . using no larger than 4 letter words please . . . and make it funny so that I don't get bored. Maybe use it in a couple of example sentences so that I can try to comprehend the context.

Oh yeah, and I like clever anecdotes, so if you wouldn't mind throwing in a few, that would help with my short attention span. :-*
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 24, 2009, 06:00:08 PM
I am sure i can get it interputated if needed. MAYBE we will get lucky and get pictures.

Please disregard my last post. I found the definition of 'interputated':

Interputated: The process by which a big scary word is simultaneously interpreted and mutilated.

NOW . .  finally . .  I fully understand the whole 'ASSERT' debacle . . . . . a classic case of interputation !   :o

Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 24, 2009, 06:24:53 PM
Actually, a tutorial manual is in my charter, but as Simpson indicated, it has to come *after* the reference documents are done.  The tutorial will cover a lot of ground, but the most important thing is showing people how to make use of the reference manual, how to understand the functions and variables, and giving pointers on good programming practices, so they can come up the learning curve faster.  It will cover, if anything, more than most users will ever want or need to know, from how to create custom screensets, to writing all kinds of macros, up to and including probing and toolchanger macros.  This, combined with the many, many changes we're making in the VB envorinment, will make writing macros a LOT easier than it has been up to this point.

I will "publish" the documents, chapter by chapter, as I complete them, starting as soon as the first version of v4 that includes all the new VB features is released.  By that time, the reference manual will for sure be done, which will include full documentation on all new, old and deprecated functions, variables, OEM codes, etc.

Here is the overall outline I'm working from:

Introduction
Areas of Customization
    Screen Design
    VBasic Macros
    Plug-Ins (mentioned, but not described in detail in this document)
Screen Designer Basics
    Visual Controls
    Labels
    Images
    LEDs
    DROs
    Buttons
    Mach-Specific Controls
    Screen Designer Tools
        Screen4
        MachScreen
    Advanced Techniques
        Combining Buttons and LEDs
        Implementing Radio Buttons
Mach3 VBasic Macros
    Macro Basics
    Button Macros
    M-Code Macros
    The Mach3 Macro-Pump
    Communicating With and Controlling Mach3
        OEM Codes   
        Mach3 Macro Functions   
        Variables
        Moving the Machine
        Executing G-code
    Advanced Macro Topics
    Macro Execution Environment
    Nested Macros
    Terminating Macro Execution
Customization Examples
    A Basic Edge-Finding Macro
    A Basic Tool-Length Setting Macro
    A More Comprehensive Set of Probing Macros
    Probing A 2D Part Outline
    A Simple Tool Changer Macro
    Multi-Function Button Macros For A Pendant
Programmers Reference Manual
    V4 OEM Codes Defined
        Buttons
        LEDs
        DROs
        Vars
    V4 Scripting Functions Grouped Alphabetically
    V4 Scripting Functions Grouped By Function
Legacy Support
   Running Legacy Macros
    V3 OEM Codes Defined
        Buttons
        LEDs
        DROs
        Vars
    V3 Scripting Functions Grouped Alphabetically
    V3 Scripting Functions Grouped By Function

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 24, 2009, 07:06:19 PM
SIMPSON DUDE (;-) you are way too easy to get wound up  I am just picking on you, tugging on your leg.

BUT please be carefull patting yourself on the back you could hurt someone doing it that hard and fast.

Ray is a pretty smart fellow I think he can handle the deal and keep it in perspective for everyone.

(;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 24, 2009, 10:20:09 PM
Has anyone here ever used the CoupleSlave() function?

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 24, 2009, 11:59:33 PM
I think it is use to sync the homing on the slave axis.  What do you need to know?

(;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 25, 2009, 12:52:06 AM
I think it is use to sync the homing on the slave axis.  What do you need to know?

(;-) TP


Terry,

I'd like to know *exactly* what it does.  My impression is it causes the slave axis to move step-for-step with the master axis.  But, isn't that what it would do anyway?  And what happens when that function is turned off?  How does the motion change?

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 25, 2009, 04:06:04 AM
SIMPSON DUDE (;-) you are way too easy to get wound up  I am just picking on you, tugging on your leg.
No problemo,  Mr V. 
I 'm not fragile . . . a little tail twisting on occasion enhances the experience.

Quote
BUT please be carefull patting yourself on the back you could hurt someone doing it that hard and fast.

VRAY DUDE (;-) I said I did the work, I didn't say if it was any good or not.

Quote
Ray is a pretty smart fellow I think he can handle the deal and keep it in perspective for everyone.

I've said it before. Kudos to all of you guys who spend so much time helping others. Even when I disagree with a post, I still appreciate that someone spent valuable time posting in the first place.  This thread got off to a bit of a silly start, but once the debate got up some steam, very useful information was presented.  8)

Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 25, 2009, 11:14:02 AM
Simpson I do thank you for your work on servo drive reveiws, it was something long overdue. One of the things about this site is it serves from middleschoolers (yes) all the way up to double doctorates.  It is really amazing it works as well as it does. But that is because of all the hard work these guys crank out day to day. They really make it what it is.  A CooL place to hang out and learn.



(;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: poppabear on August 25, 2009, 12:49:16 PM
Simpson:

    Understand, again, I was not critizing Ray, I have worked in VB, screens, macros, etc. here on this site, and have released a very large amount of "Help", examples, screens, my own attempts at documenting the undocumented VB that Art sent me etc.  So, I do know EXACTLY what it is to release Projects, Help, etc. to this very community.  The reason I posted what I did was that I AM speaking from YEARS of hands on experience using VB, Screens, Wizards, etc.  I got and have got many questions through the years on how to do this or that. So, I understand from personal experience what the "average user" (and I include my self in that statement, since I remember the Uphill learning curve that was involved with it).

    So, I guess my point is this, my post was to Ray in what he asked for, If you opions differ from mine please keep your "Flames" about my concerns to yourself.   

    I have looked over your post, I have not seen any great deal of VB, Screen, Wizrard, or macro help that you have contributed to the group. Terry has contributed alot of VB that has helped the community a great deal (see Macro Tool Box).  Yet, you tried to tear him down.

if you dont mind, if you are unable to post without "Flameing" some one like Terry who is a respected member of this community, then just dont post.

IF you meant your "Flames" and little barbs at me, and Terry in jest then ignore the above,

scott
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 26, 2009, 04:47:12 AM
poppabear,

I'm not going to participate in public discussions about other members. We are all big boys and can speak for ourselves.

As to your comments about your own impressions, you seem unsure of the intent of my postings. If it had been my intention to 'flame' you, there would be no doubt in your mind.

If one presents a postion in an open forum, then that position is open to debate and may need to be defended.  There is nothing personal in this.

There is a lot of distance between 'you have a bad idea' and 'you are bad for having that idea.' I would apologize for any instance where I implied the latter, as that would never be my intention.

I am a fact hound for the most part, but if I sense my tail being twisted, occasionally I will poke back at a worthy opponent as with my 'interpogated' remarks.  Your reaction may be very different from that of the intended recipient, which is why it is best not to be someone elses spokesperson.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: simpson36 on August 26, 2009, 05:14:12 AM
Simpson I do thank you for your work on servo drive reveiws, it was something long overdue.

Thanks. I'll be adding the two new drives I received in the mail last Saturday. These are brand new models from CNCdrive in Hungary. I'm happy with the drives so far.

Tuning is not too bad comparatively speaking, but automatic tuning is planned. That should be interesting.

Performance is excellent and with some luck we will be able to communicate with these drives in real time while MACH is running with the new script capabilities.   8)

Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 27, 2009, 12:10:59 PM
HIYA RAY, ARE you far enough along to release a sumary of the VB commands BEFORE you start to write the novel?
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 27, 2009, 12:22:48 PM
HIYA RAY, ARE you far enough along to release a sumary of the VB commands BEFORE you start to write the novel?

Terry,

I've decided to do the "legacy" VB reference first, and I'm probably 1/4-1/3 through it.  I'll release a draft as soon as it's complete - probably 2-3 weeks.

Right now, I'm tearing my hair out trying to make sense of the Modbus functions....

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: vmax549 on August 27, 2009, 08:58:59 PM
RAy you may want to get in touch with Peter H he should be able to get you up to speed quickly.

Have you found an LED that may indicate the machine is AT HOME position?? 

(;-) TP
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on August 27, 2009, 09:10:23 PM
RAy you may want to get in touch with Peter H he should be able to get you up to speed quickly.

Have you found an LED that may indicate the machine is AT HOME position?? 

(;-) TP

Terry,

I haven't even started looking at OEM codes yet.  Somebody else is handling that can of worms.  I will document what he finds, once he's verified them all.

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: Flyer Tuck on January 20, 2010, 02:51:05 PM
Any status on the new manual?
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: HimyKabibble on January 20, 2010, 04:22:10 PM
Any status on the new manual?

It was published several months ago, here:  http://www.machsupport.com/forum/index.php/topic,12730.0.html

The v4 manual is still not started, since the v4 VB interface is still undefined....

Regards,
Ray L.
Title: Re: Mach3 Customization/Macro Programming Documentation
Post by: BobWarfield on January 21, 2010, 03:23:28 PM
Very nice work, Ray!

BW