14240
« on: October 27, 2010, 02:36:20 PM »
Possibly a macropump with something like this in it would work
If GetOemDRO (29)<0 Or GetOemDRO(29)>100 Then
DoOemButton(1001)
End If
You may have issues though when homing so may have to have it look at a user LED before it will act, your user LED would have to be operated via the RefAll buttons, you would need to add VB in it to switch the LED off, let it home, zero the X encoder DRO then switch it back on, maybe something like this
SetUserLED(1111,0)
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )
SetOemDRO(29,0)
SetUserLED(1111,1)
If it was needed then the macropump code would need to be something like
If GetUserLED(1111) And (GetOemDRO (29)<0 Or GetOemDRO(29)>100 )Then
DoOemButton(1001)
End If
Obviously you would need to add the other axis into the VB and alter the values for the < and > to suit.
Hood