Hello Guest it is March 28, 2024, 05:09:47 PM

Author Topic: VB Is Laughing At Me....  (Read 21894 times)

0 Members and 1 Guest are viewing this topic.

vmax549

*
Re: VB Is Laughing At Me....
« Reply #10 on: March 23, 2009, 10:16:22 AM »
OK there is a list of some Numbered parameters(VARS) I think we should get the wordage correct.  There rest of the world knows them as system parameters I don't know why we call them VARs.


Upper range(system) starts at about 5000 and goes up they are listed in the mach manual section 10.1 illistration

500-600  are user parameters and are persistant

Gcode Parameters start at 1
Re: VB Is Laughing At Me....
« Reply #11 on: March 23, 2009, 11:38:42 AM »
HIYA RAY, No I use the get/setVAR     Or some call them Gcode Vars or some call them System vars. Last I remember there are about 10,320 of them out there. Some are used for Gcode, some for SYSTEM functions and some are persistant( user use) some are for retaining fixture settings etc.

I'll try and find a listing of the Param & Vars available for us. That way we can at least write it down somewhere.

I use macros a lot myself to automate functions  such as Bolthole circles, probing, Cord rotation, S/n engrave (consectutive), Cutting circles, thread milling, etc.

There is also a side of GCODE call parametric programming that you would probably like as well.

It would be NICE to start a MACH TOOLBOX online to store usefull macros for us to swap ideas.  (IF you are interested) (;-)

Just a thought (;-) TP

Terry,

    I'm always happy to share what I've done.  I've sent many of my drawings and DXFs out to lots of people.

    I kinda like the macros I did yesterday.  I made them hierarchical, so there's virtually no duplicated code.  I have a single edge finder macro, that provides the core functionality for all the others, then higher-level ones that use that one to perform all the other functions, so most are just a few lines of code.  So, for instance, I have 5 macros for edge finding (X+, X-, Y+, Y-, Z-), then one that finds the mid-point between two edges, and one that uses that one for doing center-finding in holes and pockets.  Lots of very simple, very small files, but lots fo good functionality.  Most important of all *NO* frickin' button scripts!

Regards,
Ray L.
Regards,
Ray L.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: VB Is Laughing At Me....
« Reply #12 on: March 23, 2009, 05:36:31 PM »
Terry, the toolbox is a good idea. I can set up a child board of VB and make it like the members docs board so that only mods and admin can post the donations to leave it very clean. Only a brief description of what the script does, how to use it and the code in a text attachment. What do you think? I may be able to add pools that all members could vote as to how useful, accurate, etc. the script is. Will have to look more at the pool option if you think it is a good idea.

Brett
« Last Edit: March 23, 2009, 05:40:12 PM by Chaoticone »
;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!
Re: VB Is Laughing At Me....
« Reply #13 on: March 23, 2009, 06:23:05 PM »
Brett,

    Here's something to get you started - the macros I wrote yesterday.

Regards,
Ray L.
Regards,
Ray L.

vmax549

*
Re: VB Is Laughing At Me....
« Reply #14 on: March 23, 2009, 11:08:53 PM »
I'll start digging out the old macros and get them cleaned up. I have a good probing array macro for inside /outside probing a 2d object. Heck I think I even wrote the manual for it(;-)

I think it will be a great idea. Examples of code are a great way to help others learn to create their OWN macros for their specific needs.

Would also be nice to include the actual macro.m1s for those that cannot do the coding.

(;-) TP
« Last Edit: March 23, 2009, 11:12:37 PM by vmax549 »

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: VB Is Laughing At Me....
« Reply #15 on: March 24, 2009, 05:19:35 AM »
Quote
Would also be nice to include the actual macro.m1s for those that cannot do the coding.

Exactly Terry. If this isn't started by Saturday, please bump this thread for me.

Thanks,
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!

vmax549

*
Re: VB Is Laughing At Me....
« Reply #16 on: March 24, 2009, 05:33:41 PM »
Bret the ball is in your court(;-) I have already started cleaning up macros and writing "how tos" for them. I noticed there wa a MACH TOOL BOX showed up in the downloads section as a dautherboard is that where we are supppose to drop them off??

(;-) TP
Re: VB Is Laughing At Me....
« Reply #17 on: April 29, 2009, 03:09:57 AM »
Hi Ray,
I took a look thru your probing macros this evening - I like the general modularity.

I do have a question: I applaud the programming principal to save state on the way in and restore it on the way out of the low level macros. I see the code doing this for inc/abs mode and feed rate. However, the macros issue GO codes - which is modal change to the control - so the control will be in a G0 rapid state when the macrso exit (even if it was not when the macro was entered).

Is there a reason you did not grab the rapid/feed movement state up front and then also restore it on the way out?

Dave
« Last Edit: April 29, 2009, 03:12:16 AM by mvcalypso »
Re: VB Is Laughing At Me....
« Reply #18 on: April 29, 2009, 10:26:33 AM »
Hi Ray,
I took a look thru your probing macros this evening - I like the general modularity.

I do have a question: I applaud the programming principal to save state on the way in and restore it on the way out of the low level macros. I see the code doing this for inc/abs mode and feed rate. However, the macros issue GO codes - which is modal change to the control - so the control will be in a G0 rapid state when the macrso exit (even if it was not when the macro was entered).

Is there a reason you did not grab the rapid/feed movement state up front and then also restore it on the way out?

Dave


Dave,

There is a reason, though it's not a very good one - I just didn't think of it!  :-)  I whipped those very quickly ( just a few hours), and they're the first significant Mach macros I've written.

How do I detect the current G0/G1 state?

Regards,
Ray L.
Regards,
Ray L.
Re: VB Is Laughing At Me....
« Reply #19 on: April 29, 2009, 12:17:53 PM »
Ray,
I like that reason - I've used it a lot over the years...  ;)

I am not sure how to find the state info to save - but I guess I'll go looking to see if/how it can be done.
I just got a probe - so I'm prowling around posted macros to see what other people have done & what'd avail I can plagerize. My old programming days make me like routines that leave things as they found it. Seeing your macros made me think about GCode states.

Hum, I guess the next steps for me are to
1) list the states I might alter
2) figure out how to get get what they are (I'm not sure mach has a way to do that, it may, I just don't know enough yet to know)

Some things I am not sure I would want to save and restore - like active canned cycles - might be safer to just always cancel them -

Here's an idea: I wonder it people would find it useful if mach had a "Push state" and "Pop state" facility...?
Some things I am not sure I would want to save and restore - like active canned cycles - might be safer to just always cancel them (?) - I need to noodle these things a bit.
(Input from others is welcome)

Dave