Hello Guest it is November 15, 2019, 02:33:40 AM

Author Topic: Adding UserLED to Change State from M10/M11  (Read 1636 times)

0 Members and 1 Guest are viewing this topic.

Adding UserLED to Change State from M10/M11
« on: March 04, 2014, 11:22:39 PM »
Hello,
I am having trouble getting a LED that I have Added to the MSM User Extense Page. What I am trying to accomplish is for the M10/M11 Call  will change the state of the LED
M10 LED ON M11 LED OFF so that I can Make a Brain to communicate with a plc that will operate a pneumatic solenoid.
Steps I have Taken

Created a UserLed (2000) added to MSM User Exts Page

Modified the   M10.m1s

Dim FrontCloser As Integer
FrontCloser=(2000)
 
 SetUserLED(Frontcloser,1)

Modified the   M11.m1s

Dim FrontCloser As Integer
FrontCloser=(2000)
 
 SetUserLED(Frontcloser,0)
 
Thank You for your valuable help.
Adam

Online Tweakie.CNC

*
  • *
  •  7,993 7,993
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Adding UserLED to Change State from M10/M11
« Reply #1 on: March 05, 2014, 04:09:00 AM »
Hi Adam,

I am not absolutely certain because Mach3 is always full of surprises but I don't think you will be able to use the M11/M10 in that way because they have been more or less designated for laser control.

If you use the command M11P1 this will switch ON Output#1 and the command M10P1 will switch OFF Output#1 but both these commands only take effect at the instant of an axis (any axis) movement (ie. they must be followed by an axis movement on the next line in the GCode. The numeral following the P will determine which Output# is switched).

Hope this helps.

Tweakie.
« Last Edit: March 05, 2014, 04:20:38 AM by Tweakie.CNC »
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.