![]() | |
|
#1
| ||||
| ||||
I wrote this little procedure to home off limit switches for a Galil card. Use it if you need. Karl '****************** HOME OFF LIMIT SWITCH PROGRAM**** 'Karl Townsend, Dassel, MN, USA 'This program jogs to the limit switch on each axis, 'moves a small distance, then finds the index mark 'set beginning parameters 'the dist variables should be set for each machine 'so that it stops half turn from index mark #HOMEALL ; CN 1,1 ; JG 0,0,0,0,0 ; SH creep=500 ; slow=5000 ydist=3400 ; xdist=3000 ; zdist=2200 'Three routines below, one for each axis 'line1 starts jog to limit switch 'line2 loops until a switch is hit 'line3 stops 'line4 moves a relative distance from switch 'line5 finds the index mark 'Home the X axis off the minus switch JGX=-slow ; BGX #HMLOOPX ; WT100 ; JP#HMLOOPX,_LRX=1 JGX=0 ; AMX ; WT100 SPX=slow ; PR xdist,0,0 ; BGX ; AMX ; WT1000 JGX=creep ; FIX ; BGX ; AMX 'Home the Y axis off the forward switch JGY=slow ; BGY #HMLOOPY ; WT100 ; JP#HMLOOPY,_LFY=1 JGY=0 ; AMY ; WT100 SPY=slow ; PR 0,-ydist,0 ; BGY ; AMY ; WT1000 JG ,-creep ; FIY ; BGY ; AMY 'Home the Z axis off the top switch JGZ=slow ; BGZ #HMLOOPZ ; WT100 ; JP#HMLOOPZ,_LFZ=1 JGZ=0 ; AMZ ; WT100 SPZ=slow ; PR 0,0,-zdist ; BGZ ; AMZ ; WT1000 JGZ=-creep ; FIZ ; BGZ ; AMZ ; EN |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Homing and limit switch | shadowless | Taig Mills & Lathes | 14 | 09-18-2009 07:26 PM |
| what is the best homing and limit switch setup? | Bryscnc | Machines running Mach Software | 1 | 09-28-2006 05:37 AM |
| limit switch and home switch setup | Runner4404spd | General Electronics Discussion | 0 | 12-15-2005 07:58 AM |
| Limit Switch / Home Switch in Software | Sanghera | General Electronics Discussion | 6 | 11-01-2004 05:58 PM |