Hello Guest it is April 25, 2024, 06:15:29 PM

Author Topic: Spindle Macro Question  (Read 2605 times)

0 Members and 1 Guest are viewing this topic.

Spindle Macro Question
« on: February 24, 2010, 02:49:06 PM »
Hi,
I have a spindle controller that gives out a 'reached speed' signal.
I'd like help writing scripting to use this signal.

I figured out what I need to do....

start spindle
wait for pin 15 to go high (Input 1)
continue with prgm (G code)
monitor pin 15 until end of prgm, when low(spindle controller error), stop prgm execution

prgm ends with....
m9
m5
m30

Can I use SystemWaitFor ()

If the monitoring thing is a problem, I won't use it. (just to maybe save a tool)

I've been reading and jumbling some codes for days now and just don't know enough to put it together right.
Any help would be great.

Offline arbus

*
  •  13 13
    • View Profile
    • car keys
Re: Spindle Macro Question
« Reply #1 on: April 01, 2010, 06:54:09 PM »
Maybe use an Led to control it?

Use OEM code 821 -824  (Input 1 - 4 active LED)

eg. Set the pin as input 1
When input 1 is active LED 1 is On.

Trig = GetOEMLED(821)
While Trig <> 1
Wend


If you wanted to monitor it during a gcode operation maybe use BRAINS.  Set up Brains to monitor the LED.

AR