VMC related HAL questions.

More
06 Jun 2015 05:06 #59503 by thewho
Replied by thewho on topic VMC related HAL questions.
Nice, thank you :)

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 or Create an account to join the conversation.

More
06 Jun 2015 05:16 #59504 by andypugh
Replied by andypugh on topic VMC related HAL questions.

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 or Create an account to join the conversation.

More
06 Jun 2015 16:24 - 06 Jun 2015 17:48 #59509 by thewho
Replied by thewho on topic VMC related HAL questions.
Removed that line but now i can't get the spindle to move at all. M3 S(any number) does not turn it on.

EDIT: But it does turn if I remove line 29
net velocity-mode		motion.spindle-on pid.0.enable

Not as intended of course, but it reacts to M3.
Last edit: 06 Jun 2015 17:48 by thewho.

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

More
06 Jun 2015 18:22 #59510 by andypugh
Replied by andypugh on topic VMC related HAL questions.
It looks like we need to find a way to drive hm2_5i25.0.7i77.0.1.spinena

The thing is that that needs to be set in either velocity mode or orient mode, so you need an OR component.
loadrt or2 count=1
addf or2.0 servo-thread
net spindle-pos-cmd or2.0.in0
net spindle-vel-cmd or2.0.in1
net spindle-either-cmd or2.0.out hm2_5i25.0.7i77.0.1.spinena

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

More
06 Jun 2015 18:43 #59514 by thewho
Replied by thewho on topic VMC related HAL questions.
It complains that "spindle-pos-cmd" is float and or2 wants bit.

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

More
06 Jun 2015 19:29 #59517 by andypugh
Replied by andypugh on topic VMC related HAL questions.

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 or Create an account to join the conversation.

More
06 Jun 2015 20:37 #59524 by thewho
Replied by thewho on topic VMC related HAL questions.
I just stood by the machine doing G33.1 over and over with my mouth wide open :woohoo:
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 or Create an account to join the conversation.

More
06 Jun 2015 20:59 #59525 by andypugh
Replied by andypugh on topic VMC related HAL questions.

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 or Create an account to join the conversation.

More
06 Jun 2015 22:40 #59531 by thewho
Replied by thewho on topic VMC related HAL questions.
I can't get pid.1 (position) to react.
"Motion.spindle-is-oriented" is always lit, that can't be right?

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

More
06 Jun 2015 22:55 #59533 by andypugh
Replied by andypugh on topic VMC related HAL questions.

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
net spindle-in-pos 		near.0.out motion.spindle-is-oriented

But the best solution is to comp --install the modified orient component, remove all references to near.0 and have
net spindle-in-pos orient.0.is-oriented => motion.spindle-is-oriented
Attachments:

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

Time to create page: 0.092 seconds
Powered by Kunena Forum