Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Bagpipes on July 15, 2006, 01:42:18 AM

Title: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 15, 2006, 01:42:18 AM
When I use my right arrow to jog my x-axis, the table moves from right to left towards the motor in an x-minus direction. Can I reverse this in Mach2?
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 15, 2006, 02:38:14 AM
Its been a long time since I used Mach2 so not sure exactly where it is but there is a setting for reversing the motor but just not sure where it is. You can reverse the motor by changing the Direction Low active setting, either check it or remove the check.
Hood

BTW is that not the right direction its travelling anyway? remember its the tool that is going positive or negative when you move an axis.
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 15, 2006, 12:27:55 PM
I hink my first statement was in error. As the router is traveling away from the x-axis motor the counter is going into minus numbers. Sorry about that.  I'm totally new to this and just getting the machine started up. The other strange thing is that although I'm set up for inch units, the DRO counts much faster than the actual inches traveled.
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 15, 2006, 12:38:30 PM
I dont know which side of the table your motor is so cant say whether its right or wrong. What is your setup? is it like a mill or like a gantry? ie does the table move X and Y and tool stay still or is it the tool that moves X and Y and the table stays still?
If the tool is going from left to right in relation to the workpiece and the DRO is increasing it is correct. If the DRO is decreasing it is wrong.

Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 15, 2006, 12:41:36 PM
For your DRO counting much faster than distance travelled its probably you have the wrong steps per unit in the motor tuning. If you go to the settings page you should see a button for setting steps per unit, press this, follow the prompts and it should set you up with the correct steps per unit.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 15, 2006, 03:00:36 PM
Here the way the axes are set up right now according to Mach2

BTW many thanks for the pointers on changing the steps/unit. I will monkey with that today!
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 15, 2006, 06:07:42 PM
Yes OK its a gantry router so it is the tool that moves and not the table, so the X is actually the wrong way. What you need to do is find the setting for reversing the motor. As I said its been a while since I had Mach2 Installed so I cant remember where it is or actually what it is. I am not sure if there is a specific setting for reversing or whether its just the low active you need to check or uncheck, you will just have to look through the settings from the config menu.
 Also you wont find the set steps button i mentioned in my previous post, sorry, I forgot it was Mach2 you were using, its only in Mach3 I think. You will have to work out the steps per unit yourself by TPI of ballscrew, steps of motor, drive stepping and motor steps per rev.
 Incidentaly why are you using Mach2? might be the time to install Mach3 and try it out, you can have Mach2 and 3 on the same computer so if you find Mach2 is better you can keep it, but I think once you have tried Mach3 you will stick with it ;)

Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 15, 2006, 06:24:16 PM
I'm only using Mac2 because the K2 people thought it was a better (more stable) option. From what I can tell on this forum, Mach3 is well established and well supported, so I am going to change to 3. In fact, maybe I should do that before I spend much time on the set steps.
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 15, 2006, 06:32:04 PM
Definitely, if you dont have the machine set up properly now is the time to shift over.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Leeway on July 16, 2006, 05:32:53 AM
Now thats a move in the right direction.  ;D
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 16, 2006, 01:02:52 PM
Leeway I bet you have been waiting months for the right thread to use that line in!! :-)

Anyway - I'll update this thread with my Mach3 fixes. Hopefully that'll do the trick. Thanks for the help so far Hood!
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Steve Nuttall on July 17, 2006, 06:34:36 AM
swap 2 of the wires from 1 phase on the stepper motor
it will reverse
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 17, 2006, 06:18:22 PM
OK - I loaded Mach3 without uninstalling Mach2. Mach2 still jogs the table around but I can't get any movement using Mach3. I checked the driver test and that looks good. x y and z motor outputs are all checked green. Any ideas?
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Brian Barker on July 17, 2006, 07:20:19 PM
Check the port number of teh step and direction pins :) It comes set to zero and I think you will need to put in ones.
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 17, 2006, 10:08:51 PM
This what's on my current setup
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Chip on July 17, 2006, 10:37:13 PM
Hi Bagpipes

Under Config - Motor Home/Soft Limits, Check the Reversed column for the Axis you need to revers.

