Hello Guest it is November 14, 2024, 11:31:04 PM

Author Topic: Spindle OFF and DoOemButton(110) problem  (Read 4955 times)

0 Members and 1 Guest are viewing this topic.

Spindle OFF and DoOemButton(110) problem
« 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
Re: Spindle OFF and DoOemButton(110) problem
« Reply #1 on: January 20, 2011, 09:32:44 AM »
If GetOemLed(11) Then
      Code "M5"
End If
 
This might work for you Giannis.
Try with caution, I'm guessing.
Russ

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Spindle OFF and DoOemButton(110) problem
« Reply #2 on: January 20, 2011, 09:38:59 AM »
Try having DoSpinStop() instead of the DoOemButton(110)

Hood

OOPs RC got there first, if his doesnt work try mine :)
Re: Spindle OFF and DoOemButton(110) problem
« Reply #3 on: January 20, 2011, 09:52:22 AM »
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

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Spindle OFF and DoOemButton(110) problem
« Reply #4 on: January 20, 2011, 10:01:01 AM »
Should be the same thing Russ, will have to check the list later.

Hood
Re: Spindle OFF and DoOemButton(110) problem
« Reply #5 on: January 20, 2011, 10:09:21 AM »
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
Re: Spindle OFF and DoOemButton(110) problem
« Reply #6 on: January 20, 2011, 10:15:23 AM »
ahh.....found it in Bretts list,
Thanks
Re: Spindle OFF and DoOemButton(110) problem
« Reply #7 on: January 20, 2011, 12:43:47 PM »
Thank you for the posts!
I will try and let you know soon.
Re: Spindle OFF and DoOemButton(110) problem (SOLVED)
« Reply #8 on: January 21, 2011, 03:31:21 AM »
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!