Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: joe45 on February 19, 2016, 03:22:35 AM

Title: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 19, 2016, 03:22:35 AM
Hi there. I am currently wrapping up my first CNC lathe conversion from the trusty WM280V. I have the everything mounted, and all that is left is to set up the spindle control, the axis motors work perfectly. I have had little luck controlling the spindle speed with M03 & M04 codes, however they can change direction. As it appears, by either having the spindle PWM on either active low or high, I can have the spindle run flat out or dead slow, but with no change using gcode at all. For example I would use M03 S500, depending on the settings it will either be 2300rpm (Max) or 50rpm (Min). I have tried playing with the ports and pins settings on both Mach4 and the ESS with no luck. The test function on the PMDX107 does control the spindle, but the '30%' threshold runs a lot less than it should.

Does anyone have any ideas?

Thanks in advance

Joe
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: royce on February 19, 2016, 08:08:56 AM
I have a 126+107+ESS+VFD (different motor though). Have you tested the spindle using the PMDX107 by itself? It should start the spindle then ramp up to speed for 30 seconds or so. If that doesn't work then you have a problem with your VFD programming or your wiring. If not then.. Mach4 should ONLY be setup for "Spindle Fwd" in the output signals. In your ESS setup you should have the "SPINDLE FWD" and "SPINDLE PWM" configured properly. Once I had it setup, I bought a cheap tachometer off Fleebay for around $15 that uses reflective tape to calculate the spindle speed for precise calibration adjustment on the PMDX107.

Hope this helps.

