Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: giannis121 on January 20, 2011, 08:50:51 AM
-
I face a problem with spindle speed as following:
I have made a macro "M900" in the middle of a program, which includes:
If GetOemLed(164) then
DoOemButton(110)
End If
which means, if the CW rotation LED is active, switch off spindle.
The spindle is switched OFF, but the Oem 164 LED is still ON.
It goes OFF only at the end of the program when "Turn OFF spindle" under "General config" is selected.
My problem is that i want to start and stop it during the program flow,
by reading the 164 Oem LED.
Exaclty the same happens if i read the OemLed(11) instead of (164).
Do you have any ideas?
Thanks,
giannis
-
If GetOemLed(11) Then
Code "M5"
End If
This might work for you Giannis.
Try with caution, I'm guessing.
Russ
-
Try having DoSpinStop() instead of the DoOemButton(110)
Hood
OOPs RC got there first, if his doesnt work try mine :)
-
I notice (screen4) that 110 is a OEM Code Funtion under the spindle toggle button, not an OEM Button.
110 in the button list is "Spindle CW, reset THC height".
Would both do the same thing ?
How would you (can you) call a Function code in the script ?
Thanks Hood
-
Should be the same thing Russ, will have to check the list later.
Hood
-
Could also use LED 852, provided CW is set up to use Output 1.
I dont see GetOemLed(164) anywhere.
Where did it come from ?
Russ
-
ahh.....found it in Bretts list,
Thanks
-
Thank you for the posts!
I will try and let you know soon.
-
OK finally M5 and DoSpinStop() work,
but only if they are in a seperate command.
Does not work if i call M5 from other macro (code "M5").
But anyway, i do what i want now,
thank you for the posts!