Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: teebutch 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
-
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
-
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?
-
What OEM are you wanting? ie A Axis what?
Hood
-
Yes, A-axis. I believe I found it on the wiki as DoOEMButton (1025).
-
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.
-
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
-
Is it OEMDRO 173?
If so, how about SetOEMDRO(173,0)
-
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 ?
-
A machine coord DRO is 86 by Hoods XLS
-
But is it machine coords or offset for A that is wanting zeroed? That is what I am unsure of.
Hood
-
If it's the offset, looks like it would be DoButton (1011)
or DoButton (86) for mach. zero
-
If you want to zero the A Axis after the homing then DoOEMButton(1011) should work fine.
Yes, I'm hitting the "Ref All Home" button (which is where I got the code from and posted in post #5).
Looks like I don't need all the information that's in there since I don't have encoders. Correct?
I simply added the DoOEMButton(1025) to the bottom of the list.
Thanks for taking the time to look at this.
-
ooops.. meant to say SetOEMDRO(86,0) Like Jer said, not DoButton
-
Looks like I don't need all the information that's in there since I don't have encoders. Correct?
I would guess that to be correct.
-
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)
DoOEMButton(1025)
So do I keep the blue or the red?
-
They are two different things. Use either:
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
or
DoOEMButton(1024)
DoOEMButton(1023)
DoOEMButton(1022)
DoOEMButton(1025)
-
Thank you!
-
Hello All,
While this is not directly related to the above it is a similar problem I am currently having re: homing. My machine has worked fine for some time and all of a sudden sees the switches as active when I know they are not, I've got them jumpered out. Checking diagnostics I see that there is no active pin on port1, but pin 12 is configured for the home and limit switches strung together.
So, where to start, the control box, the parallel cable, the PC, or the software? Or am I missing something all-together different?
Thanks,
-
Sounds like you are getting noise on the limits wiring, try a debounce interval of 2000 but preferably shield the wiring and ground correctly if you have not done so already.
Hood
-
Hood, After looking at everything I considered noise. Could you expound on the 'debounce' a bit.
Thanks,
-
Config menu then General Config and top right you will see two debounce settings, one is the Interval and the other is for the index pulse only. It is the Debounce Interval you want to change as that affects all inputs other than the Index. What it does is make Mach delay acting on signals shorter than the time you set, noise is usually erratic so setting 2000 should normally be more than enough for Mach to distinguish between noise and a true signal.
Hood