Hello Guest it is March 28, 2024, 11:59:30 AM

Author Topic: Simple If Then Script Not workng, please help  (Read 2896 times)

0 Members and 1 Guest are viewing this topic.

Simple If Then Script Not workng, please help
« on: July 21, 2010, 06:46:54 PM »
I would just like the script to end if the condition is met and it is not stopping. I see the Torch Up LED (OEMLED 37) lit up in the diagnostics screen, yet the script just wont stop running. Please help.

Code "m7" 'mist on
Code "G4 P4" 'Wait 4 seconds
Code "M9" 'mist off
Code "M8" 'flood on
Code "G4 P4" 'wait for seconds
Code "M9" 'Flood Off
If GetOemLED(37)=1 then 'if torch up Led active end script
End
Else 'if not
Code "m7" 'mist on
Code "G4 P4" 'Wait 4 seconds
Code "M9" 'mist off
Code "M8" 'flood on
Code "G4 P4" 'wait for seconds
Code "M9" 'Flood Off


Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Simple If Then Script Not workng, please help
« Reply #1 on: July 21, 2010, 07:22:37 PM »
Try:

Code "m7" 'mist on
Code "G4 P4" 'Wait 4 seconds
Code "M9" 'mist off
Code "M8" 'flood on
Code "G4 P4" 'wait for seconds
Code "M9" 'Flood Off
If  not GetOemLED(37) then

Code "m7" 'mist on
Code "G4 P4" 'Wait 4 seconds
Code "M9" 'mist off
Code "M8" 'flood on
Code "G4 P4" 'wait for seconds
Code "M9" 'Flood Off

end if
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html