- Posts: 69
- Thank you received: 0
VMC related HAL questions.
Any tips on how to tune the spindle? Positioning should be easy, but I imagine that it's a bit more difficult to get it to handle different loads?
Please Log in to join the conversation.
thewho wrote: I imagine that it's a bit more difficult to get it to handle different loads?
It depends on your spindle, really. Mine is so slow and powerful that I haven't actually bothered making it closed-loop.
Also, it isn't like actual spindle speed is desperately critical.
Get the FF0 right and a bit of I to compensate for nonlinearity and you are probably as close as you need to be.
Please Log in to join the conversation.
EDIT: But it does turn if I remove line 29
Not as intended of course, but it reacts to M3.
Please Log in to join the conversation.
The thing is that that needs to be set in either velocity mode or orient mode, so you need an OR component.
Please Log in to join the conversation.
Please Log in to join the conversation.
thewho wrote: It complains that "spindle-pos-cmd" is float and or2 wants bit.
Sorry, yes.
I should have used the orient-mode and position-mode signals.
Please Log in to join the conversation.
I can't thank you enough Andy!
The spindle encoder was apparently not connected correct, but with a little hal-scoping i figured out that index and A was inverted. Quick fix and then it worked! :laugh:
A question though, when I write M19 in MDI mode nothing happens. Do i need to specify the R,Q,P parameters or is there something else?
Please Log in to join the conversation.
thewho wrote: A question though, when I write M19 in MDI mode nothing happens. Do i need to specify the R,Q,P parameters or is there something else?
It should work.
Time to check things out with the HAL tools. Try opening "show hal config" and selecting the watch tab, then adding the motion.spindle-orient, the orient component pins, the angle, hm2_5i25.0.7i77.0.1.spinena, the PID inputs and outputs and enable, etc
Please Log in to join the conversation.
"Motion.spindle-is-oriented" is always lit, that can't be right?
Please Log in to join the conversation.
thewho wrote: I can't get pid.1 (position) to react.
"Motion.spindle-is-oriented" is always lit, that can't be right?
No, that is likely to be the problem.
The issue here is one of calculation order. The near.0 calculation is happening before the orient component can calculate a new position, so the motion system gets the signal that orient is over before it even begins.
The best solution is to use a different version of "orient" that I have written which outputs a pin to drive motion.spindle-is-oriented.
For testing just comment-out the line
But the best solution is to comp --install the modified orient component, remove all references to near.0 and have
Please Log in to join the conversation.
