Hello Guest it is April 19, 2024, 10:26:00 AM

Author Topic: Problem with spindle RPM DRO  (Read 2177 times)

0 Members and 1 Guest are viewing this topic.

Problem with spindle RPM DRO
« on: July 18, 2019, 11:32:42 PM »
I did a little bit of searching and I seem to be having a similar issue to this thread: https://www.machsupport.com/forum/index.php?topic=37473.msg256212#msg256212

I have a VFD, controlled via modbus that I can read the actual RPM back from.  I've basically followed this link, with tweaks for a Durapulse GS3 VFD:
http://caldwellfam.net/bill/wp-content/uploads/2019/04/Connecting-a-VFD-to-Mach4-through-the-Modbus-v5.pdf

I can control the RPM, and I can read the RPM back from the VFD without a problem.  The issue I am having is that when I try to update the droTrueSpindle DRO it flickers.  According to the API documentation, the mcSpindleSetSensorRPM() function is "This API function is what spindle control plugins should use to report the spindle speed."

The flicker is between zero and whatever value I pass to mcSpindleSetSensorRPM() in my PLC script.   Clearly something else is setting the spindle RPM to zero between the PLC service calls, but I have no idea where that is happening. 

Am I using the wrong function?  Should I be doing this differently?


Re: Problem with spindle RPM DRO
« Reply #1 on: November 02, 2019, 01:01:59 AM »
Hi,  i am having a similar problem in that i cannot get the Mach3 RPM dro to show any RPM at all.  The invertor shows the RPM, just not the Mach3 Dro.

Using HY inverter, C62 BOB and Smoothstepper and a 2.2Kw ATC 24,000rpm Spindle.

Have  looked for a Pulse output on all these devices (obviously not the spindle) so that i can connect to the BOB Index pin, but have had no luck finding such output.

When i do start the spindle, the Mach3 RPM Dro briefly shows some numbers and then rapidly counts down to 0.  Not sure if this is just reading some interference or not.

Any idea on how to get this to work.  This is driving me nuts.  I have looked for days and days on the web but nothing I find works.

Thanks
Dean. (my first post)
Re: Problem with spindle RPM DRO
« Reply #2 on: April 14, 2020, 09:58:12 PM »
Bumping this thread because I ran into exactly the same issue as the OP.  A DRO set to DRO Code "Spindle True RPM" just flashes erratically between 0 and the real RPM at a high rate.  Looking in Register Diagnostics, the value coming back on modbus is nice and stable. 

As a test, I did the following in the PLC script:
Code: [Select]
rc = mc.mcSpindleSetSensorRPM(inst,freq*60/100)
RPM, rc = mc.mcSpindleGetSensorRPM(inst)
scr.SetProperty('droTestRpm','Value',tostring(RPM))
I set the sensor RPM using the frequency read from the VFD, and then immediately read the sensor RPM back and use it to set the value of another DRO (which has no "DRO Code" selected).  That DRO works fine, nice and stable, no flickering.  This seems to support OP's theory that something in the background is erroneously stomping on the "Spindle True RPM" DRO.

Technically the test code above is a usable workaround for this issue, but it is a bit of a hack - it would be nice to understand what's really wrong here.
Re: Problem with spindle RPM DRO
« Reply #3 on: April 14, 2020, 10:25:42 PM »
Update:  Immediately after posting I started to wonder whether some other plugin was writing to the Sensor RPM, causing a race condition in the DRO.  The only obvious suspect was the Ethernet Smoothstepper plugin, so I unplugged the ESS board and voila - the "Spindle True RPM" DRO started working just fine.  So it seems that the ESS plugin was causing the problem, not Mach4 itself.

I checked the ESS plugin change log and it turns out that the latest few updates from earlier this year contained some changes related to spindle RPM.  I updated to ESS plugin v256, also requiring a Mach4 update for compatibility (I went to the latest, v4469) - and now the Spindle True RPM DRO works fine even with the ESS connected, so the underlying issue seems to have been resolved in the latest version of one or the other.

Hope this can help others.
Re: Problem with spindle RPM DRO
« Reply #4 on: April 17, 2020, 12:18:25 PM »
Another update:  After further testing, the issue actually wasn't resolved by updating to the aforementioned versions of Mach4 and the ESS plugin.

I posted to the Warp9TD forums - the behavior was confirmed, workarounds provided, and a solution should be coming to a released plugin soon!
https://warp9td.com/index.php/kunena/7-general-discussion/8384-ess-always-updating-spindle-sensor-rpm-in-mach4#24339
I've tested the development build that Andy provided and it successfully resolves this issue.

Offline Azalin

*
  •  181 181
    • View Profile
Re: Problem with spindle RPM DRO
« Reply #5 on: January 29, 2023, 11:59:40 AM »
May I ask what the workaround/fix did you get?
Re: Problem with spindle RPM DRO
« Reply #6 on: January 29, 2023, 01:27:31 PM »
May I ask what the workaround/fix did you get?
The workaround I had some success with at the time was the one provided in the linked warp9td forum thread.  I don't know whether it's since been rolled into the released ESS plugin.

For me, the actual "fix" was to switch from Mach4+ESS to LinuxCNC+Mesa.  I liked Mach4 and the ESS for the most part, but since I switched I've never had to wait for a vendor/developer to fix anything for me.