Thank you for the reply Poppabear.
I would HIGHLY recommend that you MERGE your M3 and SpindleSpeed macro into ONE single M3 (and repeat it in a M4 if you use that as well), macro, I think they are not synching up correclty as seperate..........
Also, Set you Pulley by talking to the Pulley DRO directly, don't do it over the setpulley() call.
See Wiki under OEM DROs for the Pulley number OEM number.
I tried running the whole thing in the M3 macro but couldn't get it to change the pulleys.
I tried this and could never get it to work right.
M3 Macro:
Spin = GetRPM()
If Spin < 911 Then
SetOemDRO(56,1)
Call LowGear
End If
If Spin > 910 Then
SetOemDRO(56,2)
Call HighGear
End If
Sub LowGear
ActivateSignal(OUTPUT8)'Low Gear (OUTPUT)
Sleep (50)
Do Until IsActive(OEMTRIG2)'Low Gear Switch (INPUT)
Loop
If IsActive(OEMTRIG2) Then
Call SpinSpindle
End If
End Sub
Sub HighGear
ActivateSignal(OUTPUT7)'High Gear (OUTPUT)
Sleep (50)
Do Until IsActive(OEMTRIG1)'High Gear Switch (INPUT)
Loop
If IsActive(OEMTRIG1) Then
Call SpinSpindle
End If
End Sub
Sub SpinSpindle
DoSpinCW()
End Sub
Exit SubThere are a few variations to the above that I have tried but none could change the pulley#, as soon as I put the change pulley code in the SpindleSpeed it worked.
This is my original thread, it has everything I have tried, well almost everything.
http://www.machsupport.com/forum/index.php/topic,17654.0.htmlThese macros run great, I just think I need to clear a var. that is storing the last RPM from the spindle.
I can try the Brain suggestion, but I need to read up on how to do it.
Thanks again,
Aero