Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Vogavt on December 30, 2017, 06:41:09 PM

Title: Issue with XHC USB Controller and axes direction
Post by: Vogavt on December 30, 2017, 06:41:09 PM
New XHC USB 4-Axis controller
Mach3 (licensed to me)
Windows10, 64bit

I had a perfectly working 3-axis XHC USB controller but I am setting up for a laser and wanted to use a 4th axis to control the laser output. Hence, I purchased a 4-axis controller from the same company with the latest version of firmware or upgrades.

I followed the directions for installing the new dll's, macros, etc. to the correct directories and began tuning the stepper motors by simply copying the data from screenshots from the other install, i.e., all the settings for steps/per, accel, velocity, etc., saved for posterity (read sanity).

On this latest revision (V) of the XHC 4-axis controller, the board has moved some of the pins over to the other side of the controller as well as adding both Dir+ and Pul+ for the steppers. The 3-axis only had Dir-, Pul- and 5V. It also dropped the PE (primary earth?) pin altogether (more on that later).

Reading as many posts here as I could (mostly for parallel ports, not USB) and from what I could gather from the internet, I only needed to put a connecting wire between both "+", tieing the stepper's "+" signals together for each axis. Seems logical, but as I know nothing about servos, I can only guess there's a need to have them separated. Unsure.

Anyway, the first problem is I can only move in one direction but not the other on all three axes. When using the keyboard's keys to move the gantry, say for the Y-axis, the movement from the up arrow takes place, but nothing for the down arrow. Stay with me now... if I use the MDI and call for "G01 Y-0.5" in moves, but if I call for "G01 Y0.5" it moves too, BUT in the same direction! Same holds true for Z-axis. But when I call for "G01 X-0.5" it moves, but no response when I call for "G01 X-0.5".

Simplier: X, Y & Z move in one direction only with keyboard, but MDI has a different response depending on the axis.

The second problem is the probe light doesn't light up when grounding. Let's go back to the PE pin being no longer present in Rev. V of the board. When I first turned everything on, since I couldn't find a place to put the PE wire from the original setup, I left it disconnected to err on the safe side. When I launched Mach3, I got an error message that said "Is the XPod Inserted OK? It has ceased to Respond,..". So I went to the troubleshooting/FAQ's and sure enough the solution was to "connect the ground wire (PE) of the inverter and the ground wire of the shaft to the earth".

Shut everything down and got out my multi-tester. After unplugging the power cord from the back of the controller, I probed the ground pin at the plug jack and the side of the power supply. Great! That's where I'll connect the PE. Did that and rebooted, launched Mach3 and the message was no longer there.

One of the probe wires fed into the PE pin, then back out to one side of the E-Stop. That's why I though I was killing two birds with one stone.

Spindle is working without issues. Comes on and off and changes speed based on whatever Speed I throw at it, so all good there.

I've played with pin settings, port settings, etc. but still no joy.

It took me 6 weeks to get the item here so I'm not enamored with having to send it back and wait again. I missed making the holiday gifts I wanted to make because of the delay with Customs and China.

Any ideas from anybody would be most appreciated.

XML file attached

Title: Re: Issue with XHC USB Controller and axes direction
Post by: Vogavt on December 31, 2017, 06:08:23 PM
I pulled the "+" loop wire leaving it only connected to the Dir+. Now all axes move when the + or - direction keys are pushed, but still in the same direction regardless. Even set one axis to have the 5v only on the Pul+ which oddly yielded the same effect.

At least I know I can get movement from each key, now i just to get them to reverse direction.
Title: Re: Issue with XHC USB Controller and axes direction
Post by: joeaverage on January 03, 2018, 03:53:03 AM
Hi,
what sort of axis drivers are you using?. You mentioned 'servo' and its quite likely that it will require 0V/24V inputs. It would explain why your board can't cause
the driver to reverse.

