Hello Guest it is December 13, 2019, 03:31:29 AM

Author Topic: What is wrong with this Code?  (Read 309 times)

0 Members and 1 Guest are viewing this topic.

What is wrong with this Code?
« 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)
 

Offline TPS

*
  •  1,411 1,411
    • View Profile
Re: What is wrong with this Code?
« Reply #1 on: September 10, 2019, 12:13:56 PM »
Code: [Select]
If GetOemLed(805) = True Then
  DoSpinCW()
  DoOEMbutton (1000)
End If
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: What is wrong with this Code?
« Reply #2 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.
Re: What is wrong with this Code?
« Reply #3 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
Re: What is wrong with this Code?
« Reply #4 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!