Hello Guest it is March 28, 2024, 09:54:42 AM

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

0 Members and 1 Guest are viewing this topic.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Mach3 Customization/Macro Programming Documentation
« Reply #30 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 
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach3 Customization/Macro Programming Documentation
« Reply #31 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

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Mach3 Customization/Macro Programming Documentation
« Reply #32 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

« Last Edit: August 23, 2009, 12:35:12 PM by poppabear »
fun times
Re: Mach3 Customization/Macro Programming Documentation
« Reply #33 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.
Regards,
Ray L.

vmax549

*
Re: Mach3 Customization/Macro Programming Documentation
« Reply #34 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

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Mach3 Customization/Macro Programming Documentation
« Reply #35 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
« Last Edit: August 23, 2009, 01:25:59 PM by poppabear »
fun times
Re: Mach3 Customization/Macro Programming Documentation
« Reply #36 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.
Regards,
Ray L.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Mach3 Customization/Macro Programming Documentation
« Reply #37 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

vmax549

*
Re: Mach3 Customization/Macro Programming Documentation
« Reply #38 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



Re: Mach3 Customization/Macro Programming Documentation
« Reply #39 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.

Regards,
Ray L.