Hello Guest it is March 28, 2024, 12:17:19 PM

Author Topic: M/G code to enable outputs  (Read 2061 times)

0 Members and 1 Guest are viewing this topic.

M/G code to enable outputs
« 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?

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: M/G code to enable outputs
« Reply #1 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