Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: chenpeiguo on March 19, 2006, 09:55:07 AM

Title: How can I use more outputs to drive relay?
Post by: chenpeiguo on March 19, 2006, 09:55:07 AM
I know M3 M4 M7 M8 can drive relays,how can I drive more relays?
Title: Re: How can I use more outputs to drive relay?
Post by: Brian Barker on March 19, 2006, 11:45:16 AM
You can use as many as you like... If would like to use the P port it can be done with Output #1 -20. To use them you are going to have to make Mcodes to turn them on and off.

Example:
'M100
ActivateSignal(output4)

'M101
DeActivateSignal(output4)
Title: Re: How can I use more outputs to drive relay?
Post by: chenpeiguo on March 20, 2006, 11:28:53 AM
Thank you very much!
I will try to do a test.
Title: Re: How can I use more outputs to drive relay?
Post by: cosmynnec on May 15, 2006, 04:41:01 PM
How can i do an Mcode ?
Title: Re: How can I use more outputs to drive relay?
Post by: HillBilly on May 15, 2006, 06:16:20 PM
You need to save the code to your Mach3Mill (or Mach3Turn) folder. Like this:
---------------------------------------------------------------------------------------------------
ActivateSignal(output4)

Save as Mach3/macros/Mach3Mill/m100.m1s
---------------------------------------------------------------------------------------------------
DeActivateSignal(output4)

Save as Mach3/macros/Mach3Mill/m101.m1s
---------------------------------------------------------------------------------------------------
Works good just tested it.

Darek