![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I'm just now putting the electronics on my DIY 3 axis router (first system, so I've got a lot to learn). Using a G540 with Keling 370 oz motors and EMC2. But I'm confused about the limit switches. The 540 only has 4 inputs, and I have 5 limit switches (1 on z, 2 on y and 2 on x). I've seen suggestions to use one input for two switches, which is simple enough to wire up. But my question is......doesn't the system need to know which switch it has hit? Let's say I wire the X min limit and the Y min limit together, how does the system know which limit switch was hit. Or am I way off base and the system doesn't care? I'm using my limit switches to also serve as home switches , so I assume those three should be on separate inputs. So that leaves me one input for my other two limit switches. I'm still a newbie according to my post count, but I've been reading and trying to learn from this forum for a couple of months. Lot of good info to be found here. |
|
#2
| ||||
| ||||
| JeLC, I personally don't use EMC, but I think it would be the same in principle as mine. I have a similar situation with the number of switches except I only have one switch on the X axis that will trip in EITHER direction (so you might say it is two switches in you case). My switches are wire NC (normally closed) and in series for the axis's with multiple switches. You want the limit circuit to be NC for safety reasons. The main one being that if you have a wire failure, the machine will stop as it will detect a limit trip. If you wire NO (Normal Open), you will not know about a wire failure until you crash something! Ok, that takes care of the Limit switch problem. Now for using them as home switches. You only have to be careful in this situation that an axis switch is NOT tripped in the wrong position. To explain, if you normally home to the X - position and if the X + switch is tripped, the table will move in the wrong direction! Otherwise, things operate normally. So far in my setup, I have not had this situation occur. To answer your question on if two axis trip at the same time, the controller doesn't care and usually a visual check of the spindle location will tell which axis is tripped. The only time I have had a problem with this is on occasion I would get a "false" trip for some unknown reason. I think this may be due to noise on the system or a possible "feature" in my control program. Hope this helps.
__________________ Art AKA Country Bubba (Older Than Dirt) |
|
#3
| |||
| |||
| The limit/home switches need to be connected to EMC. Does the gecko drive need to have limit switches connected to work? By connecting multiple limit switches together makes it so EMC can't know what axis/direction tripped - which means it would be up to you to figure it out. Individual switches makes it more obvious whats wrong. For homing with shared switches EMC gets around this by homing one axis at a time and assuming that any tripped switch is the right switch. On basic machines the limit/home switches are wired through the parallel port. |
|
#4
| ||||
| ||||
| Gecko's don't have anything to connect to home or limit switches. They will work without them if everything else is properly wired and setup. I can usually tell at a quick glance which axis is tripped!
__________________ Art AKA Country Bubba (Older Than Dirt) |
|
#5
| ||||
| ||||
Combine the two on X to one pin, combine the 2 on Y to another pin and then connect the z to another pin. EMC knows which direction it is traveling when homing so it will use the appropriate switch as home. When acting as limits, it is more important to know which axis has hit a limit than which end of 1 of 2 axii. Alan
__________________ http://www.alansmachineworks.com |
| Sponsored Links |
|
#6
| ||||
| ||||
| In response to your pm, I am posting my config files. You can look at them and see if there is anything that is helpful. I have a 9" Z axis travel, but I set my limits to be roughly -9 and +9. Part of the secret is getting the homing correct. I home to the top of the Z and then I set G54 based on the homed values then I use G55 offsets for my "cutting home". So I set Z=0 to be the top surface of whatever I am cutting, X=0 and Y=0 are offset to the "home corner" of the piece that I am working on. I use the following code to start virtually every file I create: For me X is usually offset 1.000" and Y is offset 0.800". #<_mat_depth>=0.500 ( Thickness of Material ) #<_xorigin>=1.000 ( X axis offset for Coordinate sys 2 ) #<_yorigin>=0.800 ( Y axis offset for Coordinate sys 2 ) #<_zorigin>=[#<_mat_depth>-8.410] ( Z axis offset for Coordinate sys 2 This calculation is based on setting up my tool to zero at this position ) (other variables and subroutines) G20 G92.1 G61 G17 G40 G80 ( Set Imp. mode, clear offsets, set exact path, set XY plane, turn off tool radius compensation ) G90 ( Set absolute mode for motion ) G64 P.002 ( Set limit for segmemt combining ) (G43 Z1.000 H[#<_toolnum>]) ( Set tool length offset ) G10 L2 P1 X0.0 Y0.0 Z0.0 ( Set G54 origin to 0.0 ) G10 L2 P2 X#<_xorigin> Y#<_yorigin> Z#<_zorigin> ( Set G55 work origin ) G55 ( Set Coordinate system 2 ) Alan
__________________ http://www.alansmachineworks.com Last edited by acondit; 03-15-2009 at 04:54 PM. |
|
#7
| |||
| |||
| Just to answer your question from the PM, the sample program was only giving me an error for the z axis when I tried to run it. I looked over your configs and noticed you were using negative and positive travel limits. Which I assume would cause you to home in the center of X and Y travel. And I wasn't doing that for any of the axis. I was trying to set everything up starting from 0 and going up, except for my z. I was trying to get home set up at the extreme left corner of my machine, with the z moved up as high as possible. And I may not exactly understand what home is yet. Since I'm going to have to change bits manually, it made sense to home it in a corner with the z as high as possible But, I finally got the sample 'emc2 axis' program to work with my stepconf. My table is approximately 40" (x) by 32" (y) by 6" (z). So in the config, I split those number using -20 and 20 for x, -16 and 16 for y, and then -2 and 4 for z. Homing to 0 for all axis. It seems to like those numbers, or I'll say it will at least run the sample "emc2-axis' code now. Looking at your ini and hal helped a lot. I'm sure I'll refer to them many more times before this thing is up and running correctly. I'll get there, just going to take a while. Thanks for your assistance. |
|
#8
| ||||
| ||||
| Welcome to EMC2. I two switches connected for each axis, so I have three imputs. I use them for homing too. When you have your homing and limits done you should modify HAL to use a usb joystick (like an xbox controller type) as a jogger. I find it invaluable. I also learned a lot about HAL while setting it up. There is a tutorial on the emc2 website. Colin |
|
#9
| ||||
| ||||
Alan
__________________ http://www.alansmachineworks.com |
|
#10
| ||||
| ||||
I set up a USB joystick on my lathe. I don't use it much but it was fun playing with it. I am attaching a "custom.hal" that has a working config for a Logitech Attack3 joystick. A couple of the values are shifted around so that the joystick work for X and Z on the lathe rather than X and Y, but that is an easy fix to change back for a router. It also has the hookup for my spindle encoder plus stuff that is commented out that I was working on for a charge pump. If anyone finds it useful, great. Alan
__________________ http://www.alansmachineworks.com |
| Sponsored Links |
|
#11
| ||||
| ||||
I drill PCBs with small vias, so it's handy.That reminds me, I've found a strange behavior in EMC2 where sometimes I let go of the jog key and it keeps going for another second. Which could be beyond my limits! 8| Once this happens, it stays like this. It's like having sticky keys. I have to restart EMC2 to get the keys to be responsive again. I've done the RT tests and I am well above my RT limits. Also, the machine still cuts properly and my joystick never does it. Have you had it happen? |
|
#12
| ||||
| ||||
Alan
__________________ http://www.alansmachineworks.com |
![]() |
| 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 |
| limit switch- home switch | normd | CamSoft Products | 1 | 05-16-2008 06:56 PM |
| limit switch and home switch setup | Runner4404spd | General Electronics Discussion | 0 | 12-15-2005 07:58 AM |
| Is it possible to use the home switch as the limit switch as well? | Darc | Mach Software (ArtSoft software) | 2 | 10-23-2005 12:50 AM |
| Limit Switch / Home Switch in Software | Sanghera | General Electronics Discussion | 6 | 11-01-2004 05:58 PM |