Chip
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 01:36:59 AM
Bagpipes
In the screenshot you have above you dont have any ports set for step or direction, you need to enter 1 in each of the port boxes. Then if an axis is moving the wrong way you can change the Dir low acive for that axis and it should reverse.
Hood

Edit
 OOPS, sorry Brian, never noticed you already said about the port number.
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 11:38:29 AM
A thousand thank-yous, guys. I am determined to get this machine to move today - even if it's in the wrong direction!!
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 12:06:16 PM
Just a bit curious why you are called bagpipes, are you from Scotland?
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 12:23:42 PM
Yes - good guess laddie - I am indeed from Scotland. Born and bred in Inverness.
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 12:59:12 PM
I added 1s to both the step port and the direction port for all three axes. Nothing happened. Do I need to restart to enable those setting changes?
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 01:33:16 PM
Still in Inverness? I am from Carnoustie, quite a few miles south of you.
 Dont think a restart is needed but you could try. Also just noticed you have 2 and 3 pins for ALL axis, thats not right, you need to sort that out. Have a look in your Mach2 config and see which pins you had set for the step and dir of each axis.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 01:41:53 PM
Carnoustie! Jings mun, hae a wee drammie for me! I'm in California now (see my web site in my profile)

What should I set those step and direction pins to? Whatever's in there is what I got as defaults when I installed. I'll check against Mach2 settings...

Another question, on the INPUT SIGNALS screen you get pins 10 thru 13 ans 15 for setting x,y and x limits and home. Trouble is you only get five available pins and you need six if you want a home for each axis.. what's the standard given that I have a limit switch on each axis?
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 01:47:56 PM
You will have to look and see which pins you have to which drive, its not a generic thing, it can be set up to use any of the output pins. It will more than likely be
x step 2 dir 3
y step 4 dir5
z step 6 dir 7

As for the limits you dont actually need seperate home switches, I just have one optical  switch for each axis and they  act as + and - limits, then when a home is done mach will use them as home switches.
 What kind of switches do you have? is this a bought setup or are you making the control up yourself?
 Will check out your site in a wee while.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 02:02:47 PM
Hey - I got the axes moving! I went into mach2 and although the format is quite a bit different I was able to map the settings onto the mach3 page, and it worked. The x-axis is still moving the wrong way but I think we addressed that earlier and I will try that in a few moments.

I hope this thread might help other total newbies in my position.

Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 02:05:26 PM
Great, all you need to do now is take the tick out of the X Axis Dir LowActive and it should work the right way.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 02:17:12 PM
Just did that - everything runs in the right direction now. Many thanks for the guidance.

My limit switches aren't working though. Should they be on low active too? If I click them on I don't get any lights on the diagnostics screen. I'm just afraid of the carriages slamming into the body of the machine by accident (ouch!)
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 02:20:32 PM
You will need to set them up to the correct pins, will depend on whether they are NC(normally closed) or NO (normally open) whether you will need low acticve ticked. If you had them working in Mach2 just have a look and see what the settings were.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 02:23:48 PM
BTW had a look at your site, some nice looking guitars, not that I know anything about guitars and thats a richt bonnie lassie ye hae ;)
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 02:40:13 PM
Thanks Hood, I'll let the wee quinie know you said that!
Unfortunately I didn't get that far in Mach2. I'll monkey around with the limit switches today.

An interesting note: After reversing the direction of travel I went into Motor Tuning and set up all three axes to run nice and smooth at 300 ipm. When I saved the settings and tried the machine again the x-axis direction had reset itself to the original backwards direction and I had to go in and recheck that box again.

