Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 02:14:07 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
| | |-+  ENTERING USER INFO INTO CODES
Pages: 1   Go Down
Print
Author Topic: ENTERING USER INFO INTO CODES  (Read 394 times)
0 Members and 2 Guests are viewing this topic.
TOMMYD
Active Member

Offline Offline

Posts: 36


View Profile
« on: August 30, 2011, 04:26:36 PM »

I am setting up my auto tool zero button and got the code from the forum but don't know how to modify to my specs. I obviously don't know anything about writing codes.
 
for example;


PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

  ?should this read?
      ? PlateThickness = .375 'Z-plate thickness DRO ?

                             OR

      ? PlateThickness = .375(1151) 'Z-plate thickness DRO ?


If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty

? Is this my machine zero,can I jog close to plate ?
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here

           
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place

  ? what distance does .75 represent  ?
Code "G31Z-.75 F10" 'probing move, can set the feed rate here as well as how far to move

While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend


  ? should I enter plate thickness here or does it know from line 1 ?
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness


Code "G4 P0.25" 'Pause for Dro to update.


  ? is this set for 1" now?
Code "G0 Z1." 'put the Z retract height you want here


Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
End If
 
Thanks,Tommy
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 2,619



View Profile WWW
« Reply #1 on: August 30, 2011, 06:44:15 PM »

Plate thickness is taken from a User defined DRO on the screen. If your plate is .375, you can code it without using the DRO like this:

PlateThickness =0.375

? Is this my machine zero,can I jog close to plate ?

No, it zero's the Z axis in the current coordinate system.

? what distance does .75 represent  ?


The maximum travel of the Z axis during probing. If you want to start the macro at a location higher than 0.75, you'll want to increase this number. Note that it's negative,  -0.75.

  ? should I enter plate thickness here or does it know from line 1 ?

It's assigned in Line one. "PlateThickness" is a variable, and you're assigning it the value of 0.375

  ? is this set for 1" now?

Yes, it's set to retract 1"


I seriously recommend using a more robust macro for your auto zero. The minimal one you're showing here is open to a lot of possible errors, which can cause broken tols or even machine damage.

You might want to look here for a much more refined version.
http://www.cnczone.com/forums/cnc_wood_router_project_log/36099-another_aussie_auto_tool_zero.html




Logged

TOMMYD
Active Member

Offline Offline

Posts: 36


View Profile
« Reply #2 on: August 31, 2011, 07:17:10 AM »

Gerry,
  Thanks for the quick responce.I'll use the one you suggested,but I'll probably still be back with questions. Thanks Again ,Tommy
Logged
TOMMYD
Active Member

Offline Offline

Posts: 36


View Profile
« Reply #3 on: August 31, 2011, 06:17:17 PM »

Gerry, It worked flawlessly the 1st time.Now all I need is to learn how to put an LED next to the auto tool zero button so I can test without going to diagnostics page. Thanks,Tommy
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 2,619



View Profile WWW
« Reply #4 on: August 31, 2011, 07:04:42 PM »

If you post your .set file I can do it for you.
Logged

TOMMYD
Active Member

Offline Offline

Posts: 36


View Profile
« Reply #5 on: August 31, 2011, 07:56:27 PM »

Thanks for the offer! I would like to try it myself.If it flops I'll be back. Thanks,Tommy
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 2,619



View Profile WWW
« Reply #6 on: August 31, 2011, 07:58:09 PM »

Be sure to make a backup copy first. Smiley
Logged

Pages: 1   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!