Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: spunk on July 06, 2009, 07:40:04 AM

Title: M7 hold while activating
Post by: spunk on July 06, 2009, 07:40:04 AM
Hello

Trying to set up cnc machine which uses the M7 code to dispence a fluid.

When activating the Mist control all axis stop for a fraction of a second and then continue.

How can i make a smooth movement whilst activating M7.

Thanks in advance.

Spunk
Title: Re: M7 hold while activating
Post by: spunk on July 07, 2009, 03:13:07 AM
If you need more info just ask...

Also forgive any faulty english because i'm from belgium...

Cheers
Title: Re: M7 hold while activating
Post by: Hood on July 07, 2009, 03:28:38 AM
Have you tried with the M7 on the same line as your next G1 move?
If that doesnt work then the only way I can think of is tricking Mach to think you have another axis and using the Dir signal of that axis for switching the relay. That will require you to have the false axis move one direction to switch on and another to switch off, how well it will work I am unsure.
Hood
Title: Re: M7 hold while activating
Post by: spunk on July 07, 2009, 06:01:18 AM
M7 keeps stalling for a while...

used dir pin for c axis and it works perfect!
Title: Re: M7 hold while activating
Post by: spunk on July 08, 2009, 10:50:03 AM
Now the next question

How can I light an LED from the Dir output from an axis?

want to flash an LED when valve is turned on and offcourse LED turned off when valve is closed...

anyone?
Title: Re: M7 hold while activating
Post by: ger21 on July 08, 2009, 11:30:16 AM
Try using a different M code to call the same output, like M777?
Title: Re: M7 hold while activating
Post by: spunk on July 08, 2009, 01:07:14 PM
But doesn't this do the same as a normal M7?

And how do I program an additional M function?
Title: Re: M7 hold while activating
Post by: Hood on July 09, 2009, 02:10:24 AM
Easiest way would be if you have a double pole relay, you could then use the second pole to either activate a real LED or put it into Mach as an input and use either one of the normal Input/OEM Trigger  LEDs or have a brain look at that input and activate a user LED.
Hood
Title: Re: M7 hold while activating
Post by: spunk on July 09, 2009, 02:44:38 AM
i do have a normally closed contact free on my relay board from pmdx.

but all my inputs are used up so waiting for a pokeys to arrive.