Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: stevekun 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.
-
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