Thanks Wolfram, on my screen set I have 15 buttons and an LED for each button/program, how do I set each LED to run for one individual program only?
Does that mean I need to have 15 different M codes?
Also do I just save each M code as follows: M100.m1s, M101.m1s, M102.m1s, M103.m1s, M104.m1s, etc etc?
Sorry one more thing, with this code you wrote.
SetUserLED (nnnn, 1) ' Led on
(How do I link this to a particular LED?)
Also on another topic, I've searched the forums and looked in Mach3 but I can't seem to work out how to get a DRO and a button that runs a program to interact.
I think I'm close, I want to have a DRO that you can put a measurement into and when you press a button it will use this measurement in the program, this is what I have.
Create a DRO, I assigned it to DIAMETER OF CURRENT TOOL (which I think is OEM code 105), should I select DIAMETER OF CURRENT TOOL from the drop down or should I enter the OEM code 105?
Create a button and assign VB code to it as follows:
Material = GetOEMDRO (105)
CODE "#1=Material" ;In theory if 20 is entered into the DRO, Material should =20
CODE "G90 G55 G21
CODE "G00 Y[#1*2] ;Rapid to Y40
CODE "G01 Y#1 F100 ;Linear travel to Y20
CODE "G00 Y[#1*2] ;Rapid back to Y40
CODE "M30"
What am I doing wrong?