Use 7i76e spindle encoder for MPG or just use 2 digital pins for A/B pulses?

More
6 years 2 weeks ago #185758 by jhandel
Howdy all,
I don't want to run in Software processing mode 2 because I need all the digital IO so losing 4 pins to analog and 4 pins for 2 mpgs is a bridge too far (loosing 2 pins to mpg is just fine, but losing the other 6 is a no go)

Could I use my spindle encoder (that data is coming in off my 7i89 as is) for the MPG encoder? or could I use the HAL and my BoB to create a 2 pin encoder on some of its IO (so 2 IO pins on P1 or P2)... Last option can I do a "software encoder just using 2 random IO pins?)

Thanks
Josh
(In a perfect world I would have a way to run in a software mode with 30 digital Inputs and 1 encoder, but I am happy to work around what ever to get so something that works well :))

Please Log in to join the conversation.

More
6 years 2 weeks ago #185772 by tommylight
4 analogue inputs will work as digital inputs in Mode 2, same should be true for encoder inputs but with a much lower threshold, that is if i remember correctly.
Spindle encoder will work for MPG for sure, i see no reason not to.
Using a BOB and one of the 26 pin headers will also work, but may require modified firmware.

Please Log in to join the conversation.

More
6 years 2 weeks ago #185864 by jhandel
Thanks... Just making sure there wasn't something "magical" about the MPG encoders.. If they are all operationally the same, then I'll just use the spindle A/B pins... Plus that gives me 5v I can feed my MPG..

Please Log in to join the conversation.

More
6 years 2 weeks ago #185867 by PCW

I don't want to run in Software processing mode 2 because I need all the digital IO so losing 4 pins to analog and 4 pins for 2 mpgs is a bridge too far (loosing 2 pins to mpg is just fine, but losing the other 6 is a no go)


You don't lose anything by simply selecting mode 2 (other than maximum servo thread rate if you need very high rates)
You only lose digital inputs where MPGs are connected, or inputs that are connected to analog sources.

Please Log in to join the conversation.

More
6 years 2 weeks ago #185980 by jhandel
What is the max reasonable thread speed for Mode 0 and Mode 2? (not sure if it would be impactful or not, and frankly haven't even looked into servo thread speed tuning yet.. )

Please Log in to join the conversation.

More
6 years 2 weeks ago #185983 by PCW
It's a marginal difference maybe between 6 and 10 KHz on a very fast host.
Note that in general, there is no "servo thread tuning". The default 1 KHz servo thread rate
is adequate for almost all CNC machines. Exceptions would be machines with combined
extreme accelerations and precision, and systems using torque mode drives that have a
velocity PID loop running in LinuxCNC.

Please Log in to join the conversation.

Time to create page: 0.929 seconds
Powered by Kunena Forum