(http://paxbc.com/images/mach/mach.jpg)

(http://paxbc.com/images/mach/ess.jpg)
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 19, 2016, 10:41:39 AM
Hi, firstly thank you for replying so promptly it is much appreciated!

I do believe I had tried them before (I think it was mentioned on another post?). However, I thought I would try it again as it worked for you. Unfortunately I still am only able to run at max speed or min depending on whether the pwm is active high or low. I did try to change the pwm frequency in the .INI file as another forum suggested this, it didnt work (I have tried 1000, 900, 400, 100, 50 and 25 Hz). If I run the test function, as stated in the 107 manual, pushing the black button, the spindle fires up to max speed, then at the second click slows down, third it stops, just as the manual suggests. For this reason I do believe the VFD and wiring is correct. I have run a series of gcode lines ( M03 S200, M03 S500, M03 S2000) one at a time and the spindle doesn't change speed, and putting a multimeter on the 107 the pwm voltage is constant low or high depending on the pwm active high low setting.

Have you any ideas?

Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: royce on February 19, 2016, 01:17:41 PM
When you are running your test on the PMDX107, have your VFD set to display output frequency on the led terminal. Verify it is in fact starting from your lowest freq. setting to your highest. It does sound like VFD programming and wiring is correct. In Mach do you have your spindle speeds setup? In the config there is an option for Spindle. You must enter in your minimum and maximum spindle speed. If thats okay, then I would try uninstalling M4 completely and starting over from scratch. Just curious, is this a liquid cooled spindle?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 19, 2016, 04:27:16 PM
don't set your active high or low in mach set it in ESS config
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 20, 2016, 11:48:18 AM
I have attached some photographs below showing the VFD frequency when the test button cycle is run on the 107. The last (5.6) is always on. Yes, I have the speeds setup in the first, so just 30 min 2300 max. So I guess try a fresh install?

So you mean in the mach outputs just have the cross no tick for the active high low?

Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 20, 2016, 11:54:23 AM
A quick thought. Should the spindle be shown under the motors and mapping tabs with the axis motors?

More photos attached.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: Steve Stallings on February 20, 2016, 01:40:35 PM
Hello Joe,

Your WM280V lathe uses a DC permanent magnet motor. This type
of motor along with the typical speed controller provided has very
poor linearity in the low speed range. The response that you see to
the test function built into the PMDX-107 reflects that. The best way
to cope with that is to adjust for the expected speed at 100% in
test mode and then use the Linearity.dat table in Mach3 to make
corrections for the lower speed ranges. While Mach3 can collect
this data automatically, I usually recommend measuring the motor
response and entering the data manually. At speeds above about
30% of rated speed you should achieve reasonable success.

Verification of maximum speed and data collection at other speeds
must be done without a Linearity.DAT file present in your Mach3 folder
in order to get unadulterated data.

To confirm proper operation of the PMDX-107 you can measure the
output voltage of the PMDX-107 between the Aout and Agnd terminals.
The voltage there will be a percentage of the voltage applied to the
Aref and Agnd terminals. At full speed the voltage on Aout should
be close to the same a the voltage on Aref. At 50% of full speed
the voltage on Aout should be close to half of the voltage on Aref.
These measurements should be taken using the built in test mode
or from Mach3 WITHOUT a Linearity.DAT table present in Mach3 as
the linearity correction will change them.

There are two other concerns in your configuration that you did not
mention.

First, you must have your Pulleys configured in Mach3 in order for
the S word settings to be meaningful. Mach3 uses this information
to compute the percentages for PWM by determining the ratio of
requested speed to the maximum possible for the pulley in use.

Second, the SmoothStepper has an unusual requirement in that it
needs an acceleration setting even though the spindle is not an axis.

Please see our application notes about using the PMDX-107 with a
SmoothStepper here:

http://www.pmdx.com/Doc/AN002_PWMSpindleSmoothStepper_02.pdf

Steve Stallings
www.PMDX.com
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 20, 2016, 02:38:15 PM
Steve M4
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: Steve Stallings on February 20, 2016, 02:41:13 PM
Oops, my bad.

The comments about the DC motor controller and it linearity problems are
still valid, but not my suggested solution.

To my knowledge there is no off the shelf solution in Mach4, nor do I know
how well the SmoothStepper works with PWM in the Mach4 environment.

Steve Stallings
www.PMDX.com
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 20, 2016, 02:42:09 PM
you don't tick the active low in mach at all leave it alone, leave the red X yes the motor should show in the motor tab's use a OB motor Steve will come back with the M4 info
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 20, 2016, 02:43:26 PM
there is a new M4 ESS plug coming out soon, weeks if not days
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 21, 2016, 05:59:04 AM
I have the ports and pins changed to match what has been suggested, however I cannot seem to be able to map the Spindle on OB1. On the 'Master' drop down menu for OB1 on the axis mapping tab, it shows empty and doesn't allow the use of spindle. Should the spindle be set up similar to the motors and be called motor 2 and have step direction on pins 6-7 as well as forward and pwm on 14&16?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 21, 2016, 01:57:32 PM
OB stands for out of band you just tick it in motors then in axis mapping you tick it then in the spindle setup you put what OB motor it is you don't set anything for it any where else.

then in your outputs you set the pin's

don't over think it
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 21, 2016, 02:18:08 PM
What I meant is that I select the OB1, for example, in the axis mapping tab, but it doesn't show in the motors tab at all, even when OB1 is selected in the spindle tab. When I exit the confi (after pressing apply) it wipes it...]
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 21, 2016, 05:38:43 PM
give a a couple of hours I will do a quick vid
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 21, 2016, 05:40:21 PM
Thank you, that would be much appreciated.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 21, 2016, 09:44:31 PM
OB stands for out of band you just tick it in motors then in axis mapping you tick it then in the spindle setup you put what OB motor it is you don't set anything for it any where else.

then in your outputs you set the pin's
I admit up front that I know nothing about the Mach4 ESS plug-in configuration (and only bits and pieces about the ESS Mach3 plug-in config).  But it sounds strange to me that the ESS would map a motor to an out-of-band axis in order to send PWM for spindle speed control.  The PWM is *not* a motor.  I would not expect the PWM to take the place of Motor0, Motor1, etc.  But like I said, I haven't looked at the Mach4 ESS config screens.

Bob
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 21, 2016, 09:57:39 PM
as far as i know that's how its done a OB motor for the spindle it's like that with Darwin, if its wrong for OP set up speck up
 the OB are motors 6 to 9
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 21, 2016, 10:28:22 PM
looking at the 107 manual you have the pins select as it's says to do and set in the ESS config.

in M4 config select spindle on as your pwm pin 16 and spindle forward as the on off pin 14.

bob and Steve you sell a board that connects to a ESS why don't you know how to set it up. and should the op be using it with M4. if I am out off line asking this question sorry but product support is your name and word
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 22, 2016, 02:58:40 AM
When you say set the PWM and FWD on pins 16 & 14 in M4, would that be outputs 16 & 14 or as it was stated before just spindle FWD on the outputs section?

Just a thought, should the system have a spindle feedback loop, such as a spindle encoder or sensor? If it doesn't (I haven't figured out how to set mine up yet) could this cause an issue?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 22, 2016, 04:32:58 AM
how you had it in ESS config looks good in Mach set the spindle on (pin 14) to spindle forward in M4 ( so when you start the spindle it runs cw).

Set the spindle PWM (pin 16) to spindle on in M4 (so when you turn it on it runs at set PWM).

it's sound arise about faces but it works that way. if it does not work set that way flip it around also close and restart M4 when you change pin setting's

I would check if you realy need the charge pump that's a old school thing a properly set up E stop should be all you need. (it will be argued about)

I am not 100% sure but if I am wrong Ger or tweckey will jump in and say I am, admin.

just doing the vid now I have a speech problem so it just pointing, in outputs I type in a pin number it just where that pin is mapped to from the ESS config
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 22, 2016, 04:43:49 AM
vid  http://autode.sk/1SMma69
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: Steve Stallings on February 22, 2016, 06:14:04 AM

Quote:

bob and Steve you sell a board that connects to a ESS why don't you know how to set it up. and should the op be using it with M4. if I am out off line asking this question sorry but product support is your name and word


PMDX has not responded to these Mach4 configuration issues because they are
not being caused by the PMDX product or its documentation. They are specific
to the EtherNet SmoothStepper and how it is configured under Mach4. We do
not have an ESS with Mach4 running at our shop. If we knew what it took to
make the ESS operate properly we would have spoken up, but we do not and
when we do not know something, we tend to keep quiet rather than guess.
Warp9TD and the SmoothStepper user community are better equipped to
respond to this issue.

The current ESS plugin for Mach4 is doing configuration in a non-standard way
and is scheduled to be totally reworked in the near future. When this happens
it should be much simpler to configure a SmoothStepper under Mach4.

Steve Stallings
www.PMDX.com

Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 22, 2016, 10:23:43 AM
I would check if you realy need the charge pump that's a old school thing a properly set up E stop should be all you need. (it will be argued about)
A minor quibble - how about "motion device dependent" instead of "old school".  If you are using a PC parallel port (I know, this thread has an ESS), then the charge pump is still worth using, even with Mach4.  The charge pump helps protect against the case where the computer may be starting up (or re-booting) and the machine is powered on.  The operating system toggles various lines on the parallel port during startup in an attempt to detect what kind of printer may be attached, which can cause things to turn on (even briefly) that the operator may not be expecting.

If you are running some other motion device (ESS as in this thread, or SmartBOBs or other such devices), it depends on how the motion controller behaves during its power-on cycle and before it is configured and running with Mach4.  Yes, from what I've seen the charge pump is less of a requirement for these configurations, but it can still provide an additional level of safety (or peace of mind).

Bob
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: royce on February 22, 2016, 11:17:43 AM
Many ESS users have had very weird problems with no solutions to their problems. The horseshoe up my bum seems to be holding out since the third recent mach update.

Even though i'm using ESS, I like the charge pump feature. My stepper drives and VFD are controlled by a magnetic contactor coil, which the coil line also runs through my E-Stop. I have a tendency to leave my mills disconnect power switch on by accident. Using the charge pump feature will only turn on those connected to the contactor when Mach 4 executable is running on the computer.

So far I am very satisfied with PMDX products and their superior one on one support, not so much on Warp9's software but they do offer better assistance than Artsoft. Hopefully the long waited ESS plug-in release will help others with their issues. 
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 22, 2016, 12:43:31 PM
Many thanks for your video, it has pointed me in the correct direction. However, as the attached images show, motor 6 doesn't show in the axis mapping tab at all. And when I click apply and close the window, and reopen it, the OB1 tick is restored to an X. Any ideas?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 22, 2016, 03:33:37 PM
Many thanks for your video, it has pointed me in the correct direction. However, as the attached images show, motor 6 doesn't show in the axis mapping tab at all. And when I click apply and close the window, and reopen it, the OB1 tick is restored to an X. Any ideas?
Check in the Mach4 config "Motors" tab. If the axis mapping tab only allows you to select 2 motors I would guess that you only have 2 motors enabled in the "Motors" tab (enabled means check marks next to the "Motor0", "Motor1", etc.).  From the 2nd image you posted I would guess that you have only Motor0 and Motor1 enabled.

Bob
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 22, 2016, 03:53:45 PM
Under the motors tab I only have motors 0 & 1 available, the only ones that show. By enabling another ( 2 ) in the ESS config, that one is now available. I can only go to motor 5 in the ESS config. Any ideas?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 22, 2016, 04:20:59 PM
do a reinstall as admin of M4 it should show more than 3 motors it does on my machine with a ESS
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: DazTheGas on February 22, 2016, 04:40:18 PM
After a small bit of research into your VFD tonight these are my findings if they help you in any way, i was going to do a video on the setup of spindles with the ESS but cant see the point until the new ESS plugin is released so ive been using the keypad instead for now.  (Come On Greg you can do it)

Im using an Optidrive VFD which is not much different to yours in a small way...

To begin with you need a pwm signal from the ESS passed to your PMDX board - and for those who want to know the ESS outputs a very good signal of 0 - 5v  - for this i will use Port3 - Pin1(pic1), but I think you will need to use Pin16 ??( I`m opposite to Steve and Bob that I dont know the PMDX stuff so they can confirm that) this will convert to your 0 - 10v reference.

There is no need to set ANY motor OB1 etc in mach, your PWM signal goes to your Output Signal - Spindle On (pic2)
Next you need to set your max rpm in the mach spindle screen for example my spindle max rpm is 24000 (pic3)

From this point I can enter the mdi and issue m3 s12000 and the VFD will start and run at 12000rpm.
Now my VFD only uses 1 signal for direction as its LOW for fwd and HIGH for rev, so I only need 1 output for direction so im using Port3 - Pin2(pic1), but from what I think is the manual for your VFD you need 2 signals, these are M0 = Forward and M1 = Reverse so you need to assign your fwd and reverse within the ESS config and mach config. (but this is where I am stuck with the PMDX what pins go to the fdw and rev on the spindle board) so just as an example I have quickly set a few pics on how i see yours should look within ESS and mach4 config, and then connect the outputs to your vfd.

perhaps I should of done a video a lot more easier to understand than typing!!!

Any questions just fire away.

DazTheGas

Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: DazTheGas on February 22, 2016, 04:41:15 PM
and heres pic5 cause i could only up 4 at a time

DazTheGas
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 22, 2016, 04:49:47 PM
Thank-you DazTheGas, you're help is very much appreciated. That setup does look virtually identical to what I had, except i have been using pins 14 & 16 as instructed by PMDX. Unfortunately I could only get a very low speed of 100rpm or a very high speed, 2300rpm, depending on whether the spindle pwm was high or low on the mach settings. This is kind of why I have been trying this OB1 route as it is something I haven't able to try...
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 22, 2016, 05:05:32 PM
I have tried a fresh install and the motors still do not show up automatically for the lathe gui, so I cannot set OB1. However, looking at the mill gui set, they do show automatically? Isn't this a bit odd?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 22, 2016, 05:25:19 PM
Any recommendations on what plugins should be selected? The mill one has them all?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 22, 2016, 05:35:02 PM
Any recommendations on what plugins should be selected? The mill one has them all?
Definitely the Lua plug-in and definitely NOT the simulator plug-in.  You can leave all the others disabled until you need them.

Bob
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 22, 2016, 05:35:47 PM
Thank-you DazTheGas, you're help is very much appreciated. That setup does look virtually identical to what I had, except i have been using pins 14 & 16 as instructed by PMDX. Unfortunately I could only get a very low speed of 100rpm or a very high speed, 2300rpm, depending on whether the spindle pwm was high or low on the mach settings. This is kind of why I have been trying this OB1 route as it is something I haven't able to try...
Since you said that the PMDX-107 self-test functions work (mostly, as you commented early on that the 30% speed was off, and Steve's explanation for that), there are a couple of ways to try and verify the PWM signal is coming from the ESS on the pin that it should be coming on (pin 16 of whichever ESS port you have connected to the PMDX-126/107).  This requires a volt meter.

First, you can measure the voltage on the PMDX-107's output terminals.  put the black meter lead on the "AGnd" terminal and the red meter lead on the "Aout" terminal.  The voltage *should* vary linearly with spindle speed from 0 to 10V as Steve commented here (https://www.machsupport.com/forum/index.php/topic,31970.msg222550.html#msg222550).

You can also put the volt meter on the PMDX-126 on connector J6 with the black lead on the "PC gnd" terminal and the red lead on the "16" terminal.  Here, the voltage should vary linearly between 0V (approx) and +5V.  If you don't see this varying with spindle speed, then the PWM signal is not appearing, or at least is not appearing where it needs to appear.  Or, to be thorough, there may be something wrong with the PMDX-126.  But if you can assign a signal like "spindle fwd" or "spindle on" to pin 16 and watch it go to 5V and 0V, the PMDX-126 is OK.

Bob
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 22, 2016, 06:44:45 PM
Thanks Bob. Could it be possible that it is the lack of the LUA plugin not being enabled that is causing the issues? I will try the voltages at the first available moment tomorrow.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 23, 2016, 01:49:37 AM
Thanks Bob. Could it be possible that it is the lack of the LUA plugin not being enabled that is causing the issues? I will try the voltages at the first available moment tomorrow.
Probably not.  It doesn't matter for our plug-in, and I *suspect* it wouldn't matter for the ESS plug-in.  But I don't know.  And it doesn't hurt to have the Lua plug-in enabled.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 23, 2016, 02:37:19 AM
joe45 do what daz says to do and you need to find how to go cw, ccw for threading and that sort of thing, so you can run a encoder on your spindle.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 23, 2016, 05:35:32 AM
I am fully able to move the spindle with M3 & M4 codes, CW and CCW, however it is the S*********x command that doesn't work, it is almost as though there is no PWM output. I will try the voltage testing as Bob suggested today, probably this evening.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 23, 2016, 05:41:06 AM
good stuff it will be something small stopping it working
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 23, 2016, 04:09:16 PM
Ok, so I tried an idea. I loaded the mach4mill profile and was able to setup the OB1 on the spindle, excellent. Everything works, better than on the lathe profile I might add. However the spindle is still not working. I cannot even get it to turn now. The relay clicks on and off when I hit an M03 code (not for M04) and the lights switch (see attached). The pmdx107 test mode works and the voltages show around 8.4v (2300rpm) at max, 2.3v at 700 RPM. As Bob recommended I tried the voltages on pin 16 and the pc_gnd and it dropped from 4.8v to 0v as hoped for. Any thoughts?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 23, 2016, 06:01:14 PM
try without OB1 Daz said to not use it he is a IT guy who is not full off his self and is very good at this Mach4 stuff
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 23, 2016, 06:31:47 PM
Well I have tried the setting s that Daz has suggested and on the new profile it doesn't start the spindle at all. On the old lathe one it started it but couldn't speed it up or slow down... It is starting to get very odd and even more confusing...
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 23, 2016, 07:20:22 PM
yep ok have you set speed's in the Spindle page ???

so the on/off is working when you do a M3 is there voltage on pin 14, pin 16 is working.

pin 14 should just be high to low or low to high
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 24, 2016, 12:22:48 AM
Ok, so I tried an idea. I loaded the mach4mill profile and was able to setup the OB1 on the spindle, excellent. Everything works, better than on the lathe profile I might add. However the spindle is still not working. I cannot even get it to turn now. The relay clicks on and off when I hit an M03 code (not for M04) and the lights switch (see attached). The pmdx107 test mode works and the voltages show around 8.4v (2300rpm) at max, 2.3v at 700 RPM. As Bob recommended I tried the voltages on pin 16 and the pc_gnd and it dropped from 4.8v to 0v as hoped for. Any thoughts?
Just to make sure I understand: when you measured the 8.4V at 2300 RPM and 2.3V at 700 RPM on the (I presume) PMDX-107's Aout and Agnd terminals, was that using the PMDX-107's test mode (for full speed and 30% of full speed)?  Or was that using M3/S********* commands from Mach4?  If so, what "S" commands did you use?

And when you checked the voltage on PMDX-126 connector J6 "16" and "PC gnd" terminals, what were the "S" commands that corresponded to those voltages?  And were you able to get any voltage between 0V and 4.8V, for example by trying to set the spindle speed at 1/2 of full speed?

In the two pictures  you posted, it looks like the pin 16 LED on the PMDX-126 is on full brightness in both pictures.  The pin 16 LED should vary brightness as you change spindle RPM.  It also shows that the PMDX-107 does not see a valid PWM signal as its "PWM" LED is off, as are the "Fwd/Run" and "Rev/Dir" LEDs.

And a curiosity, though this is a secondary concern over getting the PWM to control spindle speed and DO NOT CHANGE THIS NOW - I notice that you have the PMDX-107 DIP switch #4 in the "up " position, which tells the PMDX-107 to ignore the "charge pump OK" signal.  I thought you were using the charge pump signal on pin 17 from the ESS to the PMDX-126. If so, we normally recommend having the PMDX-107 also pay attention to the charge pump signal.  This is a minor issue as the PMDx-126 should guarantee that the PWM signal is disabled if the charge pump signal goes away.  If you wish to change it, wait until the PWM issue has been fixed (debug by only changing one thing at a time, otherwise you have no way of know which change fixed the issue).

I think it may be time for you to post a copy of your profile, so we can see what you actually have configured.  You can either post just the "Machine.ini" file from profile directory (i.e. C:\Mach4Hobby\Profiles\YourProfileName\Machine.ini), or you can create a profile package and post that.  Go to the Help->Support menu and select "Create Profile Package".  You will have to change the file extension from ".m4prof" to ".zip" in order to upload it here.  I can look at the general config items but I'm not sure I can be of any help on the ESS specific settings.

Bob
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 24, 2016, 03:11:48 AM
Yes the spindle speeds are all set, according to my machine, just as Daz instructed.

Bob, Yes I measured the voltages on the Aout and Agnd termals as you suggested, and due to the lack of control I did use the test mode. Unfortunately at the time I only tried spindle on and off for the J6 "16" part, I will try again later with different "S" commands.

I did originally have the dip switch 4 "down" however I was trying different things ( Before I posted here) to get the system working, and after reading the manual I had a thought that is may be causing an issue, it obviously wasn't. Of course I was just trying different things at the time.

I have attached the information requested for the new mill profile I created as a trial last night. I have also included the machine.ini file for the original lathe profile.

Thank-you again for all your help, this is an area I am very new to...

Joe
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 24, 2016, 03:12:21 AM
Old lathe profile
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 24, 2016, 04:55:01 PM
A couple of things from a *very* quick look through the MILL profile INI file (not the lathe version).

(1) In the ESS configuration you have Port 1 Pin 16 flagged as "active low".  It should be "active high".

(2) In the standard Mach config dialog on the "Output Signals" tab, you have the Mach4 "Spindle On" signal mapped to the SmoothStepper "Spindle RPM" signal, which you i turn have mapped to port 1 pin 16.  This doesn't sound right to me, and sounds like it would override the intended PWM on port 1 pin 16.  I don't think you should have *ANY* of the Mach4 signals on the "Output Signals" tab assigned to the "Spindle PWM" signal.

Try those changes to your MILL profile and see what happens.

Bob
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 24, 2016, 06:13:39 PM
one other thing you have motor 0 set as 0 good.

then you have motor 1 set in motors tab then in Axis mapping you have motor 2 set as motor 1.

you should have motor 2 set as motor 2 in motors and Axis mapping
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 25, 2016, 01:14:11 PM
Ok, so I have tried your suggestions and it would appear to have made it worse. I now cannot move the motors at all, and the pins do not change when a gcode is entered for the spindle, only when the CW button is clicked. I have a log attached of the spindle code running. I have attached the new .INI and profile.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: bob_at_pmdx on February 25, 2016, 03:29:17 PM
OK - this is not at all a PMDX issue and I'm done playing "guess what non-obvious configuration is needed".  Time to get Warp9 to support their own product.  Try posting on their forums and see if anyone can explain how to get PWM out of the ESS.  Go here:

     http://warp9td.com/index.php/kunena/index

You have to create an account to even browse the forums :-(

If you find out it would be helpful to people here for you to post the settings necessary for this.

Bob
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 25, 2016, 04:01:53 PM
Thanks for all your help Bob, I have posted on their forums and will report back if there is any news. I am of course still open for help from this page if there are any other ideas.

Thanks again

Joe
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 25, 2016, 05:55:54 PM
Joe what ever you do is going to change a a few weeks
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 25, 2016, 06:45:51 PM
How so?
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: royce on February 25, 2016, 07:26:15 PM
How so?
Warp9 is coming out with a new plug-in release that will be be totally different integration geared towards Mach4. Could be weeks, months, who knows but ESS users have been waiting a very long time.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 25, 2016, 07:36:52 PM
it's not months, weeks
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 26, 2016, 01:13:51 AM
Well that will be extremely helpful. Hopefully it isn't too far away...
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 26, 2016, 02:03:13 AM
let you know next week did you double check what I asked over on ESS forum
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 26, 2016, 02:29:28 AM
First thing to do when I get home, fingers crossed
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: dude1 on February 26, 2016, 03:41:56 AM
it could well be having OB1 on making it not work
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: joe45 on February 26, 2016, 11:40:21 AM
Ok, so I have tried Mach3 demo, just set it up for the spindle as the 107 manual suggests, and the spindle works! It works wonderfully! So are there any thoughts why it wont run on Mach4? I don't really want to have to buy Mach3 as well.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: Tweakie.CNC on March 01, 2016, 07:00:03 AM
Ok, so I have tried Mach3 demo, just set it up for the spindle as the 107 manual suggests, and the spindle works! It works wonderfully! So are there any thoughts why it wont run on Mach4? I don't really want to have to buy Mach3 as well.

Mach3 generates and outputs a PWM signal.
Mach4 does not generate a PWM signal (it is up to the external motion controller to generate and/or output a PWM signal).

As soon as I get some spare machine time I will look into this PWM issue and how it is handled by the new (yet to be released) ESS plug-in.

Tweakie.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: Pedio on March 01, 2016, 07:36:15 AM
I have Mach 4 with a PMDX motion controller. PWM works with my laser. I use input 16 (they have this preconfigured for spindle control). The first laser I received did not work well. It appears that M4 and PMDX were changing the signal too fast (turning on and off the laser too fast). The laser manufacturer said this was a problem with their board and replaced the unit. The new one works well.
Title: Re: Mach4 with ESS and PMDX126/107 speed control issues.
Post by: Tweakie.CNC on March 01, 2016, 11:40:43 AM
With the latest (yet to be released) ESS plug-in…

Set the max. desired spindle RPM in the Spindle tab of the Mach4 config.
Set the Output Port & Pin# you will be using under Spindle Motor Step / Mapped Pin 1 in the Output Signals tab of the ESS config.
If necessary the generated PWM signal can be inverted in the Pins Config. tab of the ESS Config.

Checking with my scope the PWM signal output from the ESS is of excellent quality and resolution and it fully adjustable from 0% to 100% duty cycle with the Mach4 S### command etc.

Tweakie.

(The above assumes that the plug-in does not undergo major changes between now and the time it is released).