Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Borisw37 on March 26, 2013, 02:30:10 PM

Title: M/G code to enable outputs
Post by: Borisw37 on March 26, 2013, 02:30:10 PM
I have defined and connected 6 outputs for specialized functions on my machine.
Enable1,2...6 or Output#1,#2...#6
What G or M code commands do I use to enable disable these outputs?
Title: Re: M/G code to enable outputs
Post by: Hood on March 26, 2013, 02:41:37 PM
You can make custom macros with numbers of 100 and greater and call them. For example if you wanted to activate output 1 then you would make a macro and place it in the macro folder of your profile. The macro would be as simple as

ActivateSignal(OutPut1)

So if you saved that as m101.m1s it would be called when you called m101 from code or MDI.

If you want to disable them then same idea except the macro would contain

DeActivateSignal(OutPut1)

Enables I dont think you can call from VB, they are activated/deactivated by the Reset state of Mach.
Hood