M39 Spindle encoder getting crazy numbers


Page 1 of 2 12 LastLast
Results 1 to 20 of 30

Thread: M39 Spindle encoder getting crazy numbers

  1. #1
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default M39 Spindle encoder getting crazy numbers

    I have been working on putting a spindle encoder on an old Kasuga knee mill running an M39 control with version CNC11-D for CNC10 V.2.72 (linux). The hardware side went together easy but now that I have the encoder hooked up the RPM is readying about 20x higher than it should. The encoder is an Omron E6B2-CWZ1X quadrature 2000 P/R so I set parameter 34 to 8000. If I set the count to around 160000, yes 160k, the rpm displayed is about what I see with the tach.

    I originally thought it was the encoder so I swapped it. I then thought maybe it was the cable extension, so I removed it. Still no joy. If I only hook up the index it does appear to count correctly but I haven't checked with the tach to know how close it is or isn't.

    I understand it very likely could be the style of encoder I selected and/or the fact it's a Omron knockoff from Ebay. I did test it on the scope and all A, B, & Z channels are counting.

    What kind of encoder should I use? Or do I simply have something wired wrong?

    My pinout is:
    Pin 1 N/C
    Pin 2 Com
    Pin 3 -Z
    Pin 4 -A
    Pin 5 -B
    Pin 6 Z
    Pin 7 A
    Pin 8 B
    Pin 9 +5V

    Here's a couple photos of my 1:1 adapter. The belt I'm using is a MXL. The adapter and pulleys appear to drive the encoder well with no issues so far. There was a spacer below the power drawbar so it was trivial to replace the spacer plate with the adapter of the same thickness. Just enough to sneak in a belt without needing to alter the drawbar.

    M39 Spindle encoder getting crazy numbers-encoder-mount-v27-pngM39 Spindle encoder getting crazy numbers-img-3606-jpgM39 Spindle encoder getting crazy numbers-img-3674-jpg

    Similar Threads:


  2. #2
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    I would say if it reads correctly at 160,000 then why not just use that figure? It could be that the original encoder was much lower line count.

    Jim Dawson
    Sandy, Oregon, USA


  3. #3
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Quote Originally Posted by Jim Dawson View Post
    I would say if it reads correctly at 160,000 then why not just use that figure? It could be that the original encoder was much lower line count.
    I've run that way for a few days but I simply cannot figure out why an 8000 count encoder would appear as 160000. When I was checking it with the tach the adjustment was actually closer to 157000 to get a match. This made me suspect noise but even at low rpm, say 100 rpm, it's over counting. I'd be curious to know what make/model encoders others are using on their spindle.



  4. #4
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    I use a 50 line A/B quadrature on my mill, using that one because I had a couple on the shelf. Don't remember the brand, proabaly 20 years old. My lathe has a 1024 line differential quadrature, and again I don't know the brand. Both work just fine. Your Omron should work just fine, as long as you have a clean signal on the scope I would say it's working.

    Jim Dawson
    Sandy, Oregon, USA


  5. #5
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Quote Originally Posted by Jim Dawson View Post
    I use a 50 line A/B quadrature on my mill, using that one because I had a couple on the shelf. Don't remember the brand, proabaly 20 years old. My lathe has a 1024 line differential quadrature, and again I don't know the brand. Both work just fine. Your Omron should work just fine, as long as you have a clean signal on the scope I would say it's working.
    I'm thinking that high count may be saturating the old ISA based card. I poured through the manual and at the it implies encoders back in the day were less than 1024 lines. Good to know an encoder with 50 lines would work. Is your control ISA or PCI? What version?

    Parameter 34 4,096 Sets the counts per revolution (cpr) of the encoder. The encoders so far have been 1024 lines, providing 4096 cpr. If the encoder counts up when the spindle turns CW then the value should be positive. If the encoder counts up when the spindle turns CCW then the value should be negative.




  6. #6
    Member CitizenOfDreams's Avatar
    Join Date
    Nov 2012
    Location
    USA
    Posts
    1267
    Downloads
    4
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    I suspect there is another multiplier parameter somewhere in the control software, such as "spindle pulley ratio" or something like that. Just a wild guess.



  7. #7
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Quote Originally Posted by CitizenOfDreams View Post
    I suspect there is another multiplier parameter somewhere in the control software, such as "spindle pulley ratio" or something like that. Just a wild guess.
    That's a good idea. I was thinking the same and just didn't find anything obvious. I've looked at parameters 33, and 65-67.



  8. #8
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Quote Originally Posted by forhire View Post
    I'm thinking that high count may be saturating the old ISA based card. I poured through the manual and at the it implies encoders back in the day were less than 1024 lines. Good to know an encoder with 50 lines would work. Is your control ISA or PCI? What version?

    I'm not using a Centroid control. The heart of my system is a Galil DMC-1846 PCI motion controller, good for up to 22 MHz encoder inputs. The older ISA boards were good for 6 MHz as I recall. I assume the Centroid is somewhere in the same range.

    The encoder scaling parameter may have another multiplier hard coded into the system. Maybe 10x or 100x ?

    Jim Dawson
    Sandy, Oregon, USA


  9. #9
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Quote Originally Posted by Jim Dawson View Post
    I'm not using a Centroid control. The heart of my system is a Galil DMC-1846 PCI motion controller, good for up to 22 MHz encoder inputs. The older ISA boards were good for 6 MHz as I recall. I assume the Centroid is somewhere in the same range. The encoder scaling parameter may have another multiplier hard coded into the system. Maybe 10x or 100x ?
    I haven't found any scaling parameter. I can't imagine it would be hard coded.

    I'm thinking it may be signal voltage. This tech note lists the the high must be greater than 3.5V.
    http://www.centroidcnc.com/dealersup...ploads/280.pdf
    1. Confirm that you encoders meet Centroid signal specifications. Centroid requires
    quadrature, differential line driver encoders that meet the RS422/423 specifications. In
    addition, the “low” signal level must be < .5VDC and the “high” must be >= 3.5VDC.



    The spec sheet from Omron lists the Vo: 2.5 V min. and Vs: 0.5 V max. This matches the spec sheet for the TI RS422 differential driver chip used on this clone. I don't recall what the voltage was when we had it on the scope.

    I wonder what Centroid is thinking. A real RS422 receiver shouldn't care what the voltages are, only the difference between the lines. That is the whole point of using differential signals.

    I guess I need to find an encoder that meets Centroid specifications.



  10. #10
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5717
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    I would put the scope back on the lines and get some good numbers. I would expect to see >4.5V max and <0.5V min for the positive going signal and <-4.5V min and >-0.5V max on the negative going signal. I don't have time right now to connect a scope to an encoder to look at the output, but maybe I could later.

    Jim Dawson
    Sandy, Oregon, USA


  11. #11
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Some more poking around. I found a list of encoders here: Encoders Used on Centroid Controls

    I then looked up one of them, the Quantum Devices QD145, and compared the specs. QD145 Optical Incremental encoder by Quantum Devices, Inc.

    Both the Omron and the Quantum Devices use the same TI AM26LS31 Quadruple Differential Line Driver. The difference is the the QD145 includes an OL7272 High Voltage Line Driver TTL Output to bring the signal back up to 5V.

    Clearly Centroid is expecting TTL signaling rather than LVTTL. The search continues.



  12. #12
    Member
    Join Date
    Feb 2008
    Location
    United States
    Posts
    280
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    What values do you have in Parameter 36 and Parameter 65?

    If you have set bit 4 of Parameter 36, then the control will assume the encoder is on the motor. If the PLC then indicates that the spindle is in low range, CNC10 will multiply the encoder speed by the ratio in Parameter 65 to get the display value.

    However, I think that path can only lead to a lower-than-actual spindle speed reading.

    If you press Emergency Stop, then turn the spindle by hand (say, at around 60 or 120 RPM) is the displayed speed accurate, or does it still count high? Often the VFD is the biggest source of noise and interference.



  13. #13
    Registered
    Join Date
    Mar 2016
    Location
    United States
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Please post a current report from that system. Is that encoder geared 1-to-1 with the spindle or with the spindle motor? From the main screen, press F1(Setup)->F3(Config)->default password is 137->F4(PID). Look at the Abs Pos column which is the Absolute Position for each of the axes. I do not know which axis is your spindle axis but I can only assume that it's the 5th axis. Record the reading at this point. Rotate the spindle one complete revolution. What is the difference in encoder counts? If that encoder is geared 1-to-1 with the spindle, you should be seeing approximately 8000 count difference.



  14. #14
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Quote Originally Posted by cnctechml View Post
    Please post a current report from that system. Is that encoder geared 1-to-1 with the spindle or with the spindle motor? From the main screen, press F1(Setup)->F3(Config)->default password is 137->F4(PID). Look at the Abs Pos column which is the Absolute Position for each of the axes. I do not know which axis is your spindle axis but I can only assume that it's the 5th axis. Record the reading at this point. Rotate the spindle one complete revolution. What is the difference in encoder counts? If that encoder is geared 1-to-1 with the spindle, you should be seeing approximately 8000 count difference.
    Bingo! The absolute position count on the PID screen I'm seeing 8000 counts per revolution. The encoder is driven 1:1 off the spindle. So if my count is correct on the PID screen then the issue must be someplace in the parameters that's multiplying.

    To answer previous questions.
    On the scope it measured 4v signal.
    No difference with or without e-stop.
    Parameter 36 is 0 rigid tapping enable (not licensed on this machine yet). No change when set for 1.
    Parameter 35 is set to 4.
    Parameter 78 is set to 1.
    Parameter 65 is 0.152
    Parameter 66 and 67 is 1.0

    Is it possible the RPM display is displaying something other than RPM? My display as a capital A after the number on the Spindle line.



  15. #15
    Registered
    Join Date
    Mar 2016
    Location
    United States
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    If that is the case, the only other explanation would be that the control believes that the spindle is in low gear. If you attached a current report from that system, we could have you verify the state of that particular input. You could also verify this by setting the value of parameter 65 to 1 to see if that helps.



  16. #16
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Quote Originally Posted by cnctechml View Post
    If that is the case, the only other explanation would be that the control believes that the spindle is in low gear. If you attached a current report from that system, we could have you verify the state of that particular input. You could also verify this by setting the value of parameter 65 to 1 to see if that helps.
    No change setting parameter 65 to 1. When I put it in low range it does factor the RPM but it's still displaying too high.

    I suspect the spindle speed display is done by reading the index Z based on my previous experiments. Is there a way to look at the index Z counter?



  17. #17
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    So we spent a LOT of time today looking at this encoder with the scope. Long and the short we get the same RPM display with or without the Z index hooked up. It's counting correctly but not reading/using the index. We are seeing signal on all ABZ channels. The voltage is dropping to 3V when all three channels are hooked up. I suspect the voltage drop is the issue.

    At this point I'll either have to put a buffer in between to bring the signal back up above 3.5V or replace the encoder with something that works with this vintage controller.

    I am not seeing any errors on the PID screen, the count appears correct, and the RPM is consistently wrong, it doesn't fluctuate wildly or anything, just 20x too high.



  18. #18
    Member
    Join Date
    Feb 2008
    Location
    United States
    Posts
    280
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    It uses A/B phase counts to measure the spindle speed, not Z (index) pulses.

    If for some reason you do want to view the index pulse, use the PID Configuration screen. The A/B count is in the Abs Pos column, as noted earlier. Next to the 'N' in the leftmost (axis label) column, an asterisk * will appear when the index pulse is present. If your encoder is wired correctly and working correctly, then you should see the asterisk flash very briefly, in just one location for every turn of the spindle. With some careful back and forth you can isolate that position and get the asterisk to display steadily. It will usually be just a couple counts wide.

    If you got a non-zero RPM display with the A and B phase feedback disconnected, and with Parameter 78 set to 1, then you are getting noise on the encoder input: noise which makes it look to the control like the encoder is counting.

    If you set Parameter 34 = 8000, and you turn the spindle by hand at about, say, 120RPM (two revs per second), what does the RPM display in the status window read?

    The capital A after the RPM display in the status window just tells you that spindle control in in Auto mode (vs. Manual mode). Not relevant to the question at hand.



  19. #19
    Registered
    Join Date
    Mar 2016
    Location
    United States
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    Once again, please post a current report from that system. If you do not know how to generate a report, please follow the attached tech bulletin.

    Attached Thumbnails Attached Thumbnails M39 Spindle encoder getting crazy numbers-193-generating-report-pdf  


  20. #20
    Member
    Join Date
    Dec 2005
    Location
    US
    Posts
    503
    Downloads
    0
    Uploads
    0

    Default Re: M39 Spindle encoder getting crazy numbers

    I haven't been able to catch the Z index asterisk on the PID screen. I don't see it flash even when turning slow. I see the index on the scope.

    When turning at ~120 rpm it is displaying about 2500 rpm hard to keep it precise. I chucked the encoder in the drill and tached the drill at 245-255 rpm in low range which displayed speed at 4860-4960 and it was very consistent. The battery powered drill fluctuated more than I expected.

    These numbers confirm the ~20x displayed RPM I've been seeing from the be beginning.

    Even after running the encoder a bunch I'm still not seeing any errors on the PID screen. I guess that means it's working?

    Here is my report.

    Thanks for all your help so far.

    Attached Files Attached Files


Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

M39 Spindle encoder getting crazy numbers

M39 Spindle encoder getting crazy numbers