Time to watch the setup vidoes again I think!
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 02:44:42 PM
Make sure you click apply when you change a setting, probably not what was wrong but just a thought. Did you get any doccumentation with your setup? Or is it stuff you bought and connected yourself, ie Geckos or Rutex etc, PMDX, CNC4PC, SoundLogic breakouts?
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 03:07:10 PM
My setup is a K2 KG3925 CNC Router that I bought used with very low mileage. Everything is stock except that I have ABBA heavy duty ballscrews on the machine (there's a photo of it earlier in this thread) Motors appear to be Made by DGM. Not sure who made the limit swiches..

When not being jogged, the servos make a very feint creaking sound about every 2 seconds. I heard there's a setting in Mach3 whene you can limit power to the motors when not in use.
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 04:12:55 PM
Just had a quick look at the K2 site but dont see any real details such as pins etc. Dont know anything about servos I am afraid as I only have had steppers on my mills.
There is a XML for Mach2 on their site and although I dont really know much about them it seems to look like you have one switch for each axis and they seem to be set for x=11 y=12 and z=13
 So go to config ports and pins, inputs and set as pic below.
If you then go to the Diagnostic page and your limits are lit go back and change the low active settings for each axis.
 Hood

(http://mysite.wanadoo-members.co.uk/hoodsmachiningpages/Bagpipes.jpg)
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 18, 2006, 04:23:33 PM
Also looks like you may need to set up the limit override as Port 1 pin 10 again not sure about whether active low should be ticked or not (eyes are going funny looking at all the text in the xml ;) ).
BTW this setting is lower down on the Inputs page. I am not sure what it is actually for but I presume you must have a button to disable your limits if they have been hit, pressing the button will allow you to jog off of them. There is also another way you can do this but if you have the button there is no need to go into that :)
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 09:58:36 PM
That's very helpful Hood - I will apply that to my settings and see what happens. I was trying to figure out those settings earlier this afternoon. Thanks for taking the time to dig through that xml. Will advise on my success/failure...
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 18, 2006, 10:24:05 PM
Hood - great solution! Based on your .gif above I updated my settings. I was able to manually trip each limit switch by hand and got the expected lit up led's to confirm. Reset to continue, then I jogged each axis onto its limit switch and everything worked!! Hit the override and jogged off. Then tried hitting the Ref All Home button. The Z and Y axis referenced themselves correctly off the limit switches but the x-axis took off at a leisurely pace away from the limit switch towards the opposite end of the table. Obviously this has something to do with me reversing the x-axis direction.

Any thoughts on that?
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 19, 2006, 02:12:32 AM
I think you need to go into config - homing and limits and change the Home Neg for that axis, possibly might even be the reversed option as was mentioned above by afn09556. You might also want to set up your soft limits while there and make sure that there is a tick in the Auto Zero for each axis.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 19, 2006, 01:03:02 PM
afn09556 and Hood - Many thanks .... enabling the Home Neg for the x-axis worked fine. Now all 3 axes know where home is and roll onto and back off the limit switches as they should when I hit "Ref All Home"..

I admit I don't know how to set up soft limits. What do they do?

Also - my DROs are reading much faster than the actual table travel. By eye - it looks like the DROs are registering one inch for each turn of the leadscrews. How to I calibrate that?
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 19, 2006, 01:26:15 PM
Soft limits are basically an extra safety measure and also they save having to re-reference if you jog a bit too far. Normally if you did that you would hit a limit and have to re-reference (Home) but if you have the software limits set up the axis will stop before a limit is actually hit and you can just jog off and your reference is not lost. To set them up go to config then homing and limits then just put in the numbers for each axis, min will be 0 or maybe just above 0 and max will be the travel of each axis or just below. You can also set a slow zone so that the axis will start to slow as a soft limit is being reached and will help prevent overshoot and the hardware limit being tripped when the axis is doing a rapid.

 For your DRO reading too much you need to set up the steps per unit for the motors on each axis, there is a very easy way to do this, go to the settings page and you will see a Set Steps button. Click that button and follow the instructions for each axis, you will need a dial gauge or some other means of measuring actual distance travelled.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 19, 2006, 02:53:58 PM
So far so good - I set up the soft limits although it's hard to see if anything as been affected. Got the motors calibrated through set steps. That seems to be OK.

The only thing that remains unresolved is that, no matter what I check and un check in config/homing, my Y axis reads + goiing toward home and minus moving away from home. If I change checkboxes, I can reverse the +/- readout on the DRO but it thinks the limit switch is at the other (far) end and tries to go home at the wrong end. After trying endless combinations of checkboxes it's either on or the other :-(
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 19, 2006, 03:06:05 PM
You will also have to enable the soft limits, I use my own screenset but there should be a button below the DROs on the main page which will enable/disable the soft limits. When you have themĀ  enabled you can jog any axis and if it stops before it hits the physical limit switch you know you have the soft limits set up right, you will also see a message saying "Softlimits, movement aborted" or something like that.
 First of all you need to get the Y Axis travelling in the correct direction, on your setup + is away from you as in your pic earlier in the thread. If its wrong change the low active in motor outputs. Once you have that right then try changing the Home Neg in homing/limits page.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 19, 2006, 03:13:24 PM
