Spindle index-enable not triggering?

More
29 May 2014 10:19 #47498 by Poma
I've read a number of similar posts about this problem that either were never resolved on the forum, or were suddently "working now, bye!"

Just a recap, I have a spindle that runs at a paltry 10 RPM (about 300:1 ratio off the motor). I'm turning brake surfaces with a diameter of up to 19 feet, so very slow. The spindle is an old 1984 mitsubishi 200V 3-phase AC motor that I am running from a new ABB ACS355 through analog output (no PID). All I/O is through a Motenc Lite. The spindle encoder is belted 1:1 off the low-speed end, so 1024 counts with an index (I was working with a different belt ratio on the encoder to get more accuracy on the speed, but that turned out to be rather coputationally complex. I have decided to machine a new pulley so I can use the encoder's index (however, what follows is the problem that made me abandon the higher ratio ... so if I can solve this I might reinstate the software index... too many parenthesis)).

I haven't cut any parts yet, but just ran the cycle a few times. The program is a G95 F0.02 linear over 8 inches. (everything is in inches). It is taking about 2 minutes to complete when it should take about 40 minutes at that feed rate. ( 8 [in] / 0.02 [in/rev] / 10 [rev/min] = 40 [min] ). Just going backwards, at 2 minutes and 0.02 feed, the spindle speed calculates to 200 RPM.

Do I need to be scaling my commanded speed into RPM? It just turned out that when I give a spindle command of 500, I get about 5 RPM. I figured that didn't matter because I had an index. I am getting the index input from the Motenc as I can easily see it on HAL Scope, but I cannot see the motion.spindle-index-enable state chaning AT ALL. It stays low.

My HAL goes like (pseudo-code):
net spindle-index-enable motenc.0.enc-02.index-enable <=> motion.spindle.index-enable

I hope I don't have to post all my HAL because it's kinda ugly. I'll do it if necessary.

Any help is greatly apreciated!

Best regards

Please Log in or Create an account to join the conversation.

More
29 May 2014 13:08 #47505 by PCW
motion.spindle.index-enable will only be set in spindle synchronized moves AFAIK
(G33, G33.1 and G77)

Please Log in or Create an account to join the conversation.

More
29 May 2014 19:06 #47515 by BigJohnT
To verify that your index is hooked up correctly see:

gnipsel.com/linuxcnc/tuning/encoder.html

JT

Please Log in or Create an account to join the conversation.

More
29 May 2014 21:17 #47518 by Poma

motion.spindle.index-enable will only be set in spindle synchronized moves AFAIK
(G33, G33.1 and G77)

I would assume G95 would be among those (feed per rotation). Is there a concrete way we can verify? If NOT, then I'm going down the wrong road.

Thanks JohnT. I tired it and here's what I got: I monitored motenc.0.enc-02.index, motenc.0.enc-02.index-enable, and motion.spindle-index-enable. Unlinkp worked to remove the signal between motenc.index-enable and motion.spindle-index-enable. Toggled motion-index-enable high. It went high. Then ran the spindle at 1RPM. I could see both Motenc signals changing (Index was a pulse, Index-enable was more square, maybe 50% on, 50% off). Motion-index-enable did not drop out. It did not change at all; stayed high.

My question is: how is it going to change without the index signal? Something internal to the motion module pulls it low? I don't agree that this is a wiring problem.

I need to figure out what it is that G95 uses for revolutions.

Please Log in or Create an account to join the conversation.

More
29 May 2014 21:40 #47519 by PCW
I think Johns instructions have a little error, you check the index hardware via the encoder pins,
not motions pins

You want to manually setp motenc.index-enable and then monitor motenc.index-enable
once set it should get cleared at the index position

Please Log in or Create an account to join the conversation.

More
29 May 2014 22:13 #47523 by Poma
Ah, makes sense now. That seems to be working great. However, the G95 is still going exactly 40 times faster than it should.

Could it be some scaling problem on either my commanded or feedback spindle speed?
Attachments:

Please Log in or Create an account to join the conversation.

More
29 May 2014 23:02 #47524 by PCW
Not sure how motenc driver scales the encoders, but
If you have a 1024 line encoder, the encoder scale should probably be 4096
so that motion.spindle-revs is scaled in spindle revolutions (1.00 = 1 turn)

Also the motion.spindle-speed-in must be fed the spindle velocity in RPS (not RPM)

Please Log in or Create an account to join the conversation.

More
29 May 2014 23:26 #47525 by Poma
I had it in RPM's.

Good find. Thanks for the help. Feedrate looks good now.

Please Log in or Create an account to join the conversation.

Time to create page: 0.537 seconds
Powered by Kunena Forum