Hello Guest it is April 26, 2024, 09:21:19 AM

Author Topic: Index pulse and Spindle RPM?  (Read 3663 times)

0 Members and 1 Guest are viewing this topic.

Index pulse and Spindle RPM?
« on: January 01, 2020, 09:00:00 AM »
First of all, a Happy New Year to Everyone!

I have a question about the use of the input signal named Index. The 'Mach4 CNC Controller Software Installation and Configuration Guide version 1.0' describes this as input for a once per revolution signal to get the RPM of the spindle (pg. 23). When running the spindle I can see the Index Led on the 'Machine Diagnostics' page flashing. The Spindle DRO for true RPM remains at zero however. I also tried with a signal generator on the input pin, varying frequency and duty cycle, no joy.

The same input signal is used to 'home' the spindle, part of tool change macro, and that works OK.

Setup: Mach4 build 4300, Screen wx4.set; Motion controller CSMIO/IP-S, firmware v3.122;

Maybe this is related? Was this issue solved?

Hi All,

A few weeks ago, I switched over to Mach 4 build 4162. I was successful in getting all my screens and setting imported correctly, however the spindle DRO (which showed true RPM from my spindle index sensor) now sits at 0. I don't think I've changed any scripts or settings since the migration and it worked well beforehand.

Does anyone know any tricks to get this running again?

Thanks!

I was able to get an indication by writing a PLC script. It takes the motor position feedback register to calculate RPM once per second. Stores the result at mc.mcSpindleSetSensorRPM(), but the indication is somewhat unstable. I would like to use the 'build-in' functionality of the mach4 core here.

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Index pulse and Spindle RPM?
« Reply #1 on: January 01, 2020, 01:19:14 PM »
I once had a similar issue with a lathe, I ended setting the de-bounce to zero.
Without engineers the world stops
Re: Index pulse and Spindle RPM?
« Reply #2 on: January 01, 2020, 02:42:47 PM »
Thanks for the suggestion about de-bouncing, but, the signal is not from a mechanical switch. It's electronically generated from the spindle encoder index pulse, elongated to about 9.5 milliseconds.

I am still wondering why the Index pulse is not giving me a true RPM indication. The manual suggests this should be possible. Anyone?

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Index pulse and Spindle RPM?
« Reply #3 on: January 02, 2020, 02:37:41 PM »
Have you tried my suggestion ?
Without engineers the world stops
Re: Index pulse and Spindle RPM?
« Reply #4 on: January 02, 2020, 03:23:31 PM »
OK, I would like to try your suggestion, but.. Mach4 doesn't have a signal de-bounce setting in the configuration AFAIK. Also the motion controller doesn't provide a setting for that.

I tried with a signal generator directly on the Index input pin. This gives a good clean signal, the led for Index on the diagnostics page is flashing nicely. But, no resulting True RPM DRO indication.

Can you confirm you have an indication of true RPM by Index pulse on your lathe, using Mach4 build 4300?

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: Index pulse and Spindle RPM?
« Reply #5 on: January 02, 2020, 07:16:55 PM »
I have just noticed you are using a CS-Labs I am using ESS so the setup is different, ignore my rambling

Without engineers the world stops
Re: Index pulse and Spindle RPM?
« Reply #6 on: January 02, 2020, 10:07:35 PM »
Whoops... I really should have followed up on that issue...

In the ESS configuration, there were check boxes to get the spindle RPM display from the index sensor or an encoder. The boxes were a tad confusing in their placement and I had selected the wrong one.

Took Andy (Warp9TD) and I far longer than I care to admit to find the issue. He has moved the location of these check boxes for future builds.

Since you are using CS labs, This doesn't apply... Sorry :(
Re: Index pulse and Spindle RPM?
« Reply #7 on: January 03, 2020, 05:33:55 AM »
@mcardoso: Thank you very much for the follow up.

I am becoming aware of the fact that my interpretation of the Mach4 manual is not correct. I have to read the signal descriptions like: 'the signal has a name and an intended purpose'. But the signals have no connection to the Mach4 core; a plugin has to take care of any functionality and has to report results to the core. Please correct me if I'm wrong.

Re: Index pulse and Spindle RPM?
« Reply #8 on: January 03, 2020, 05:52:29 AM »
Hi,
my understanding is that in order to calculate the spindle rpm the time between index pulses is measured and
the inverse calculation is done to arrive at the rpm.

Given that the index pulses happen very rapidly it is not possible for Mach to do that measurement, remembering that
a PC is not and cannot be a realtime device. That interval measurement must be done by the realtime motion controller.

I use an ESS as it alone has the speed and resolution to make the measurement. I presume the CSMIO does the same.
It must also be said that CSLabs have been very slow, you might almost say reluctant, to add and/or debug realtime features
for their Mach4 plugin. I think an email to CSLabs seeking clarification about the interval measurement capability
of the CSMIO is in order.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Index pulse and Spindle RPM?
« Reply #9 on: January 03, 2020, 12:13:26 PM »
Thank you, Craig,

Email to CSLabs is on its way. You can almost predict the answer... They do have a solution for the spindle, the CSMIO-ENC expansion module for threading. It will require, officially, an extra, separate encoder on the spindle axis. But let's see what their answer will be.
In the meantime, my PLC script will have to do. It takes the motor position feedback register, "CSMIO-IP/Feedback Ch[5]" to calculate RPM once per second. It stores the result at mc.mcSpindleSetSensorRPM(). The indication is somewhat unstable, probably caused by timing issues. The script is added here for your entertainment, remember, newbie. I'm certain someone can come up with a better procedure, timing wise.

Mauk