M150 doesn't always work

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

M150 doesn't always work

Post by ashesman »

I am using M150 to zero the spindle encoder during homing so I can use it for orient control. It works most of the time, probably 70%. Interestingly when it doesn't zero the spindle encoder at the right place, it is 90 or 180 degrees out exactly. Occasionally it is at a random position.

At the end of my home macro I do

M3 S100
G04 0.5
M103/3.0
M150
M104
M5

The spindle does a few turns and never times out, M150 always succeeds. The whole thing takes much less than a second.

There is definitely only one index pulse on the encoder. I don't think it is related to noise or interference as there are no other problems with encoder positioning. After the spindle and other motors have run for ages, it always orients at the location it was homed at.

Any ideas, it's really starting to p me off!
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: M150 doesn't always work

Post by cncsnw »

Interesting.

What version of CNC12 are you using?

How many counts does your spindle encoder have?

Do you have a digital storage scope? If so, you could add an M94/nnn to the homing sequence immediately after the M150, and add a line to the PLC program to relay that request to a PLC output that you can use to trigger the scope. That would let you see whether there was some sort of anomaly on the index channel at the time that M150 claimed to have captured the index pulse.

If your spindle will run reliably at even slower speeds, you might try it at 20 or 30 RPM. At that speed, with the Alt-P display active, you will probably be able to see on the screen whether the asterisk that indicates the index pulse flashes in the wrong place.
aamir
Posts: 96
Joined: Fri Jun 10, 2011 8:31 am
Allin1DC CNC Controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes

Re: M150 doesn't always work

Post by aamir »

Ashley
Use a sensor at orient position to make a loop if did not catch the index Pulse.
Like this
Screenshot_20210913-213406.png
https://youtube.com/shorts/F9PyfNqDvgc?feature=share
ashesman
Posts: 395
Joined: Thu Dec 03, 2020 4:54 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: M150 doesn't always work

Post by ashesman »

Thanks guys. The spindle motor is the machines original AC servo motor. It has a 2500 per (10000 count) ABZUVW encoder on it. It is wired directly to the Oak with the ABZ differential signals only.

I do have a DSO scope but it is a bit tricky to get to the signals. I may be able to clip on to the back of the DB9 on the Oak. I am pretty convinced noise is not an issue but can check.

The spindle runs down to about 1 RPM but is a bit twitchy, 100 seemed like a good compromise. I will try low speed and watch in CNC12. I am using the second to latest version.

Otherwise I am going to need to add another sensor as Aamir suggests or a loop that prompts the operator to check or repeat. I may be able to use one of the UVW signals to check against.

It would have been easier if the spindle drive did orient like it was supposed to have, can’t domit on PMM motors!

It is just weird to me that it can be exactly 180:degrees out sometimes.
Post Reply