Hello Guest it is March 28, 2024, 07:35:30 PM

Author Topic: Mach 3 PWM signal inverted?  (Read 10065 times)

0 Members and 1 Guest are viewing this topic.

Mach 3 PWM signal inverted?
« on: February 23, 2016, 11:57:19 AM »
I need help with the PWM signal from Mach3.  I am hooking up a Super PID and the PWM signal is inverted.  When I send a M3 S5000 I get 25,000 rpm and when I send a M3 S25000 I get 5,000 rpm.  I have tried changing the Pin 14 output from active High to active Low but the signal does not invert.

Am I doing something wrong or do I have to build an inverter to go between the PWM and the PID?

Thanks,

Joe Lawrence
Re: Mach 3 PWM signal inverted?
« Reply #1 on: February 25, 2016, 08:48:49 AM »
Nobody else having this problem?

The active check box doesn't change the PWM direction.

Joe

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Mach 3 PWM signal inverted?
« Reply #2 on: February 25, 2016, 09:29:46 AM »
please post your xml file (usually C:\Mach3\Mach3Mill.xml unless you're using a different profile) copy it, rename it to joelaw.xml and use reply/additional options (not quick reply).
Re: Mach 3 PWM signal inverted?
« Reply #3 on: February 25, 2016, 10:07:33 AM »
Joelaw1 is my mach3 file and joelaw2 is my router xml.

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Mach 3 PWM signal inverted?
« Reply #4 on: February 25, 2016, 10:45:10 AM »
Joelaw1 is my mach3 file and joelaw2 is my router xml.

Not sure what you're meaning there - which is the xml you're using?

Anyway - I tried your Joelaw1.xml and it works just fine here. I get positive going correct duty cycles and when I tick step low I get negative going duty cycles.
Re: Mach 3 PWM signal inverted?
« Reply #5 on: February 25, 2016, 11:11:11 AM »
I am sorry, you asked for the Mach3.xml so the Joelaw1.xml file is the Mach3.xml.  The Joelaw2.xml is the setup that I am using.  I looked at the xml file and the Pin 14 output is set to 0 so I changed it in Mach3, closed and looked again and now it is a 1.  This still doesn't change the PWM from High going low to Low going high.

When I send a S30000 I get a low small pulse and when I send a S5000 I get a high small pulse going low.  This is reversed from what it should be and changing the 0 to 1 doesn't change the PWM at all.  I think it should change the pulse from high or +5v to low or 0v but no change?

Joe
Re: Mach 3 PWM signal inverted?
« Reply #6 on: February 25, 2016, 12:04:57 PM »
Hey Joe,
  Not sure if this matters, but the manual isn't really clear if this will work with the PWM signal.
Might try it though. In the Config ... Spindle Pulleys dialog.

Kind regards,
Russ
« Last Edit: February 25, 2016, 12:08:22 PM by Overloaded »
Re: Mach 3 PWM signal inverted?
« Reply #7 on: February 25, 2016, 12:12:23 PM »
Also, are you running the SS ? or PP ?
Russ

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Mach 3 PWM signal inverted?
« Reply #8 on: February 25, 2016, 12:15:41 PM »
You have a max pulley of 30000. Let's say you're set active HIGH.

If you command S30000 then you're asking for 100% duty cycle. You can't have a 100% duty cycle PWM - it would be permanently high and therefore wouldn't be PWM anymore. What you get is what you see in scrnsht1.jpg. i.e. you're getting as near as 100% i.e. 99.3996% HIGH.

When you command S5000 you're commanding 30000/5000 i.e. 1/6th speed. 1/6th is 16.666%. See attached scrnsht2.jpg. Bang on.

Flip it to active low and you get the exact opposite i.e. 99.3996% LOW and 16.666% LOW. Again Bang on.
Re: Mach 3 PWM signal inverted?
« Reply #9 on: February 25, 2016, 12:27:25 PM »
Overloaded,  I don't know what SS or PP is refering to?

Stirling, are you saying that the 30000 setting is to high.  I know that I don't really get 100% low or high PWM but I am seeing a 5v going low when I need a 0v going high.  The check box for Pin 14 does not change things.

Joe