Hello Guest it is July 19, 2019, 06:54:47 AM

Author Topic: homing routine  (Read 16093 times)

0 Members and 1 Guest are viewing this topic.

homing routine
« on: September 09, 2009, 08:18:21 AM »
Hi

I have 2 problems with the ref allhome function

1. I want that for X and Y after have activated the home switches run to a ref point and reset to zero ?


2. after I've made a ref allhome mach3 locks and must be reset to continue. this is only in program run (ALT-1) if I do it in diagnostics (ALT-7) one at a time I can get move on.

hope any one can help me with my problems.

Thanks

Mike
Re: homing routine
« Reply #1 on: September 09, 2009, 08:42:27 AM »
okay, problem no. 2 is solved. I have not montert switch on z yet and forgot to remove it from the script.
Still need some code for problem no.1 :)

Mike

Offline poppabear

*
  • *
  •  2,231 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: homing routine
« Reply #2 on: September 09, 2009, 09:05:52 AM »
"1. I want that for X and Y after have activated the home switches run to a ref point and reset to zero ?"

so, what your wanting is AFTER you have homed the machine, you want it to move to a NEW point, and then have it REZERO to MACHINE coordinates 0?
OR, are you wanting it to Reference at you homes, move to a new position, and then REZERO in the current work coordinate system to a "0"?

Which one do you want?

The first one, at least to my knowledge, I would have to give you a "Plug-in" to re-reset machine coordinate 0 to the new position you choose as machine
zero after you "Home" the machine.

The second one can be easily done in macros.

scott
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: homing routine
« Reply #3 on: September 09, 2009, 09:08:58 AM »
1) set up home offsets in Homing Limits, then after homing, just GoTo Zero.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: homing routine
« Reply #4 on: September 09, 2009, 09:21:01 AM »
Hi poppabear

I want the second one :) .. I need to zero machine coordinates (ref all home) X and Y, then move to a new position and then Zero Work coordinat X and Y. (Fix point every time)
What I dont want is to hit GoTo Zero after a Ref All Home

Mike

Offline poppabear

*
  • *
  •  2,231 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: homing routine
« Reply #5 on: September 09, 2009, 01:03:02 PM »
Ok, do this:

open your Mach3, goto the Operator->Edit Button script
press the "Ref All Home" button it will open up a VB script editor.
Put this code in it.

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
While IsMoving()
Wend

Code("M990")

now hit the save button, then goto View->Save current layout,  NOTE were not done yet.

Now go to Operator->VB Script Editor it will open the VB script editor

Put this code in the window (note if some code appears in it, just delete that code):

Code("G0 X 1.0 Y 1.0 Z 1.0")
While IsMoving()
Wend

SetOEMDRO(800,0)
SetOEMDRO(801,0)
SetOEMDRO(802,0) 

Now, hit the "Save As" and call it "M990.m1s"    NOTE: MAKE SURE that it is saving this macro to the macro folder that belongs to the profile you
are currently running!!!!!!!!!!!!!!!

hit the ok

Now your Mach3 should still be in its "Just opened it up and started it state" (i.e. the reset is still flashing), and the Ref LEDs should all be red.

now push the "Ref All" button, what it will do is this, it will first reference to your home switches, once there (ref leds turn green), it will call the Macro M990
Now M990 will run and it will move the machine to the position X = 1, Y = 1, Z = 1 at a G0 rate, once it reaches the position, it will "Zero" the work coordinates
of the X, Y, and Z to "0".

What YOU will need to do is open up the M990 in the VB script editor, and change the Positions I put in it to where YOU want it to stop at, if you need to add
more axis, then you now have an example.

scott

Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/
Re: homing routine
« Reply #6 on: September 09, 2009, 02:20:07 PM »
Thanks it's almost works :) But I think it needs a dro reset also when it is finish Ref all home before it jumps to M990. now it is moving to the last work coordinates zero and simply add 1.0 every time I ref all home.

Mike
Re: homing routine
« Reply #7 on: September 09, 2009, 02:58:01 PM »
okay it is working now, but I had to change G0 to G54. hope not it is a problem for me later. Please let me know if you think this is a bad idea.

Thanks again
« Last Edit: September 10, 2009, 12:25:28 AM by Mike_DK »

Offline poppabear

*
  • *
  •  2,231 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: homing routine
« Reply #8 on: September 10, 2009, 08:03:27 AM »
I am sorry try this:

Code("G53")
Code("G0 X 1.0 Y 1.0 Z 1.0")
While IsMoving()
Wend
Code("G54")
SetOEMDRO(800,0)
SetOEMDRO(801,0)
SetOEMDRO(802,0)

scott
« Last Edit: September 10, 2009, 08:07:48 AM by poppabear »
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/