11
General Mach Discussion / Please take a look at my simple macro - is it correct?
« on: April 18, 2010, 05:01:20 PM »
They are the same marco, except the first uses the GetOEMLED which is mapped from input 1 and second looks directly at the input1 instead of the LED. Not sure if it makes a difference.
I just want to make sure that they are correct.
VacuumSwitch=GetOEMLED(24)
Code M8 (mist on)
Code G4 P1 (wait for 1 second)
Code M8 (flood on)
Code G4 P1 (wait for 1 second)
If VacuumSwitch=1 Then (if led 24 "trch on" is active then end macro)
Endif
Else (if not)
Code M8 (mist on)
Code G4 P1 (wait for 1 second)
Code M7 (flood on)
Code G4 P1 (wait for 1 second)
Endif (end macro)
Second option:
Code M8 (mist on)
Code G4 P1 (wait for 1 second)
Code M8 (flood on)
Code G4 P1 (wait for 1 second)
If IsActive(Input1) Then (if input1 is active then end macro)
Endif
Else (if not)
Code M8 (mist on)
Code G4 P1 (wait for 1 second)
Code M7 (flood on)
Code G4 P1 (wait for 1 second)
Endif (end macro)
Thank you!
I just want to make sure that they are correct.
VacuumSwitch=GetOEMLED(24)
Code M8 (mist on)
Code G4 P1 (wait for 1 second)
Code M8 (flood on)
Code G4 P1 (wait for 1 second)
If VacuumSwitch=1 Then (if led 24 "trch on" is active then end macro)
Endif
Else (if not)
Code M8 (mist on)
Code G4 P1 (wait for 1 second)
Code M7 (flood on)
Code G4 P1 (wait for 1 second)
Endif (end macro)
Second option:
Code M8 (mist on)
Code G4 P1 (wait for 1 second)
Code M8 (flood on)
Code G4 P1 (wait for 1 second)
If IsActive(Input1) Then (if input1 is active then end macro)
Endif
Else (if not)
Code M8 (mist on)
Code G4 P1 (wait for 1 second)
Code M7 (flood on)
Code G4 P1 (wait for 1 second)
Endif (end macro)
Thank you!