Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portugese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 28, 2012, 02:09:47 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
General Mach Discussion
Auto Z for an ATC
Pages:
1
2
»
Go Down
« previous
next »
Author
Topic: Auto Z for an ATC (Read 486 times)
0 Members and 1 Guest are viewing this topic.
first off
Active Member
Offline
Posts: 13
Auto Z for an ATC
«
on:
August 28, 2011, 05:40:07 PM »
Hey all.
How do I get my Auto-Z value input into the tool "Z 0ffset" DRO field complete with the touch plate thickness added?
As it is now, it enters into the Work Z offset field and does not adjust for the plate thickness. I am using an ATC and I want to key the tool number, Change the tool manually and then run the Auto-Z and have it enter for that tool.
This is what i am starting with:
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO
If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
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
Code "G31Z-1. 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
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.
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
Exit Sub
End If
Thanks for your help. Russ.
Logged
Hood
Active Member
Online
Posts: 17,368
Carnoustie, Scotland
Re: Auto Z for an ATC
«
Reply #1 on:
August 28, 2011, 06:21:42 PM »
Getting late here and I am crap at VB anyway so will tell you what I do. I have a toolsetter at the side of my machine where I set up tools off the machine and it has an encoder on it which feeds into Mach. So its a manual process and not really what you want but here is how I get the info into the tooltable, this is the code in my button. You may be able to use parts of it in your macro, specifically the Code line and maybe look at your Z DRO instead of the encoder DRO that I look at..
If GetOemLED(800) Then
MsgBox ("Mach In Reset, Enable and start again")
End
End If
Offset = GetOemDRO(100) 'This is the Encoder DRO that height setter is connected to
SetOemDRO(1555,Question("Enter Offset Number"))
Tool = GetOemDRO(1555)
Code "G90" & "G10" & "L1" & "P" & Tool &"Z" & Offset
DoOemButton(121)
Hope this helps a bit, sleep time for me
Hood
Logged
first off
Active Member
Offline
Posts: 13
Re: Auto Z for an ATC
«
Reply #2 on:
August 29, 2011, 08:16:23 AM »
Hey Hood
What is DoOemButton (121) from you script?
Logged
Overloaded
Global Moderator
Offline
Posts: 3,073
Re: Auto Z for an ATC
«
Reply #3 on:
August 29, 2011, 08:35:26 AM »
.... till Hood gets back to ya
121 = Tool Table Save
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
Hood
Active Member
Online
Posts: 17,368
Carnoustie, Scotland
Re: Auto Z for an ATC
«
Reply #4 on:
August 29, 2011, 08:36:01 AM »
That opens the tool table, not really needed but I just like to see and make sure its added the entry correctly. It always has but probably wont the first time I dont look
Hood
ah Russ got there first I see
Logged
Overloaded
Global Moderator
Offline
Posts: 3,073
Re: Auto Z for an ATC
«
Reply #5 on:
August 29, 2011, 08:48:31 AM »
Hi Hood, knew you couldn't be too far away.
Would your macro actually save the table entry if you didn't Do 121 ?
Maybe it IS necessary ?
Thanks,
Russ
Logged
"I haven't failed. I've just found 10,000 ways that won't work." Edison
"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
Hood
Active Member
Online
Posts: 17,368
Carnoustie, Scotland
Re: Auto Z for an ATC
«
Reply #6 on:
August 29, 2011, 08:56:37 AM »
Russ, it will enter it into the table and it should be fine, it probably wont actually save permanently unless you choose the save option when closing Mach but have never tried.
Hood
Logged
first off
Active Member
Offline
Posts: 13
Re: Auto Z for an ATC
«
Reply #7 on:
August 29, 2011, 10:31:17 AM »
Hey guys thanks for the help.
Do you know what the Oem Button code is for the "set tool offset" button? That should put the value into that offset DRO feild and the tool table as you do. Do you know if I need to toggle the "tool offset" led before the "set tool offset?
Russ
Logged
Hood
Active Member
Online
Posts: 17,368
Carnoustie, Scotland
Re: Auto Z for an ATC
«
Reply #8 on:
August 29, 2011, 01:05:06 PM »
That is a VB button so no OEM code for it.
You can look at the VB in it by going to Operator menu then Edit VB Button and then clicking on that button when its flashing.
Hood
Logged
first off
Active Member
Offline
Posts: 13
Re: Auto Z for an ATC
«
Reply #9 on:
August 29, 2011, 06:55:33 PM »
Hey hood
Being a VB, button how can I address the"set tool offset" button from the auto-z macro that I am working on? It would simplify this macro if I can do a " DoOemButton (*********)" or something like that for the "set tool offset" button.
Logged
Pages:
1
2
»
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Quantum
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Wizards
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...