Hello Guest it is August 20, 2019, 09:00:47 AM

Author Topic: homing and limit switches  (Read 7701 times)

0 Members and 1 Guest are viewing this topic.

homing and limit switches
« on: December 01, 2010, 01:18:57 PM »
I am trying to get my machine to be able to set the Machine Coordinates but I watched the videos and when I set the limit switches to active high and then go to diagnostics the yellow lights come on for them.  The yellow lights will go out if I set the limit switches to active low only.  Also my machine is a three axis and when I try to do a "reference all" and I hit the escape key the whole process stops it does not switch over to the x or y axis.  the first one to move is my z axis.  Any suggestions on these problems.  I also notice that I do not have a limit switch on the z azis for it to hit when I go to zero for the reference only a switch at the bottom.

we will just start from here.   When i bring my z axis to the top how can I make a change to zero it at that point so I can then let the machine zero the x and y azis

thanks
butch
« Last Edit: December 01, 2010, 01:31:01 PM by teebutch »
Re: homing and limit switches
« Reply #1 on: December 01, 2010, 06:30:00 PM »
First things first. You will set the limit switches to active high or active low based on how it is connected to the circuit board in your machine controller and will differ from one machine to the next. For example, one of my 3-axis machines uses one active high and two active low switches. Basically, you will use whichever one works for each axis. In your case you will choose active low, meaning that the switch is providing a ground signal to the PC with the switch has been activated, and the rest of the time it is at +5V.

Now, to your homing problem. The "REF ALL HOME" button is a VB-Script. Here is how to modify it to do your dirty work!

Go to "Operator" > "Edit Button Script"
All of the button with VB-Script attached to it will begin to flash. Click the "REF ALL HOME" button to edit it.

Now that you're in the editor you should see something like this without the comments:

DoButton( 23 )      ' Ref (home) Y Axis
DoButton( 22 )      ' Ref X Axis
DoButton( 24 )      ' Ref Z Axis

DoOEMButton(133)   ' Zero X Encoder
DoOEMButton(134)   ' Zero X Encoder
DoOEMButton(135)   ' Zero X Encoder



Simply change this to read:

DoButton( 23 )      ' Ref (home) Y Axis
DoButton( 22 )      ' Ref X Axis

DoOEMButton(133)   ' Zero X Encoder
DoOEMButton(134)   ' Zero X Encoder
DoOEMButton(135)   ' Zero X Encoder

It will now home Y, then X, then zero X, Y and Z.

Also to note, this script is slightly dated as DoButton() is a deprecated function. To bring it up to date with the times use this script:

DoOEMButton( 1023 )   ' Ref (home) Y Axis
DoOEMButton( 1022 )   ' Ref X Axis

DoOEMButton(133)   ' Zero X Encoder
DoOEMButton(134)   ' Zero X Encoder
DoOEMButton(135)   ' Zero X Encoder

Offline Vogavt

*
  •  258 258
    • View Profile
Re: homing and limit switches
« Reply #2 on: January 17, 2011, 01:46:18 PM »
Quote
DoOEMButton(133)   ' Zero X Encoder
DoOEMButton(134)   ' Zero X Encoder
DoOEMButton(135)   ' Zero X Encoder

I may be stating the obvious, but shouldn't it be:

DoOEMButton(133)   ' Zero X Encoder
DoOEMButton(134)   ' Zero Y Encoder
DoOEMButton(135)   ' Zero Z Encoder


I was searching for a way to AutoZero my A-axis after the other three are finished. I don't want the rotary table to actually move, I just want it to zero after I manually hit a switch since I don't use it all the time.

BTW, do you happen to know what the DoOEMButton() is for the A-axis?

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: homing and limit switches
« Reply #3 on: January 17, 2011, 02:22:26 PM »
What OEM are you wanting? ie A Axis what?

Hood

Offline Vogavt

*
  •  258 258
    • View Profile
Re: homing and limit switches
« Reply #4 on: January 17, 2011, 03:50:10 PM »
Yes, A-axis.  I believe I found it on the wiki as DoOEMButton (1025).

Offline Vogavt

*
  •  258 258
    • View Profile
Re: homing and limit switches
« Reply #5 on: January 17, 2011, 07:47:06 PM »
Nope. Wasn't 1025.

I've got it hooked up and it rotates until it finds the new magnetic NC switch. Once it finds it, the table reverses until the switch goes closed again, but it won't zero the dro like the other 3 axis do.

Here's what I've got but it doesn't work. Any ideas?

DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)
DoOEMButton(1025) 


I also tried (1011), but it didn't work either.


Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: homing and limit switches
« Reply #6 on: January 17, 2011, 08:06:15 PM »
What DRO are you wanting to zero? OEM 133 to 135  are the encoder DROs and as far as I am aware there is no DRO for A encoder as you only have 3 encoder inputs.

DoButton(25) and  DoOemButton(1025) are the same thing, ie reference A Axis.

If you want to zero the A Axis after the homing then DoOEMButton(1011) should work fine.

If you attach your xml I will see if I can find the problem.

Hood

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: homing and limit switches
« Reply #7 on: January 17, 2011, 08:11:54 PM »
Is it OEMDRO 173?

If so, how about SetOEMDRO(173,0)
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: homing and limit switches
« Reply #8 on: January 17, 2011, 08:15:19 PM »



I was searching for a way to AutoZero my A-axis after the other three are finished. I don't want the rotary table to actually move, I just want it to zero after I manually hit a switch since I don't use it all the time.

BTW, do you happen to know what the DoOEMButton() is for the A-axis?

I might be missing something here, but couldn't you just un-check the A axis in HOMINGand select AUTO ZERO ?
Re: homing and limit switches
« Reply #9 on: January 17, 2011, 08:18:00 PM »
A machine coord DRO is 86 by Hoods XLS