Spindle Syncronized Motion (Threading) with 7i76e

More
26 Jul 2017 01:59 #96441 by mikeross
I have converted an Emco Compact 5 to LinuxCNC and I'm using the Mesa 7i76e card.
Almost all is working except it seems it won't perform threading (spindle syncronized motion).

When I program a simple G33 move it just waits forever.
I have hooked up an optical encoder that is giving 100 pulses per rev, plus an index once per rev and I can see them in the HAL configuration, plus I've got the Spindle-at-Speed showing ok now too though I have a very non-linear speed controller...
Looking for help as to what I may have missed.
I.e. what signal is it waiting for that I can check in the HAL configuration?

Thanks,

Mike
Attachments:

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

More
26 Jul 2017 03:24 #96444 by PCW
Have you verified that the spindle position counts UP by one each turn?
Also the index needs to be checked. if you can disable the spindle drive you should
be able to test both of these things by hand rotating the spindle.

To check the index , either watch or halmeter spindle-index-enable and then
type:

halcmd sets spindle-index-enable true

in a terminal window

Now when you rotate the spindle, spindle-index-enable should go false when the index is detected.

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

More
27 Jul 2017 00:31 #96519 by mikeross
using halcmd sets spindle-index-enable true and rotating the spindle by hand I can see spindle-index-enable go false when it passes the index slot.

The weird thing I'm now noticing is that the spindle-revs do not change by 1 per revolution, but rather some random number, turning slowly and stopping at the index I get (per rev) 3.785, 4.3625, 3.7625, 4.105,
turning slightly faster 3.485 2.8075
faster still and trying my best to stop at the index:
1.5675
1.005
(actually they are negative values - see screen shot)
so there is something wacky going on. The optical pickups are just cheap-o units intended for use with arduino's, there may be reflections or some other thing causing the eratic behavior.

I'll try getting the machines original pickups working - and then I'll let you know if I can get the spindle sync going.
Thanks
Attachments:

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

More
27 Jul 2017 01:16 #96520 by mikeross
Now I remember why I used the cheap encoders, the machines original encoders though rated at 5volts pulled the MESA card down when connected. Turns out they are drawing way too much current. Measuring them I only 4 ohms resistance on the +5 to ground, which works out to 1.25 amps at 5 volts!

No way to power them from the MESA card, for testing I may try and rig up a 5V power supply for them.

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

More
03 Aug 2017 03:31 #96957 by mikeross
I have resolved my encoder issue and now I can see the spindle-revs increment by 1 per full revolution and by 0.01 for each encoder slot (actually they decrement - shows negative values for spindle-revs). Also the spindle-index-enable goes to false once the index passes it. Bu t I still can't get any motion when trying a g33 or G76 (I've tried the g76.ngc example to no avail - works right up to the threading section.

What to check next?
Does the negative spindle-revs value mean that its configured for rotation in the wrong direction? This machine can only go forwards as it stands now.

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

More
03 Aug 2017 11:03 #96971 by Clive S
This has come up before I think you have to change the sign (but I am no expert)

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

More
03 Aug 2017 11:31 #96972 by mikeross
I just checked by using M4 instead of M3 and I get motion, so I just need to figure out how to invert or absolute the signal.

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

More
03 Aug 2017 17:58 #96980 by PCW
You can reverse by changing the sign of the spindle encoder scale (from 100 to -100)

You can also reverse in hardware by grounding the encoder "B" input
(since you are using the encoder counter in up/down mode, the B input sets the
count direction and defaults to high = count down if unconnected )
The following user(s) said Thank You: mikeross

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

More
04 Aug 2017 23:58 #97014 by mikeross
Changing the encoder scale to negative worked. Thanks for your help.
Now on to fine tune the rest of the lathe.

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

Time to create page: 0.123 seconds
Powered by Kunena Forum