Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: castleworks on June 23, 2010, 01:26:32 PM

Title: Setting machine Coordinates
Post by: castleworks on June 23, 2010, 01:26:32 PM
Hi Ail,

I am having some difficulty with homing and machine coordinates.

When I jog the table so that all home switches are active and in their respective homes, how do I tell Mach that the current position is "HOME"  Currently the machine coordinates show it to be in another arbitrary place and I cannot seem to set the current position to zero.  I want to be able to test out the homing of the table and insure all axis go home properly and position properly.

Any suggestions?

A second question is, when my table moves the DRO's indicate the table has moved twice the actual movement of the table. Is this set up in the motor tuning section?

Thanks

Kevin
Title: Re: Setting machine Coordinates
Post by: Zaae on June 23, 2010, 11:37:14 PM
Well, you'll need to straighten out problem number 2 first, but we'll need some more info to help, are you running stepper motors or servos? Other info needed is screw TPI, additional gearing, microstepping?
Title: Re: Setting machine Coordinates
Post by: castleworks on June 24, 2010, 09:07:52 AM
Thanks for the input...here are details on my setup

Using stepper motors all have a 1.8 degree / step

For X & Y axis Ball screw is 1" diameter with a screw lead of 0.5"  Both are direct drive with no gearing.

Z axis has a pitch of .1"

I am not sure how to answer your question on micro stepping. I am using Gecko G203V drives for each axis.

I had run through the calculations on the motor setup, but I am guessing I doubled something by accident.

If you need additional information let me know. I really appreciate you assistance.

Kevin
Title: Re: Setting machine Coordinates
Post by: Zaae on June 24, 2010, 01:36:46 PM
Forgot to ask, how many starts do your screws have?

I'm no pro with this stuff, I've only done it a few times, but here's my calculation, based on a single start screw:

direct drive motors, so no gear reduction.
1.8 degree motors = 200 steps per rev.
10x microstepping = 2000 steps per rev. (according to gecko's website for the G203V)
5tpi 1 start screws = 10000 steps per unit (inch in this case).

If you want to run metrics, divide 10000 by 25.4 = 393.700787 steps per unit (mm this way)

Someone please correct me if this is wrong.
Title: Re: Setting machine Coordinates
Post by: Zaae on June 24, 2010, 02:55:31 PM

As for your question about homing, I have a modified screen set, so the wording may be a bit different, but the basic idea is the same. Make sure you've got your steps per unit all figured out before you work on this, or your numbers will be wrong.

First, move your machine manually to somewhere in the middle, well away from any limits, and click reference all home, but be ready to hit stop. Note which direction each axis is moving. If any of them are moving away from the limit switch, click Config->homing & Limits, and check reversed, or home neg to correct it. Also make sure Auto Zero is enabled. Once you have all axes moving towards their respective limit switches, you can start setting up the limits.

Click reference all again, and let each axis hit the switches, but again, be near the e-stop button in case they don't stop like they should. If this all works as it should, this will tell mach3 where 0,0,0 is at, and will reset each machine coordinate to zero.

Next run each axis manually as far as you'd like it to move, and enter the number from the respective DRO into the homing and limits config page.

Last, soft limits must be enabled if you want the machine to actually use these constraints.

The setup is different for each machine depending on its configuration, wiring, LH/RH screws, etc. so you may have to fiddle with the settings in the homing & limits page to get things working as expected.

Hope all this helps :)
Z
Title: Re: Setting machine Coordinates
Post by: castleworks on June 25, 2010, 09:09:00 AM
Hi Zaaephod,

Thank you for the assistance on this. I entered the motor calculations per your suggestion, moved to the center of the table and clicked on REF ALL HOME  All axis briefly moved, and I believe Mach 3 thinks it is already at home.

My home switches are active low and each input pin is showing high when I reference all to home.

 I have verified when the home switches activate the respective input pin goes low. and operates as I would expect.

ACTIVE LOW is checked on the input settings section.

If I uncheck this, setting it to active high and then reference all to home Mach 3 tells me "Requested Home axis home switch is active, please fix then home." I would expect all this if I am thinking correctly.

For my home switches I am using NPN proximity switches, the respective input has a 2.2K pull up resistor to 5V. When the home switch activates, the pin goes low.

Hmmm What am I overlooking?

Thanks

Kevin
Title: Re: Setting machine Coordinates
Post by: Zaae on June 25, 2010, 09:53:51 AM
Kevin,

Have you configured the input pins under Ports & Pins?  I guess I didn't go over that. The input signals tab lets you set up what pins are for what signal in mach.

For example, XHome enabled, port 1, pin 11 for me is my X limit switch. I'm betting this is what you're missing.



