Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: 8ace on March 21, 2015, 07:42:45 AM

Title: Mach Turn Spindle direction issue
Post by: 8ace on March 21, 2015, 07:42:45 AM
Hi,

I’ve just finished my custom CNC lathe build and I have an issue with the spindle direction.

Everything is working ok as far as the spindle running in both directions (and variable speed control is working). But I would like to machine with a default CCW spindle direction.

Using it manually when I press the spindle start/stop button it runs CW. I can use the M4 command to change direction but I have to use it every time I press the spindle button which is a pain.

Is there a way to change the start/stop spindle screen button to an M4 CCW default setting? As my CAM software outputs an M4 CCW G-code.

Cheers

8ace
Title: Re: Mach Turn Spindle direction issue
Post by: Hood on March 21, 2015, 06:01:58 PM
There is an OEM code for Spindle CCW Toggle but I have a funny feeling it does not work as I am sure I tried it before.
I probably won't be at the workshop tomorrow so won't be able to test until Monday, assuming I remember ;)
If you wish to give it a go it can be done via the VB editor, just go to Operator menu then choose VB Editor and in the window that pops up just put the following

DoOemButton(173)

If it works then you can either edit the button on screen to be oem 173 or you can make a new button.

On my lathe I just have a M3 doing CCW as it is only me that uses it and it was just easier to set up that way.

Hood
Title: Re: Mach Turn Spindle direction issue
Post by: 8ace on March 22, 2015, 05:46:43 AM
Many thanks Hood for the reply.

I’ve been messing around with the VB editor and the 173 code does turn the spindle in a CCW direction but I’ve been unable to integrate it with the MachTurn screen (due to my lack of programming skills and understanding of the editing side)

I’ve got a work around by creating 2 lathe profiles, one for manual/wizard turning using M3 CCW and another for running programs from my CAM program using M4 CCW. Just got to remember to use the correct one.

Thanks again for your assistance.

8ace
Title: Re: Mach Turn Spindle direction issue
Post by: Hood on March 22, 2015, 06:26:46 AM
That is good to hear that it works :)

See if this works for you, I am assuming you use the standrd Turn screenset?
If you download the attached files, place the 1024spindle.lset in the main Mach3 folder and the 2 spindle png files in the Bitmaps, TurnBitmaps folder.
Next in Mach go to View menu then Load Screens and in the file type drop down choose Turn Files. .lset and you should then see the 1024spindle.lset, just choose it and you should have the screenset loaded.
It will have the button for CW and CCW as shown in the screenshots below.
I had to get rid of the tool set button from the Cycle screen ato make room for the CCW button, if you need that let me know and I can swap it with a different button.

Hood
Title: Re: Mach Turn Spindle direction issue
Post by: Hood on March 22, 2015, 07:05:13 AM
Sorry forgot to add the .lset and png files ::)

Hood
Title: Re: Mach Turn Spindle direction issue
Post by: 8ace on March 22, 2015, 02:55:14 PM
Outstanding, after playing with it I've now got both buttons.

Many thanks again for your help.

8ace
Title: Re: Mach Turn Spindle direction issue
Post by: Hood on March 22, 2015, 06:38:20 PM
No problem :)

Hood