Hello Guest it is May 14, 2021, 09:44:30 AM

Author Topic: ESS and PWM Speed Control  (Read 2724 times)

0 Members and 1 Guest are viewing this topic.

ESS and PWM Speed Control
« on: December 28, 2015, 06:03:28 PM »
I am using Mach 4 with an ESS.  In Mach 3, with open loop control, I could say what pulleys were in use and the spindle speed would be about right open loop.  In Mach 4, if I do S6000, I see around 4000 RPM.  Does the ESS do open or closed loop spindle speed control?  If open loop, do I need to say what pulleys are in use and where would I do that - it looks like this is what spindle ranges are for, but how do I use those?  If closed loop, how come it's so far off?
Re: ESS and PWM Speed Control
« Reply #1 on: December 28, 2015, 09:27:16 PM »
If the ESS plug-in config screens don't have a place for effective pulley ratios, I would *guess* you need to configure the pulley ratios in the Configure->Mach dialog, then click on the "Spindle Config" tab (or something like that, I don't have a copy of Mach4 here to see the exact name).

Re: ESS and PWM Speed Control
« Reply #2 on: December 29, 2015, 07:51:17 AM »
That's what I would guess too, but I don't see a place to input pulley ratios or ranges.
Re: ESS and PWM Speed Control
« Reply #3 on: December 29, 2015, 11:23:46 AM »
Are you saying you don't see a place for this on the ESS config screens?  Or on the general Mach4 config screens?

Hmm...  I just realized that Mach4 calls these "spindle ranges" not pulley ratios.

For the general Mach4 config go the "Configure" menu and select "Mach".  Then click on the "Spindle" tab.  You will see 20 rows labeled "0" to "19", with columns "MinRPM", "MaxRPM", etc.  If you have only one pulley config, enter that on the "0" line.  Usually the "MinRPM" is zero and "MaxRPM" is the actual spindle RPM (not spindle *motor* RPM) when the spindle speed PWM signal is at 100%.  Then, down at the bottom of the window there is a field for "Max Spindle Motor RPM".  This is exactly what it sounds like, the actual motor RPM at max speed.  For example, if you have a 1:2 pulley ratio, then the max motor RPM would be 1/2 of the max spindle RPM.

If that doesn't work, then if nobody else chimes in here I guess your best bet is the ESS support forums over on warp9td.com.

Note: Line "0" is the default spindle range when Mach4 starts.  In order to use any other line ("1" through "19") you will need a custom button or Lua script to change to a different spindle range. The Lua functions are:

    mc.mcSpindleSetRange(number mInst, number Range) where "range" is a number 0 to 19.
    mc.mcSpindleGetRange(number mInst) returns current range, 0 to 19

Re: ESS and PWM Speed Control
« Reply #4 on: December 29, 2015, 11:41:41 AM »
Thanks.  I have multiple pulleys.  I see the screen with the spindle ranges and can enter multiple ranges.  I don't understand how the ESS knows which range to use to set its PWM value in order to do its open loop control of the spindle speed.  In Mach 3 it was possible to pick a pulley combination (now spindle range).  I can change Range 0 every time I change the pulleys, but that's not the ultimate in usability.  Are other people writing Lua scripts in order to do this?  I'll check the ESS forums.

Offline Chaoticone

  • *
  •  5,626 5,626
  • Precision Chaos
    • View Profile
Re: ESS and PWM Speed Control
« Reply #5 on: December 29, 2015, 04:35:46 PM »
Spot on Bob!

You can also go to the Machine Diagnostics tab and enter in the range in the range DRO.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!