Title: Re: Setting machine Coordinates
Post by: castleworks on June 25, 2010, 11:21:18 AM
Actually I have all that set up my home switches are on port 1 pins 15, 13, 12

I can see these indicators toggling on the diagnostics screen when I manually jog the table to each home switch.
Title: Re: Setting machine Coordinates
Post by: Zaae on June 25, 2010, 12:03:37 PM
It sounds to me like you've got everything set up then. I'm sure we're just missing something simple here, but it's so hard to tell without seeing the configuration. If you'd like, you can post your XML file and I'll take a look at it when I can. Problem is, over the last few months, I've quoted a bunch of jobs and, just as expected, they all showed up at once, with deadlines that are painfully close. I won't be around again until later tonight or tomorrow.

Off to make some chips :)
Title: Re: Setting machine Coordinates
Post by: castleworks on June 25, 2010, 04:55:42 PM
I agree I am overlooking something simple. Here is the XML file.

One observation I just noticed....I disabled the ESTOP input on the config screen, because I am not using that input. However each time I disable it, save the settings and exit. The next time I go back into the input settings it is enabled. perhaps this is what is shutting me down??

Title: Re: Setting machine Coordinates
Post by: stirling on June 26, 2010, 01:02:32 AM
from what you've said you seem to be wired and configured right so I'm guessing noise - experiment with a bit of debounce on the config/general config page (top right).

You can't disable e-stop - not allowed - but you can de-activate it!

early in the day here but isn't 0.5" lead, 2 turns/in not 5?

Cheers

Ian
Title: Re: Setting machine Coordinates
Post by: Hood on June 26, 2010, 11:45:09 AM
As Ian says you  cant disable it and really even the smallest of Machines should have an external E-Stop button but for testing purposes just change the active state of the E-STOP in Ports and Pins.
Hood
Title: Re: Setting machine Coordinates
Post by: CNCdrive_hun on June 27, 2010, 05:25:44 AM
It seems to me that you get noise on the limit switches.
Check if they triggers when e.g. you jog the machine (when they should not trigger), it can be noise from steppers....

You can filter the limit switches in Mach3 -> Config -> General Config -> Debounce Interval.

The input is low pass filtered with a time constant set in the Docunce interval.

If you use the limit switches for home functions too, then with too high debounce value the home will be unprecisious, so try to find the lowest aquadate value.

Also you may put some HF ceramic caps 1..10nF on the LPT port inputs to filter noise out.

BR,
Balazs
Title: Re: Setting machine Coordinates
Post by: castleworks on June 28, 2010, 08:16:12 AM
I will try the debounce and filter caps.

For testing purposes I have disabled the EStop, but do have an external Estop switch to disable power. I realize this is not ideal for the long run but should suffice for troubleshooting purposes. 

The home switches do not appear to be triggering during jog operations. Voltage on the input pins remain at 3.9 - 4.1 VDC during jog operations and are grounded when activated.

UPDATE: Disabling the EStop had no effect on the problem

I appreciate all the help you are providing.

Castleworks
Title: Re: Setting machine Coordinates
Post by: CNCdrive_hun on June 28, 2010, 08:56:33 AM
Hi Kevin,

Can you explain the problem a bit more detailed?
You mentioned that when you press "Ref all home" button Mach thinks that your axis is already at home, right?
From what do you think that Mach is thinking this way?
What happens when you press the Ref all home button, axis starts to move, or not moves at all?
Any text appears in the "Status" field? (right next to e-stop button)

I think you should write down step by step what you do and what happens to let me see things closer.
Also a wiring diagram of your limit/home switches may help some.

Did you try to home axis separately? Go to diagnostics screen and there is RefX, RefY, RefZ etc. buttons,
so you can test axis homing separately, hopefully then you can locate the error if it is a connection problem or noise on an input.

And as Ian and Hood mentioned you cannot disable the external E-stop, ofcourse there is a trick to disable it with writing a port number which not exist, e.g. port 0 into e-stop setup, but this is not recommended, because it will leaves the machine without safety, so don't do this....


Cheers,
          Balazs
Title: Re: Setting machine Coordinates
Post by: castleworks on June 28, 2010, 12:36:24 PM
Hi Balazs,


I will throw a lot of information at you here...so please ask if I need to clarify anything. I am working on getting a schematic in a form to post.


Sequence of step I have taken......

Manually jog Y axis until the home switch activates. I am confirming activation in three ways.... pin 13 transitioning from 4.0 VDC to 0.0 VDC, LED on BOB turning off and LED indicator on proximity home switch turning on.

