![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| CamSoft Products Discuss Camsoft PC based CNC controller products here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Help ! I have encountered a problem with my homing sequence for any of the 3 axes on my mill. The sequence searches for the home microswitch and then comes off that and searches for the index position on the encoder at which point it zeros the axis. Everything works fine the first time I home but if I home again CamSoft reports that it is already on the index position and sets the machine zero at the microswitch not at the index position !!. The result is that the machine is homed at a slightly different position the second or subsequent times. This has proved to be a disaster when I have homed the machine a second time while half way through a job ! I used the FINDINDEX command as indicated in the manual but it appears that once found, the index flag (for that axis) is latched, and can only be un-latched by shutting down CamSoft and starting up again. Is there an un-documented way of un-latching the index flag(s) ? Or is the problem with the motion control card and do I have to send it a command to un-latch the flag ? And why would you latch up the index, I can't see the logic of that ? If there is someone out there who has come across this before can you please help before I scrap another job ! Chris |
|
#2
| ||||
| ||||
| I'd suggest you try low level galil commands. if it solves the problem, you know it was a Camsoft issue. here's a clip out of the galil command reference. be sure and watch your CN command and right homing direction. After you get all axis set, its just COMMAND HM Karl HM FUNCTION: Home DESCRIPTION: The HM command performs a three-stage homing sequence for servo systems and two stage sequence for stepper motor operation. For servo motor operation: During first stage of the homing sequence, the motor moves at the user programmed speed until detecting a transition on the homing input for that axis. The direction for this first stage is determined by the initial state of the homing input. Once the homing input changes state, the motor decelerates to a stop. The state of the homing input can be configured using the CN command. At the second stage, the motor change directions and slowly approach the transition again. When the transition is detected, the motor is stopped instantaneously.. At the third stage, the motor slowly moves forward until it detects an index pulse from the encoder. It stops at this point and defines it as position 0. For stepper mode operation, the sequence consists of the first two stages. Last edited by Karl_T; 10-21-2010 at 11:42 AM. |
|
#3
| |||
| |||
| Thanks Karl for that suggestion. I was hoping that someone had actually come across this problem and had a known solution. I am not very familiar with using the native Galil commands but in the time I had access to the machine today I read the Galil manual and tried the AL command because it notes in the manual (Page103) that the index latch must be re-armed after a latching event. Thus in Macro.fil I have; COMMAND AL Z FINDINDEX 3;R There was no change - homing a second time causes the index to be found imediately after coming off the home microswitch, rather than moving to find the index. The question is; am I using the Galil command properly or is the CamSoft program masking the result by keeping a dummy variable latched after the FINDINDEX ?. When I get more time I will try the HM command but do I have to follow it with a BG ? The CamSoft manual does not explain how to use Galil commands that require a sequence be sent to the board. Chris |
|
#5
| ||||
| ||||
| Sounds like Del has come accross your issue... I have machines with both kinds of encoders and haven't seen it. (I don't use AL) When I bought my first camsoft machine in 2003 it had a Galil command homing macro. Its always worked so its never been changed. it uses a longer form of galil hoiming than the HM command. See below. I've never seen or used AL with homing and don't know why that would be needed. Is your home routine based on a .cbk from Camsoft? Karl [[HOMEALL]] IF#23=0THENEXIT t=0 GEAR 2;1:\20=0:BACKLASH MOTOR;;-30 WAITUNTIL STOP2 'IF\820>10THENCOMMAND SH:COMMAND CE,0:COMMAND MT,1 COMMAND SP25000 COMMAND CN,1 COMMAND FEX COMMAND BGX SLEEP .5 WAITUNTIL STOP1 MESSAGE FOUND ZHOME COMMAND SP1200 COMMAND CN,1 COMMAND FEX COMMAND BGX SLEEP .5 WAITUNTIL STOP1 MESSAGE OFF ZHOME COMMAND SP3500 COMMAND JG-400 COMMAND FIX COMMAND BGX SLEEP .5 WAITUNTIL STOP1 MESSAGE FOUND ZINDEX COMMAND SP,15000 COMMAND CN,-1 COMMAND FEY COMMAND BGY SLEEP .5 WAITUNTIL STOP2 MESSAGE FOUND HOMEX COMMAND SP,800 COMMAND CN,-1 COMMAND FEY COMMAND BGY SLEEP .5 WAITUNTIL STOP2 MESSAGE OFF HOMEX COMMAND SP,1500 COMMAND JG,100 COMMAND FIY COMMAND BGY SLEEP .5 WAITUNTIL STOP2 MESSAGE FOUND INDEXX \23=0:\24=0:t=o MACHZERO 0;0 |
| Sponsored Links |
|
#6
| ||||
| ||||
| The AL is a position capture command, I have never had to use this in a home command. Galil accept both single ended and differential encoders and both can use either the individual home commands FE (find edge) and FI (find index) or single combined HM (home) command. Unless there is a reason to use the individual commands, the HM is the simplest. The HM & FI also sets the axis position to zero. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#7
| |||
| |||
| Many thanks, Del, Karl and Al, I have had success. It was not the hardware as in Z complement and my trying to use the AL was a red herring. I tried part of Karl's code using the FI command and this works fine the first and subsequent times. I actually kept my own code for finding the microswitches. I can only surmise that the CamSoft FINDINDEX command only works once (for each axis) and a flag to say that the index has been found does not get reset. If you are reading this CamSoft, please investigate your FINDINDEX command and include a note in the manual to warn of potential position errors - I have scrapped several jobs because of this fault. Chris |
|
#8
| |||
| |||
| Everything checks out fine. Go ahead and call in if you need further help. Tech Support CamSoft Corp. support@camsoftcorp.com PH 951-674-8100 Fax 951-674-3110 PC Based CNC Control For The Machine Tool CNC Retrofit And CNC Controller OEM Market
__________________ (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#10
| |||
| |||
| Del, Thanks, good suggestion. Here it is for Z. X and Y are similar. This is a copy from my home computer and I am not sure why there are semicolons where there should be commas but when I go to the machine I will check. I can't paste a copy of the new code until I get access to the machine - probably in a few days. Please also note that this was written some 2 or 3 years ago and had presumed to be working all this time : [[Home Z]]' Home Z axis ' Called by M120 'IF\312=0THEN MESSAGE TC arm not safe:EXIT STOP:SOFTLIMITS OFF:JOG OFF FEEDRATE 1000' Z home feedrate IF#3=1THENGOTO :LOOPZ1' If already on switch, go down SUSPEND BYPASS:MACHGO ;;9999 WAITUNTIL #3=1:STOP' Test for switch on :LOOPZ1 MACHZERO ;;0 FEEDRATE 20' slow down to come off switch SUSPEND BYPASS:MACHGO ;;-50 WAITUNTIL #3=0' Test for switch off STOP:WAITUNTIL STOP MACHZERO ;;0 FINDINDEX 3;R' Find encoder index MACHZERO ;;0' Double zeroing here to see index FEEDRATE 500 MACHGO ;;\323' offset for TC position see STARTUP.FIL WAITUNTIL STOP MACHZERO ;;0 SOFTLIMITS ON EXIT' Note: flag set in M120 |
| Sponsored Links |
|
#11
| ||||
| ||||
| Del has a point. Its very unlikely that a programming problem exists with FINDINDEX. The Camsoft language has been around for 20 years now and none of the very experienced users have seen this issue. Karl P.S. its possible that your issue is mechanical. On one machine i did, luck of the draw had the edge of the home switch within a few encoder pulses of the index mark. The machine would stop on either side of the index mark coming off the home switch. Then FINDINDEX would go one full screw revolution and home would be off this much. My "fix" was to move a small amount after coming off the home switch on this axis to make sure FINDINDEX was always the same direction. watch your machine home, see how far it moves on findindex. Karl P.P.S. Just buy me a plane ticket. I'll fix this for free. I'd love to see NZ in the spring. Winter is setting in up here. My "real job" just finished for the year. Karl Last edited by Karl_T; 10-26-2010 at 04:00 AM. |
|
#12
| |||
| |||
| Thanks Karl for your prompt response as usual. Sorry, I can't buy you a ticket to NZ, but you should come for a holiday !. It is not my machine, I am just the poor sod that got the job. I keep getting called out to it to fix things which at installation appeared to be working fine. A few notes to my code - The \323 variable is used to position the Z axis to align with the tool changer. This is then the final home position. I don't see that this could produce the fault. - I have included my new code below. You will see that I have replaced the FINDINDEX command with a Galil sequence and that is all ! It now works. What does that say ? - I am a bit worried by your comment that using several MACHZERO's is asking for trouble. Why ? It was done originally so that I could see and take note of the axis position at each step. This sort of tells me that you are yourself not confident of the robustness of the CamSoft software ? - I note your point about the index mark being close to the switch change-over point. This is a well known problem and the only permanent remedy is to reposition the switch or encoder during commissioning - something that I have been well aware of and have done. I don't do software kludges for things with permanent hardware solutions. [[Home Z]]' Home Z axis ' Called by M120 'IF\312=0THEN MESSAGE TC arm not safe:EXIT STOP:SOFTLIMITS OFF:JOG OFF FEEDRATE 1000' Z home feedrate IF#3=1THENGOTO :LOOPZ1' If already on switch, go down SUSPEND BYPASS:MACHGO ;;9999 WAITUNTIL #3=1:STOP' Test for switch on :LOOPZ1 MACHZERO ;;0 FEEDRATE 100' slow down to come off switch SUSPEND BYPASS:MACHGO ;;-50 WAITUNTIL #3=0' Test for switch off STOP:WAITUNTIL STOP MACHZERO ;;0 ' Index routine 23 Oct 2010 COMMAND SP ,,100' Set speed for index find COMMAND JG ,,-100' Set dir and arbitary distance for index find COMMAND FI Z' Prepare to find index COMMAND BG Z' Initiate motion SLEEP 0.5 WAITUNTIL STOP3 MESSAGE Found Z Index MACHZERO ;;0' Double zeroing here to see index FEEDRATE 500 MACHGO ;;\323' offset for TC position see STARTUP.FIL WAITUNTIL STOP MACHZERO ;;0 SOFTLIMITS ON EXIT' Note: flag set in M120 Chris |
![]() |
| 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 |
| using encoder index for homing and a axes position | rokag3 | General Electronics Discussion | 22 | 10-16-2009 06:57 AM |
| Looking for cheap encoder with index channel | JasonCampbell | Servo Motors and Drives | 12 | 09-12-2007 09:31 PM |
| spindle index, encoder, home/limit switch | Wm McNett | General Electronics Discussion | 10 | 01-13-2006 06:39 AM |
| Optical encoder index - what is it good for? | medved | General Electronics Discussion | 8 | 10-03-2005 05:26 PM |
| How to tell if my motor is Pulse encoder or quadrature encoder? | Darc | Servo Motors and Drives | 0 | 07-22-2005 03:51 AM |