Craig
Title: Re: Issue with XHC USB Controller and axes direction
Post by: wmgeorge on January 03, 2018, 08:39:15 AM
The 4 axis one on eBay I just found looks to be setup just like your 3 axis. Why would you  tie all the +5 from all axis together? I would keep separate.
   Also wondering about this> Seems logical, but as I know nothing about servos, I can only guess there's a need to have them separated. Unsure.<  you said.

 https://www.ebay.com/itm/XHC-MK4-USB-Cnc-controller-Mach3-CNC-Motion-Control-Card-Breakout-Board-2000KHz-/281672812179
Title: Re: Issue with XHC USB Controller and axes direction
Post by: Vogavt on January 03, 2018, 06:27:23 PM
Thanks for the responses.

I need to clarify about servo/stepper. I have stepper motors; my comment about servos was related to to uncertainty whether the separate 5+ are needed for servos since my previous experience with steppers only have used a single 5+ to supply both the Step & Direction.

I'm using the M542 drivers originally supplied in the CNC 6040Z purchase. All I've done is swap the 3-axis controller for the 4-axis controller, but it has not been a simple wire/pin to wire/pin swap.

I looked closer at the instruction and now see that the 5+ is separated, both from the controller and to the driver. I'll be doing that as soon as the weather warms a bit.
Title: Re: Issue with XHC USB Controller and axes direction
Post by: Vogavt on January 05, 2018, 04:07:34 PM
Moving forward! (and backward)

Turns out I had to remove the jumper wire and actually put an additional wire for the +5. So now I have 4 wires to the M542 stepper driver from the controller. The gantry moves in both directions for each axis as it should.

I've also determined that the PE wire needed to be connected to a 0v pin. I used one of the pins associated within the "24v-Power Out" area closest to the Input area.  So I now have the E-Stop working and the Probe!

New issue is I can't get the Reference All Home to work. The axis moves, reaches Home, switch triggers as indicated on Diagnostics tab, axis reverses and goes completely to the other end and crams until I hit the Esc key. When I do hit the ESC key the axis reverses again (like a double touch off) but once it hits the trigger it reverses yet again. It takes two ESC and a Reset to get out of the whole referencing loop.

I'm still playing around with settings but getting nowhere. I been using Mach3 with a parallel port for years. This USB Controller is nice, but worthless if I can't get the Referencing to work.

My shop is warm with a nice wood stove, but the wood pile is dwindling along with my days off from work.

Anybody?
Title: Re: Issue with XHC USB Controller and axes direction
Post by: Vogavt on January 05, 2018, 06:55:27 PM
All working!

The codes for all the moves in the shipped macros were for metric! I finally studied them closely and came to realize that the first axis (Z) was trying to drive down 5 inches after touching off and crashing. I don't have that kind of room on the 6040Z. After I picked myself up off the floor from smacking myself in the head, I got it sorted out. Man, it was kicking my rear end.

Anyway, I had to massage the AutoTool script as well to slow things down a bit. It was traveling like a bat out of Hades. Now smooth.

But there's more to the story. The plugin for the pod showed a pull-off of 5 for the X, Y and Z in the Homing Pulloff area near the bottom of the dialog box for the configuration of the pod plugin. I had no idea what the pull off was for. Time, distance, etc. but it is for distance.

Another point worth noting, even though I had set the units to Inch from the drop down menu, I discovered my warm-up code was extremely small in accordance with the foot print and table outline on screen. Going to the Settings tab I discovered in the bottom right hand corner that the units of metric was still selected. Once I set it to Inches and did a Regen of the toolpath, things looked much better.

I hope this helps someone in the future.

Been a long intriguing day in my inner sanctum.
Peace and quiet and lack of interruptions can be your friend when it comes to sorting out the obvious. Ha!
Title: Re: Issue with XHC USB Controller and axes direction
Post by: TOTALLYRC on January 06, 2018, 02:44:48 AM
Nice to see that you got it sorted. Thanks for posting what the fix was.

Mike