Manually jog X axis until the home switch activates. I am confirming activation in three ways.... pin 15 transitioning from 4.0 VDC to 0.0 VDC, LED on BOB turning off and LED indicator on proximity home switch turning on.

Manually jog Z axis until the home switch activates. I am confirming activation in three ways.... pin 12 transitioning from 4.0 VDC to 0.0 VDC, LED on BOB turning off and LED indicator on proximity home switch turning on.

NOTE Manually jogging using the arrow key for X & Y Pg up and Pg Dn for the Z axis) and they are responding properly (at this point, more on that in a minute)


Once all home switches are activated and the table is in its home position, I individually click on "Zero X"  "Zero Y"  "Zero Z"  This sets the DRO's to zero.

I then manually jog the table to the middle position on each axis.

I then click on "REF ALL HOME"

Each axis begins to move (in the correct direction)  sometimes each axis will only move a few steps and stop , other times it will move one or two rotations of the ball screw.  When each axis moves the DRO's respond correctly HOWEVER once the table stops the DRO value returns back to the original value it started from, even though the table has moved.  For example if the X axis were at 10.0 inches and I start homing, the axis moves, and the DRO responds correctly and may move to 9.0" but once the table stops, the DRO returns to 10.0 even though the table has moved and stayed at its new position of 9.0"

No message appears in the status screen when this is occurring.

I have used the diagnostics screen to individually home each axis. When I do this each axis behaves the same EXCEPT the Z Axis......When I home the Z Axis, it moves in the incorrect direction (but still only briefly)  AND if I go back to the main Program Run screen to manually jog the table, X & Y axis behave correctly...however the Z axis direction does not work (regardless is I tell it to jog up or down....it only jogs down.  The only way I have been able to get it to reset correctly is to turn everything off and reboot.

Following reboot I get the same results from the above procedure including the problem with the Z axis. I have tried this several times with the same results.

I really appreciate everyone trying to help me resolve this....I am certain I am overlooking something obvious
Title: Re: Setting machine Coordinates
Post by: castleworks on June 28, 2010, 12:37:52 PM
One more piece of information......


At no time on the diagnostics screen do I see the E Stop indicator activate.
Title: Re: Setting machine Coordinates
Post by: castleworks on June 28, 2010, 01:36:31 PM
Hi All....

ISSUE RESOLVED:

Asking me for a schematic for the home switches caused me to take another look at how they were wired and to confirm they matched the schematic. This led me to finding the error of my ways.

The rest of the story......

Proximity sensor home switches were wired to the correct BOB input with a pull up resistor to 5VDC (5VDC source on the BOB)....the NPN sensors operate on 6-32 VDC, so I was powering them by a separate 12VDC supply. Originally I had them powered off the BOB 5VDC source but then realized they would not operate on 5VDC so I powered them from a second power supply.

I failed to move the pull up resistor over to the 12VDC source and left it on the BOB 5VDC source. These two supplies do not share the same ground reference, so I suspect they were fighting each other.

Once  I moved the pull ups over to the 12V source....all is operating correctly and home properly.

Thank you all very much for your assistance.....until my next oversight :)

Kevin
CastleWorks
Title: Re: Setting machine Coordinates
Post by: Zaae on June 28, 2010, 01:45:26 PM
Castle,

Very good! Glad you figured it out.

As far as the Z going the wrong way, have you tried changing the 'home neg' box for the z axis in homing and limits? Not being able to jog Z one direction probably means that mach thinks its at the soft limit for Z.

Title: Re: Setting machine Coordinates
Post by: castleworks on June 28, 2010, 04:35:23 PM
Z axis is running good now

Stirling.....you were correct .5 lead equals 2 revs/ inch.....all is much better after that change as well.

Thanks all!

www.CastleWorksKC.com
Title: Re: Setting machine Coordinates
Post by: Cois on July 05, 2010, 09:42:53 AM
• The X-near and X-far (slaved axis) work in normal mode together. But if I want to “ref all home” On the “
Program Run Alt1” page. The MM seeks the Z-home, the Y-home, but on the X axis, only the X near motor is turning, the X Far motor won’t turn WHY.

• The arrow keys on the key board to move the axis (XYZ) don’t work sometimes. I must press the wrong something. The Jog On/Off (Ctrl ALT J) is green and the Fly out work when I click it with the mouse to move the axis. The only way I can get out is to re-start the program.

• My Y –axis is moving Right and counting up (that is how I want it), but I must used the Left key-board button to move to the right. In the literature they said “This is done by selecting System Hotkeys in the config menu”…..I tried it many ways, but it don’t work.





