Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: attila0216 on September 10, 2019, 05:36:13 AM

Title: What is wrong with this Code?
Post by: attila0216 on September 10, 2019, 05:36:13 AM
So i have created a button in screen4 designer, for my plasma cutter if i press feedhold machine stops and torch off(brain turns off torch). Now this button suppose to watch Pause LED state and if OEMled 805 active , should start M3 code and cycle start. It does start if i press, but, unfortunatelly starts even if 805 led not active. So what am i doing wrong ?

GetOemLed 805 = 1
DoSpinCW
DoOEMbutton (1000)
 
Title: Re: What is wrong with this Code?
Post by: TPS on September 10, 2019, 12:13:56 PM
Code: [Select]
If GetOemLed(805) = True Then
  DoSpinCW()
  DoOEMbutton (1000)
End If
Title: Re: What is wrong with this Code?
Post by: attila0216 on September 10, 2019, 12:52:26 PM
Thank you! I'LL GIVE A TRY TONIGHT AFTER WORK!  I'll let you know if it worked or not.
Title: Re: What is wrong with this Code?
Post by: attila0216 on September 10, 2019, 05:17:15 PM
Ok. So i have tried you Code. Unfortunatelly Mach starts to run even if not in Pause state. So ignores 805 led state. I don't know why
Title: Re: What is wrong with this Code?
Post by: attila0216 on September 10, 2019, 05:45:08 PM
Ignore previous Post of mine. My mistake. Used wrong M code under button :) Works great! Big thank you!