Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: B3030 on May 13, 2014, 07:01:19 PM

Title: Encoder Input configuration...what am I missing?
Post by: B3030 on May 13, 2014, 07:01:19 PM
I have a Sherline mill that I have converted to CNC using a CNC4PC C11 BOB and Mach3.  I sometimes use the mill manually so I've been able to mount the Sherline encoders between the steppers and the handwheels.  I provided +5V power as required, and connected the two quadrature encoder outputs to two of the C11 input pins.  I configured those two pins with pull-up resistors on the board.  I enabled the three encoders on the Ports and Pins/Encoder/MPG's page, and set the correct port and pins.  I have the counts/Unit set to 32 for now but will verify the correct setting.

When I turn the handwheels I see only .0001 movement back and forth on the Settings screen's Encoder Postion DROs.  The C11 BOB has LEDs on each input to indicate the condition.  The LEDs flicker on and off as I turn the encoder...as the should to indicate the pulse trains from the toothed wheel inside the encoder.

I then slaved in a set of cheap VEX robot encoders (to replace the Sherline encoders) and I get the same result on the Encoder Position DRO's.

Is there anything else to configure in Mach3 to get the Encoders working? 

I appreciate any advise.

B3030
Title: Re: Encoder Input configuration...what am I missing?
Post by: Overloaded on May 13, 2014, 07:29:36 PM
From the manual:

The Counts per unit value should be set to correspond to the resolution of the encoder and your selection
of Native units. For example, a linear scale with rulings at 20 microns produces a count every 5
microns (remember the quadrature signal), or 200 counts per unit (millimeter). If you have Native
units set to inches, then it would be 200 x 25.4 = 5080 counts per unit (inch) because there are 25.4
millimeters per inch. The Velocity value is not used.


Russ
Title: Re: Encoder Input configuration...what am I missing?
Post by: B3030 on May 13, 2014, 08:46:09 PM
Overloaded,

Thanks for the reply.

I saw that in the manual but I believe that, unless I'm off a huge amount, would affect only the overall accuracy of the encoder readout.  Even if I have it wrong, it should still count up (or down) either too fast or too slow.  As it it now, the Encoder Position readout just flicks back and forth from .0001 to .0000.

Am I right in my understanding that the only settings that affect the encoder readout are on that Ports and Pins/Encoder/MPG's page?

B3030
Title: Re: Encoder Input configuration...what am I missing?
Post by: Overloaded on May 13, 2014, 09:17:54 PM
Maybe double check the channel A and B wiring.
You may be receiving only one channel.
Title: Re: Encoder Input configuration...what am I missing?
Post by: B3030 on May 14, 2014, 07:17:04 AM
I thought about that too so I disconnected the Sherline encoder and connected a simple VEX quadrature encoder directly to the BOB and got the same results.  The two BOB Input channel LEDs do show the classic quadrature pattern I expected to see. 

B3030
Title: Re: Encoder Input configuration...what am I missing?
Post by: Overloaded on May 14, 2014, 07:25:57 AM
Might try/assign different pins, one might be wacky.

Russ
Title: Re: Encoder Input configuration...what am I missing?
Post by: Overloaded on May 14, 2014, 08:00:46 AM
Using the printer port ?
Check the signal continuity through the cable to the PC for both channels.
One might not be making the trip.
Russ


 
Title: Re: Encoder Input configuration...what am I missing?
Post by: Hood on May 14, 2014, 09:02:40 AM
If you attach your xml I will have a look at that and see if there are problems with it.
Hood
Title: Re: Encoder Input configuration...what am I missing?
Post by: B3030 on May 14, 2014, 11:16:19 AM
Using the printer port ?
Check the signal continuity through the cable to the PC for both channels.
One might not be making the trip.
Russ

 

Yes.  I will check that when I get home and report back.  I appreciate the suggestion.

B3030
Title: Re: Encoder Input configuration...what am I missing?
Post by: B3030 on May 14, 2014, 11:21:19 AM
If you attach your xml I will have a look at that and see if there are problems with it.
Hood
I will do that.
In the meantime, can you verify that, with the encoders enabled and correct ports and pins set on the Ports and Pins/Encoder/MPG's page and valid signals to and through the PP, I should see the Encoder Position DROs on the SETTINGS page reflect the changes? And that no other set up is required?  I saw a thread about OEMDRO codes for encoders but am not sure if it was relevent.

B3030
Title: Re: Encoder Input configuration...what am I missing?
Post by: Hood on May 14, 2014, 04:17:06 PM
You should be able to just connect up, as you say, and get the readings.
Readings from an encoder using the parallel port will be limited in that the frequency expected will likely be 25KHz or less. From what you say however that should not be an issue as you are not seeing any movement at all.
Few things that could come into play are
Wrong setup (wrong count or pin assignment etc.
Breakout board not capable of passing the signals for some reason.
Wiring wrong or faulty.
Signal type of encoder incompatible.

Hood
Title: Re: Encoder Input configuration...what am I missing?
Post by: B3030 on May 14, 2014, 06:28:13 PM
Hood,

See attached .xml

I will check the parallel port cable continuity.

B3030
Title: Re: Encoder Input configuration...what am I missing?
Post by: Hood on May 14, 2014, 06:42:32 PM
Ok quick look at your xml and it seems fine. One thing however is you have a non standard screenset. I dont have that screenset so cant check but if you open it in one of the screen designers you can check the DROs for the encoders are the correct oem codes.
Hood
Title: Re: Encoder Input configuration...what am I missing?
Post by: B3030 on May 15, 2014, 07:26:33 AM
I haven't gotten to the parallel port cable check yet but I will.  All other functions work but it still could have a  break.

I was finally able to get the VEX encoder working by slaving it into the BOB.  I verified the pulses on the DIAGNOSTICS screen, and saw the Encoder Position DROs respond accordingly on the SETTINGS screen.  So Mach3 seems to work correct. The problem must lie in the BOB, wiring or Sherline encoders. 

I appreciate all of the replies and comments.  It's always good to have those outside opinions to challange your own assumtions when you're knee-deep in troubleshooting a problem.

B3030
Title: Re: Encoder Input configuration...what am I missing?
Post by: B3030 on July 10, 2014, 07:42:18 AM
Just as a follow-up...
I installed CUI AMT102 encoders ($23 each) and they worked great from the first time I powered up the system (long back-order from Digikey but they now have 300 in stock).  With 5mm/rev leadscrews, I set the encoders to 125 pulses/rev to get a quadrature resolution of 500 pulese/rev.  That should give me .01mm resolution at the encoder.  Sure enough, one revolution of the leadscrew via a handwheel on the stepper, caused a 5mm movement of the DRO.

Those CUI encoders come with two different mounts with many mounting hole patterns.  I didn't want to drill/tap holes into my steppers (didn't know how far I could go and didn't want to take them apart) so I used an industrial double-dided tape.  Cleaned both sides carefully with laquer thinner.  I emailed CUI support and they said that would be an acceptable solution.  So far, so good.  I like having the option to go "manual" on my mill for when I just need to do a quick job that doesn't require CNC(ontrol).

B3030
Title: Re: Encoder Input configuration...what am I missing?
Post by: Overloaded on July 10, 2014, 07:52:27 AM
Good job! :)

Thanks for posting your solution.
Happy endings are always nice.

Regards,
Russ
 8)