Spindle synchronized motion with Mesa 7i96s
I'm using a Mesa 7i96s and I configured my HAL file using pncconf (also added an additional custom hal file for my mpg).
When I try a G33, I get the error "Spindle not turning in G33"
and when I try G76, I get "Chosen spindle (0) not turning in G76"
I've confirmed that spindle.0.revs is counting upwards (I did have to change the sign of the encoder scale in the ini file. It's not a quadrature encoder, just using phase A, not phase B ) and hm2_7i96s.0.encoder.00.index-enable goes from True to False when the spindle first passes the index of the encoder. spindle.0.at-speed seems to always be true.
What else might I be missing?
The G code manual for g76 and g33 mention "The pins motion.spindle-at-speed and the encoder.n.phase-Z for the spindle must be connected in your HAL file". I don't see either of these pins in the pncconf generated hal file and hm2_7i96s.0.encoder.00 doesn't seem to have a phase-Z pin.
Thanks for any help,
Carson
Please Log in or Create an account to join the conversation.
The spindle feedback pins changed from motion.spindle-XXXX to spindle.0.XXXX when multiple spindle support was added.The G code manual for g76 and g33 mention "The pins motion.spindle-at-speed and the encoder.n.phase-Z for the spindle must be connected in your HAL file". I don't see either of these pins
(If you look at the latest docs, this change has been made) linuxcnc.org/docs/stable/html/gcode/g-code.html#gcode:g76
encoder.N.XXX will not exist if you are using a Mesa encoder rather than a software/HAL encoder.
I assume you have the encoder pulse wired to both the phase-A and phase-Z hardware pins on the Mesa card?
Is the encoder set to counter-mode?
It is possible that the system believes that the spindle speed is too high to performt the threading pass.
Please Log in or Create an account to join the conversation.
Did you verify that the spindle position increments by 1 for each turn?
What RPM are you running the spindle?
Does the RPM value from the encoder match?
I would not expect this to matter since spindle-at-speed is forced true,
but crazy numbers might make the spindle-synch motion controller
give up
Please Log in or Create an account to join the conversation.
The encoder pulse is just wired to the phase-A pin on the mesa card. There is no phase-Z, just phase-A and phase-B. The index pulse is wired to the index pin on the mesa card.
I assume you have the encoder pulse wired to both the phase-A and phase-Z hardware pins on the Mesa card?
Is the encoder set to counter-mode?
It is possible that the system believes that the spindle speed is too high to performt the threading pass.
Yes, the encoder is set to counter-mode.
The spindle is not being controlled by Linuxcnc, it's just an AC motor with a pulley. I'm running at ~500 rpm (which is the lowest speed). I've done threading (g76) with this setup before using linuxcnc and a parallel port. This is my first attempt now that I've upgraded to the mesa ethernet board.
Yes, when I watch hm2_7i96s.0.encoder.00.position, it increases by 1 every revolutionDid you verify that the spindle position increments by 1 for each turn?
What RPM are you running the spindle?
Does the RPM value from the encoder match?
When I watch spindle.0.speed-in with the motor running it reads ~9.6 rps ~570 rpm which is about what I expect.
Let me know if you have other suggestions/things to check. Thanks for your help!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19188
- Thank you received: 6432
Yes.I guess the encoder "phase-Z" is the same as the index.
Did you try adding - in front of scale value in the ini file, or using "calibration" from the "machine" menu?I also don't understand why I immediately get the "spindle not turning" error when executing a g33 or g76.
Please Log in or Create an account to join the conversation.
Because you will get "Chosen spindle(0) not turning in GXX"
error if not...
Please Log in or Create an account to join the conversation.
Thanks for your help guys! Sorry for the silly mistake
Please Log in or Create an account to join the conversation.
was the next thing to look at.
Please Log in or Create an account to join the conversation.