BTW the low active I mentioned in the above post is for the Dir for Y axis in config>ports and pins>motor outputs page

Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 19, 2006, 03:28:25 PM
OH - ok, if Y+ is away from me then I am in good shape. Let me check soft limits and make sure they're OK.
Boy this has been a great learning experience. All newbies like me should read this thread!!
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 19, 2006, 04:32:24 PM
When I watch the Mach3 videos it is apparent that when the demo machine is referenced to home, it shows that to be in the lower left corner of the table area.

My limit switches put my machine home at the top left of the table area. Consequently when I load the roadrunner program and jog my table somewhere in the middle of the table area to set a x and y zero starting point, the display shows my location (the brown crosshairs on the display) BELOW my table work area (the red rectangle).

Since my home position has to be top left, how do I compensate for this coordinate difference?
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 19, 2006, 04:43:39 PM
Your home position is best set up lower left as in the video, you should be able to change this by ticking the Home Neg options for X and Y in Homing and limits page.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 19, 2006, 04:45:00 PM
Does that not require that I move the limit switch to the nearside of the y-axis table travel?
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 19, 2006, 04:48:50 PM
OK maybe I am misunderstanding how your limits are set up. You have a single switch on each axis, correct? Does the switch get triggered when the gantry travels to either end of the table? If so then your single limit is acting as both a +ve and -ve for that axis. If the above is correct then Homing Neg should make the gantry travel in the Neg direction to home.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 19, 2006, 04:57:27 PM
No - unfortunately the limit switch only activates when the y axis moves to the extreme upper end of the travel. Limit switch is attached to the machine frame rather than the moving spindle assembly. I should ask K2 about this... I'm sure there's a work-around
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 19, 2006, 05:07:06 PM
Would be better if you could move the switch onto the moving part of the Y axis and trigger it at either end by a raised block/ramp fixed to either end of the the gantry. This would of course pose the problem of the wire needing to have enough length to reach the extremes and some means to keep it clear of the moving parts.
 You may have another option, do you still have an Input pin spare? if so then you may be able to rig up another switch.
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 19, 2006, 05:10:28 PM
Good idea. I'm also waiting for feedback from my contact in K2 CNC. I'll update as soon as I hear
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 19, 2006, 06:56:55 PM
K2 says not worth moving limit switches. When running a program just zero everything out at the x/y start point and from a relative point of view everything will be the same.

Where can I get a simple G-code that does something interesting but is less than 1000 lines. All the samples in the g-code folder are too big for me to run on my demo software. Just want to make sure everything is set before I invest in the full prog (now there's a typical Scotsman speaking!!)
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 20, 2006, 01:18:20 AM
Personally I would not be happy having only a Y +ve limit switch, it means that there is no physical protection at all to crashing the machine if you go a bit too far on the Y -ve. You will be relying totally on the soft limits.
 Dont really know of any code. Probably the best thing to do is go into some of the wizards and just do some basic shapes. If you go into the circular pocket wizard you can make a large spiral pattern by telling it you have an 1/2 inch cutter but actually only using a 1/4 inch. You could also use several wizards to make up the code for a larger job, just edit them all together by cutting and pasting into a blank notepad doccument and saving as a .tap. Have fun :)
Hood
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Bagpipes on July 20, 2006, 11:41:30 AM
Many thanks, I might buy another switch and enable that as a y-negative limit, shouldn't be too gard.
Looks like I have mach3 as configured as possible wt this point. Any further newbie questions should be related to Gcode and I'll ask those in another thread. Hood you have been a great help.
Title: Re: How do I reverse the x-axis direction of travel?
Post by: Hood on July 20, 2006, 12:04:35 PM
No problem, not too hot on the G code myself, basic stuff is OK but nothing more altough I am learning ;)