Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: TOMMYD on July 16, 2012, 11:25:52 AM

Title: Spindle won't run with MDI or G-code
Post by: TOMMYD on July 16, 2012, 11:25:52 AM
I just connected my VFD to mach3. It works fine with the spindle button and the spindle speed input,but wont't respond to M3 or S in the MDI input window or G-code from V-carve pro. I am using PMDX107.PMDX125 and ethernet smooth stepper. I have attached my xml file. Thanks,Tommy
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 16, 2012, 01:47:24 PM
You have spindle relays disabled, I think when using the parallel port you need them enabled even if they are set to a ficticious output.
Hood
Title: Re: Spindle won't run with MDI or G-code
Post by: TOMMYD on July 16, 2012, 01:58:32 PM
Hey Hood,Thanks for the responce but that didn't do it.
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 16, 2012, 02:02:13 PM
Ok sorry I saw you said you were using the ESS, should read more carfully.
Ok I dont have a spare ESS so cant look at your ESS config but make sure you have the spindle set for Step/Dir in it (I assume thats what you are using anyway)
If that is not the problem check in the macro folder for your profile and see if the M3 macro is there and that it has DoSpinCW()  in it.

Hood
Title: Re: Spindle won't run with MDI or G-code
Post by: TOMMYD on July 16, 2012, 02:28:14 PM
I have the spindle set for PWM in the ESS config, that is what I am useing with the PMDX107 to send a 0-10v signal to my VFD ? How do I read M codes ? Thanks,Tommy
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 16, 2012, 02:33:26 PM
Open Mach then go to Operator menu then VB Editor. A window will open you then click File and Open and then  browse to your profiles macro folder. Just choose the M3.m1s if it is there and see whats in it. If its not then there should be one so you will have to create one.


Hood
Title: Re: Spindle won't run with MDI or G-code
Post by: TOMMYD on July 16, 2012, 02:51:53 PM
the code for m3 is as you say it should be,the only difference is the "m" is lower case for  m3,m4,m5 and all the oters are upper case.
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 16, 2012, 03:17:36 PM
Should be fine with the lower case, not sure why its not working then, will have another look at your xml and see if I can find a problem.
When you command a M3 from MDI is there any message in the error window?
Hood
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 16, 2012, 03:22:33 PM
Just typed M3 in the MDI and hit enter and the spindle LED turns on so it seems to be fine here. There is a PWM bumped to zero message so maybe that has something to do with it. Do you have the the PWM base Hz set correctly?
Hood
Title: Re: Spindle won't run with MDI or G-code
Post by: TOMMYD on July 16, 2012, 03:34:12 PM
PWM base hz set to 25 . I don't get an error message.
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 16, 2012, 03:35:41 PM
Does the spindle LED light when you MDI M3?
Title: Re: Spindle won't run with MDI or G-code
Post by: TOMMYD on July 16, 2012, 03:52:51 PM
in the shop where the computer is that runs the cnc the LED does not light when I MDI M3. In my office,which is hooked to nothing, is does light up. Same ver. of mach 3 and same XML file.
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 16, 2012, 04:25:19 PM
Ok to me it sounds like the m3 macro is not right.
Go to operator menu then VB editor and open the M3 macro and type on the line before or after the SoSpinCW()
MsgBox("Its being called")

Then save and exit the editor, now MDI a M3 and see what happens.
Hood
Title: Re: Spindle won't run with MDI or G-code
Post by: TOMMYD on July 16, 2012, 07:28:32 PM
Ok, I must be loosing my mind or I pulled up the wrong macros.You were right there was something wrong with the macro, the script was blank.I filled in m3 and m5 and they work with MDI and G-code. Now what happens is if I manually enter speed in the spindle speed box, 15000, and enter m3 in the MDI input it works and the speed is correct m5 stops the spindle. If I now enter in the MDI input m3s18000 the DRO says 18000 but the spindle is still turning 15000. Thanks for your help ,Tommy
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 17, 2012, 02:50:37 AM
Make sure your spindlespeed.m1s is there and correct, it should have the following in it

rpm = GetRPM()

SetSpinSpeed( rpm )


Hood
Title: Re: Spindle won't run with MDI or G-code
Post by: TOMMYD on July 17, 2012, 08:43:35 AM
Hey Hood,Thank you very much for your help.Everything works perfect,MDI and G-code. Any ideas why the script would not be there.I usually won't mess with it unless someone knowledgeable is telling me what to do. Thanks again.Tommy
Title: Re: Spindle won't run with MDI or G-code
Post by: Hood on July 17, 2012, 09:40:26 AM
Not really sure why it has happened but as long as its working now thats all that matters :)
Hood