Title: Re: Setting machine Coordinates
Post by: BR549 on July 05, 2010, 10:02:29 AM
On the Gen config page check the box "Home slave axis with master axis"
Title: Re: Setting machine Coordinates
Post by: 415porto on October 11, 2012, 02:47:31 PM
Hello

My buddy and I have build a Joe's CNC machine.  We are having a couple of configuration problems.

I want to set machine coordinates to zero.  I have set everything up in the Homing/Limits screen including Auto Zero.  When I home the machine DROs move in the correct direction as well as my X&Y axises.  When the gantry gets to the home position it hits the home switches and then backs off an inch as I set it.  The problem is that Machine Coordinates do not zero out.

The next issue I am having is I have a A slaved to my X axis.  These two axises are not in sync.  So the A axis will reach zero before the X axis and the A axis will stop while the X axis keeps moving totally tweaking the gantry. >:D


Note:  I have X home and X -- set to the same pin, and Y home and Y -- set the the same pin also.  Everything tests ok in the diag. screen.  All set to Active Low.

Can somebody tell me what I am missing?
Title: Re: Setting machine Coordinates
Post by: Hood on October 11, 2012, 04:44:59 PM
The machine coords will not zero if you have a value in the Home off as  that setting is meant to tell Mach if you have a home switch that is not at the axis extents. Thus when Mach homes it sets the machine coords to the value you have entered.
Also Mach only backs off a switch enough to change its state back to what it was before hitting it, if yours is indeed moving much further then only things I can think of is you have very poor switches or you have a massive amount of Debounce Interval set in General Config.
Hood
Title: Re: Setting machine Coordinates
Post by: dark-lans on November 17, 2013, 12:33:22 PM
Hi,

I do not have home switches, and simply want to jog each axis to a position that I physically know, such as X0 for my X axis, based on my machine geometry, and set the machine coordinates to X0, is this possible?

Thanks,
Max
Title: Re: Setting machine Coordinates
Post by: Hood on November 17, 2013, 12:59:03 PM
Yes, just make sure you do not have any home switches enabled in Ports and Pins and also make sure you have Auto Zero chosen in Homing and Limits page and lastly Make sure you do not have a value set for Home Off, also on Homing and Limits page.
Then when you jog to where you want machine coords zero to be you just press the RefAll button and that will set the machine coords zero.
Hood
Title: Re: Setting machine Coordinates
Post by: dark-lans on November 17, 2013, 03:26:17 PM
Hood,

Thanks this is really helping. I watched over an hour of videos but nobody seems to be addressing what to do without homing switches. Now it seems to be working, but for some reason when I run my test code, it moves to the work offset of X-1.3 first, then runs the rest of the program. Any ideas on why it would be doing this?

Essentially all I want to do is:

1. Set my machine to a physical zero that I establish by looking at the machine on X Y Z
2. Run a code to X Y Z based on the physical zero that I've established

The work offset is throwing me off and I'm not sure how to get rid of it.

Thank you for the help,
Max

Title: Re: Setting machine Coordinates
Post by: dark-lans on November 17, 2013, 04:03:47 PM
Another major problem I am now having is when running a code.

The code will say X1, the machine will physically move to around 0.75 and the DRO will indicate .7172.

I understand that my motor tuning steps may be off, but why could the machine DRO be stopping at .7172 when it is commanded 1?

Thanks again,
Max
Title: Re: Setting machine Coordinates
Post by: Hood on November 17, 2013, 04:40:06 PM
You would have to attach your code, your offset table (fixtures.dat)  and your xml for me to take a guess at whats happening.
Hood
Title: Re: Setting machine Coordinates
Post by: ger21 on November 17, 2013, 04:41:54 PM

1. Set my machine to a physical zero that I establish by looking at the machine on X Y Z
2. Run a code to X Y Z based on the physical zero that I've established

The work offset is throwing me off and I'm not sure how to get rid of it.

Thank you for the help,
Max



Go to the offsets page and set the offsets to zero, or, after using Ref All, press the zero X and zero Y buttons. Work coordinates are the coordinates that are used when g-code is run. If you don't want any offsets, then you must set the offsets to zero.
Title: Re: Setting machine Coordinates
Post by: dark-lans on November 17, 2013, 06:18:39 PM
Gerry,

Thanks that's working out perfectly! I was confused by the work coordinates but after I read your post I experimented with the work coordinates and now understand how they are used. Thanks for your patience with this, I now see how basic my misunderstanding was.

Hood,

The issue I was having was with a screw mapping x-axis curve. I've been trying lots of things today and forgot I had that on. Once I took it off everything went back to normal. Thank you for the fast responses today and your willingness to look at my config files.

Thanks!
Max