Dynomotion

Group: DynoMotion Message: 778 From: funncarsmi Date: 12/11/2010
Subject: encoder question
Tom,
I have a 500 line quadrature encoder, so I should get 2000 lines per rotation. I am in Kmotion and looking at the axis mode screen. When I turn the handwheel three rotations in the CW direction I get 2000 lines per rev. When I turn the encoder three complete turns in the CCW direction, I get something less than 2000 ...like 1960 +-20 per rev. I will have access to a dual channel scope next week to troubleshoot more, but this encoder was working fine on the old 1980 era electronics.

I have Channel A+,A-,B+,B- connected to JP1 terminals 1,2,3,4. I've read the instructions a few times but still have no idea where to connect the index (so Z+ and Z- are not connected).

1) Any ideas why CW rotation counts are not equal to CCW rotation counts?
2) Next questions is when I turn on KmotionCNC I don't see the display move, so I'm guessing I need to still do something else to get Kmotion to talk to Kmotion CNC. Any hints?

Gregg
Group: DynoMotion Message: 779 From: funncarsmi Date: 12/11/2010
Subject: Re: encoder question
I will add, that I am leaning toward connecting Z+ to JP2 #1, and Z- to JP2 #2 ....but if this is correct, how do I tie these in via the software? and will not having them connected be the cause of my count error in CCW direction.

--- In DynoMotion@yahoogroups.com, "funncarsmi" <funncars@...> wrote:
>
> Tom,
> I have a 500 line quadrature encoder, so I should get 2000 lines per rotation. I am in Kmotion and looking at the axis mode screen. When I turn the handwheel three rotations in the CW direction I get 2000 lines per rev. When I turn the encoder three complete turns in the CCW direction, I get something less than 2000 ...like 1960 +-20 per rev. I will have access to a dual channel scope next week to troubleshoot more, but this encoder was working fine on the old 1980 era electronics.
>
> I have Channel A+,A-,B+,B- connected to JP1 terminals 1,2,3,4. I've read the instructions a few times but still have no idea where to connect the index (so Z+ and Z- are not connected).
>
> 1) Any ideas why CW rotation counts are not equal to CCW rotation counts?
> 2) Next questions is when I turn on KmotionCNC I don't see the display move, so I'm guessing I need to still do something else to get Kmotion to talk to Kmotion CNC. Any hints?
>
> Gregg
>
Group: DynoMotion Message: 780 From: Tom Kerekes Date: 12/11/2010
Subject: Re: encoder question
Hi Gregg,
 
Not sure why the position is dropping counts.  Possibly noise or ringing on the signals?  Looking with the scope should help.  How long is the cable?  Is it shielded?  Kanalog has moderate termination of 400 ohms across the differential inputs.  Normally around 120ohms is recommended, so you might try 200ohms across pins 1 to 2 and also across 3 to 4 to see if that helps.  Or sometimes a broken connection can act like that if one of the differential pairs is floating.  A voltmeter could be useed to check if all 4 pins are actively driving high and low without any broken connections, or A scope would tell the whole story.
 
The Z can be connected to any spare differential input.  For example A4+ and A4-.
 
The display in KMotionCNC displays the currently commanded position not the encoder position.
 
Regards
TK

 

Group: DynoMotion Message: 781 From: Tom Kerekes Date: 12/11/2010
Subject: Re: encoder question
That would work.  The Z index pulse would show up as KFlop Input Bit 36.
 
Your C Language homing program would have to make use of that input however you wish to use it.  Since the index pulse occurs every rotation it can't be used directly as a home signal.  Usually a home switch needs to be also used to be sure the system is on the right revolution.  So the sequence would normally be something like:  Go fast until we hit the home switch, then slow down and keep moving until we see the Z index pulse then stop and zero. 
 
Not having the Z connected is unlikely to cause a problem counting the A/B channels.
TK

 
Group: DynoMotion Message: 782 From: funncarsmi Date: 12/11/2010
Subject: Re: encoder question
I would have expected noise or ringing to cause dropping in both the CW and CCW directions. But then again, everything we considered also would result in dropped counts in both directions! ...which is why I asked you. I will put the scope on it next week.

I connected a very small 12 DC motor (I can drive it with 1.5V "C" battery) to JP11 #0 and GND. I selected this motor as my Gettys drive Amp is +-10VDC and moved slowly using a 1.5V battery, and I would rather have a runaway motor connected to nothing than a mill axis running away.
When I am in KmotionCNC and use the left or right arrows to change the Z value; I expected the motor to spin until I manually moved the encoder to the proper position, but the motor doesn't spin. Why not?

Gregg

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Gregg,
>
> Not sure why the position is dropping counts.  Possibly noise or ringing on the
> signals?  Looking with the scope should help.  How long is the cable?  Is it
> shielded?  Kanalog has moderate termination of 400 ohms across the differential
> inputs.  Normally around 120ohms is recommended, so you might try 200ohms across
> pins 1 to 2 and also across 3 to 4 to see if that helps.  Or sometimes a broken
> connection can act like that if one of the differential pairs is floating.  A
> voltmeter could be useed to check if all 4 pins are actively driving high and
> low without any broken connections, or A scope would tell the whole story.
>
> The Z can be connected to any spare differential input.  For example A4+ and
> A4-.
>
> The display in KMotionCNC displays the currently commanded position not the
> encoder position.
>
> Regards
> TK
>
>  
>
>
>
> ________________________________
> From: funncarsmi <funncars@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sat, December 11, 2010 6:07:47 PM
> Subject: [DynoMotion] encoder question
>
>  
> Tom,
> I have a 500 line quadrature encoder, so I should get 2000 lines per rotation. I
> am in Kmotion and looking at the axis mode screen. When I turn the handwheel
> three rotations in the CW direction I get 2000 lines per rev. When I turn the
> encoder three complete turns in the CCW direction, I get something less than
> 2000 ...like 1960 +-20 per rev. I will have access to a dual channel scope next
> week to troubleshoot more, but this encoder was working fine on the old 1980 era
> electronics.
>
> I have Channel A+,A-,B+,B- connected to JP1 terminals 1,2,3,4. I've read the
> instructions a few times but still have no idea where to connect the index (so
> Z+ and Z- are not connected).
>
>
> 1) Any ideas why CW rotation counts are not equal to CCW rotation counts?
> 2) Next questions is when I turn on KmotionCNC I don't see the display move, so
> I'm guessing I need to still do something else to get Kmotion to talk to Kmotion
> CNC. Any hints?
>
> Gregg
>
Group: DynoMotion Message: 783 From: Tom Kerekes Date: 12/11/2010
Subject: Re: encoder question
Hi Gregg,
 
No don't connect a motor directly to the DAC outputs.  You need to have an amplifier.  The DAC outputs can only drive milliamps where "C" battery can probably output an Amp or more.  Besides a motor has brushes and inductance that could easily cause a spark an damage the DAC.
 
Don't attempt to use KMotionCNC until your servos are working within KMotion.exe.
 
Do things step by step.
 
First get your encoder to work properly.
 
Next use Console Screen DAC commands (with the axis disabled) to test the amplifier. ie DAC0=100
 
Then you can attempt to enable the axis.
 
By setting a Max Output of 200 you can limit the max voltage that will be sent to the DAC to ~ 1V so if something isn't working it won't cause too much damage :}
 
Regards
TK