![]() |
#31
|
|||
|
|||
Yeah, there's some not super helpful info around, like http://wiki.linuxcnc.org/cgi-bin/wik...d_Limit_Switch but first you need to be comfortable with editing the config files.
I'm not near my MM at the moment to pull the files, but for me, the standard MM limit sensors are configured for homing, as is a Z zero plate. My process after firing up the machine, using keyboard shortcuts is: "X" - "Home" - "Y" - "Home" which starts the machine zeroing off the switches on both axis. That's done once to set the machine zero. Then for each workpiece: Jog to the 0,0 reference point on the work, and bring the tool about an inch above. Place the zeroing plate on top of the piece. "X" - "End" - "0" - "Enter" "Y" - "End" - "0" - "Enter" "Z" - "Home" - "End" "0" "." "2" "5" "Enter" - Since the zero plate is 1/4" thick. If you're getting a persistent alarm, I would expect that either the machine zero is not set, or the machine limits are too small. Have you homed each axis before you start? |
#32
|
|||
|
|||
Thanks Brad.
I had to give up after 2 days. Went back to Mach to get a couple of jobs done. Will try again later today. I cannot get it to reference, persistent 'exceed soft limits' alarm. It also locked up, would not jog. I knew it would not be an easy job to get it to work but I didn't think it would be this hard. I suppose a Degree in computer programming would help. Pages of documentation but no idiots guide. Oh well, on with the war. |
#33
|
|||
|
|||
It works
![]() References. Reversed Scale, Home velocity and Switch polarity. G30.1 set. A big relief. Brad, can you please explain what I should type please. "X" - "End" - "0" - "Enter" "Y" - "End" - "0" - "Enter" "Z" - "Home" - "End" "0" "." "2" "5" "Enter" Is it exactly as you have typed on 3 separate lines? Last edited by lonestaral; Wed 11 October 2017 at 01:09.. Reason: separate lines |
#34
|
|||
|
|||
Brad, another question.
I have a laser crosshair I use with Mach to set the G54. If I jog the cross over the 0,0 position can I type in the X and Y offset values in the lines of code you supplied and would that set the work zero position ? I hope this helps others in the future. Thanks for your time. Last edited by lonestaral; Wed 11 October 2017 at 01:21.. Reason: Thanks added |
#35
|
|||
|
|||
Yes, "X" means the X key on the keyboard - same for all the others. And yes, if you have the cross hair over your 0,0 then "X" "End" <offset> "Enter" and "Y" "End" <offset> "Enter" sets up your work zero position.
Glad you are making progress |
#36
|
|||
|
|||
Thanks again Brad.
I ran a program today. No problem until the end. There was a ' Finished with no percent' error. The % was there though, no big deal. Now the big problem came when I tried to run op2. I touched off in Z, save the offset. 'Exceed limit' error. I could not do an MDI input as it was not referenced. Z referenced ok but the x went the wrong direction. Turned it off and back on, same result. The only way out was to turn off, change the sign of home speed and turn back on again. Then I had to do this. 3. So if you're lost, what should you do Having trouble getting 0,0,0 where you want it for your gcode Start by getting rid of all the sources of offsets Move to the machine origin. MDI G53 G0 X0Y0Z0 (A0B0C0) Clear the G92 coordinate offset. MDI G92.1 Use the G54 coordinate system. MDI G54 Set the G54 coordinate system to be identical to the machine coordinate system. MDI G10 L2 P1 X0Y0Z0 (A0B0C0) Turn off tool offsets. MDI G49 Turn on Relative coordinate display from the menu now, you should be at machine origin (0,0,0), and the relative coordinate system should be the same as the machine coordinate system. You can now set your origin on the material. I then could set another tool. The same thing happened for op3. A bit sick to say the least. What am I missing ? ![]() |
#37
|
|||
|
|||
Start of program.
% G21 G40 G49 G64 P0.03 M6 T1 G17 M7 G0Z25.000 G0X0.000Y0.000S8000M3 End. G0Z5.000 G0Z25.000 G0X0.000Y0.000 M2 % OK or is there something missing ? |
#38
|
|||
|
|||
Hmm. I haven't seen that. For the "no percent", try making sure there is a blank line at the end of the file, after the percent. If there is no line ending, it may not be seeing the percent there.
The start and end of program look just fine. I assume that you ended up back at the home position after the first job. A couple of things that might trip you up: When you are setting up the offsets ( with the "END" key ), what you are entering is where the tool is currently with respect to where you want it to be in the coordinate system. So if you have two jobs next to each other, 400mm apart on the X axis, and you setup the one closest to machine origin, run it, return to 0,0 and then use "X" "END" to adjust for the second job, you will enter -400 since the tool is currently at that position in the new coordinate system you are setting up. If you enter 400, and you are within 400 of the machine limits, you would see an error. That's one possibility for confusion. Also, from that same manual page: 5. Other reasons for nonzero coordinates at start If you specified [TRAJ]POSITION_FILE, the contents of that file are read at startup and define initial axis positions. To forget these values once, exit LinuxCNC and remove the file. To never store these values, remove the POSITION_FILE line from your inifile. I suspect you do have this file configured, which is why power cycling doesn't solve your problem - it's saving and rereading the current settings. |
#39
|
|||
|
|||
I deleted the Traj file in the .ini file.
When I started the control it threw up an error and would not start. I loaded the backup .ini then it started. There is no 'Position' line in the Traj section to delete. Last edited by lonestaral; Thu 12 October 2017 at 19:50.. |
#40
|
|||
|
|||
I must admit that I am totally lost, confused and sick with the toolsetting.
Same procedure as yesterday. Op1 ok, looks as if putting in a blank line at the end worked. Op 2 set the tool. Run, exceed limit error, run anyway. Program runs then cuts out halfway through, exceed limit error Clear all using the procedure from that manual page. Reset g54, reset tool, run, exceed limit error. Attached picture of the screen. All looks ok and the machine is in the correct position. Must be Friday the 13th part 365 again. Last edited by lonestaral; Thu 12 October 2017 at 22:28.. Reason: 13th added |
#41
|
|||
|
|||
So, what are your machine limits? Which limit was exceeded? Z? I'm guessing that because of the red box at the lower limit of the Z axis on the display, and because you were apparently happy with how it was running until halfway through, and because you say the machine is in the correct position.
If it was Z, then we need to figure out why you aren't getting the right touchoff settings on your second piece. Is your gcode indexed to the top or bottom of your piece? Here's how I would approach it. Let's assume a 50mm high workpiece, an overcut into the spoil board of 1mm, and jogging clearance of 10mm above the piece. If it's indexed to the top of the piece, then the touchoff is at 0mm, top of piece at 0mm, jogs at 10mm, the bottom of the piece is at -50mm, overcut is at -51mm, and the Z limits need to be at least -51mm to +10mm. If it's indexed to the bottom of the piece, then the touchoff on the spoilboard next to the piece is at 0mm, or the touchoff to the top of the piece is at +50mm. Top of piece at 50mm, Jogs at 60mm, bottom at 0mm, overcut at -1mm, Z limits must be at least -1mm to +60mm. Of course, if it's not Z yelling at you, ignore all of that. Sorry if I confused yesterday on the Traj file; I was just trying to explain why it did not reset on reboot. |
#42
|
|||
|
|||
Hello Brad.
Limits are X 1200mm, Y 700mm and Z 150mm. All set as minus in the .ini file. It was the X axis that alarmed. I can run the first tool, the problem occurs when the second tool is set and run. Ok, its 8a.m. I turn on the computer, load the control, power up the control box and press the orange button, motors engage. Reference all home. Jog the tool to job datum in X and Y. Press touch off X and Y(G54 now set) Jog the tool in Z until it touches the job, press touch off Z. Jog up in Z, load the Op1 program and run. Program complete. Change tool. Jog the tool in Z until it touches the job, press touch off Z. Jog up in Z, load the Op2 program and run. Alarm message, 'exceed limit in z , run anyway?' I say yes and carry on. Program runs for a while then alarms, 'next line will exceed limit' Program stopped. Jog up in Z. Press Ref all home. Z moves up ok. X moves in the wrong direction. Press e stop, press power on. Try to do a MDI but alarm, 'Cannot Mdi when not referenced' Change X jog speed sign in .ini. Ref all home. If I then go through the whole procedure again to run op2, ALARM. 'Exceed limit in X' Are my steps to set the G54 and the tools correct? If not feel free to call me an idiot and please explain the error of my ways. |
#43
|
|||
|
|||
Okay, that's all really weird. Can you post or PM me your .ini file so I can go through it?
|
#44
|
|||
|
|||
.hal file.
Thanks for your time. # Generated by stepconf 1.1 at Tue Oct 10 12:00:00 2017 # If you make changes to this file, they will be # overwritten when you run stepconf again loadrt trivkins loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES loadrt hal_parport cfg="0 out" setp parport.0.reset-time 5000 loadrt stepgen step_type=0,0,0 addf parport.0.read base-thread addf stepgen.make-pulses base-thread addf parport.0.write base-thread addf parport.0.reset base-thread addf stepgen.capture-position servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf stepgen.update-freq servo-thread net spindle-cmd-rpm <= motion.spindle-speed-out net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs net spindle-cmd-rps <= motion.spindle-speed-out-rps net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs net spindle-at-speed => motion.spindle-at-speed net spindle-on <= motion.spindle-on net probe-in => motion.probe-input net xdir => parport.0.pin-01-out net spindle-on => parport.0.pin-02-out net zstep => parport.0.pin-03-out setp parport.0.pin-03-out-reset 1 net xenable => parport.0.pin-04-out net xenable => parport.0.pin-05-out net zdir => parport.0.pin-06-out net ydir => parport.0.pin-07-out net ystep => parport.0.pin-14-out setp parport.0.pin-14-out-reset 1 net xstep => parport.0.pin-16-out setp parport.0.pin-16-out-reset 1 net xenable => parport.0.pin-17-out net home-x <= parport.0.pin-10-in-not net home-y <= parport.0.pin-11-in-not net home-z <= parport.0.pin-12-in-not net estop-ext <= parport.0.pin-13-in-not net probe-in <= parport.0.pin-15-in setp stepgen.0.position-scale [AXIS_0]SCALE setp stepgen.0.steplen 1 setp stepgen.0.stepspace 0 setp stepgen.0.dirhold 50000 setp stepgen.0.dirsetup 50000 setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb net xstep <= stepgen.0.step net xdir <= stepgen.0.dir net xenable axis.0.amp-enable-out => stepgen.0.enable net home-x => axis.0.home-sw-in setp stepgen.1.position-scale [AXIS_1]SCALE setp stepgen.1.steplen 1 setp stepgen.1.stepspace 0 setp stepgen.1.dirhold 50000 setp stepgen.1.dirsetup 50000 setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb net ystep <= stepgen.1.step net ydir <= stepgen.1.dir net yenable axis.1.amp-enable-out => stepgen.1.enable net home-y => axis.1.home-sw-in setp stepgen.2.position-scale [AXIS_2]SCALE setp stepgen.2.steplen 1 setp stepgen.2.stepspace 0 setp stepgen.2.dirhold 50000 setp stepgen.2.dirsetup 50000 setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb net zstep <= stepgen.2.step net zdir <= stepgen.2.dir net zenable axis.2.amp-enable-out => stepgen.2.enable net home-z => axis.2.home-sw-in net estop-out <= iocontrol.0.user-enable-out net estop-ext => iocontrol.0.emc-enable-in loadusr -W hal_manualtoolchange net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared Last edited by lonestaral; Sat 14 October 2017 at 17:58.. |
#45
|
|||
|
|||
.ini file
# Generated by stepconf 1.1 at Mon Oct 9 12:38:21 2017 # If you make changes to this file, they will be # overwritten when you run stepconf again [EMC] MACHINE = my-mill DEBUG = 0 [DISPLAY] DISPLAY = axis EDITOR = gedit POSITION_OFFSET = RELATIVE POSITION_FEEDBACK = ACTUAL ARCDIVISION = 64 GRIDS = 10mm 20mm 50mm 100mm MAX_FEED_OVERRIDE = 1.2 MIN_SPINDLE_OVERRIDE = 0.5 MAX_SPINDLE_OVERRIDE = 1.2 DEFAULT_LINEAR_VELOCITY = 10.00 MIN_LINEAR_VELOCITY = 0 MAX_LINEAR_VELOCITY = 100.00 INTRO_GRAPHIC = linuxcnc.gif INTRO_TIME = 5 PROGRAM_PREFIX = /home/alan/linuxcnc/nc_files INCREMENTS = 5mm 1mm .5mm .1mm .05mm [FILTER] PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image PROGRAM_EXTENSION = .py Python Script png = image-to-gcode gif = image-to-gcode jpg = image-to-gcode py = python [TASK] TASK = milltask CYCLE_TIME = 0.010 [RS274NGC] PARAMETER_FILE = linuxcnc.var [EMCMOT] EMCMOT = motmod COMM_TIMEOUT = 1.0 COMM_WAIT = 0.010 BASE_PERIOD = 100000 SERVO_PERIOD = 1000000 [HAL] HALFILE = my-mill.hal HALFILE = custom.hal POSTGUI_HALFILE = custom_postgui.hal [TRAJ] AXES = 3 COORDINATES = X Y Z LINEAR_UNITS = mm ANGULAR_UNITS = degree CYCLE_TIME = 0.010 DEFAULT_VELOCITY = 10.00 MAX_VELOCITY = 100.00 [EMCIO] EMCIO = io CYCLE_TIME = 0.100 TOOL_TABLE = tool.tbl [AXIS_0] TYPE = LINEAR HOME = -0.25 MAX_VELOCITY = 100.0 MAX_ACCELERATION = 250.0 STEPGEN_MAXACCEL = 312.5 SCALE = 22.143 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -1200. MAX_LIMIT = 0.0 HOME_OFFSET = -0.25 HOME_SEARCH_VEL = -10. HOME_LATCH_VEL = 1.00000 HOME_SEQUENCE = 1 [AXIS_1] TYPE = LINEAR HOME = -0.25 MAX_VELOCITY = 100.0 MAX_ACCELERATION = 250.0 STEPGEN_MAXACCEL = 312.5 SCALE = -22.143 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -700. MAX_LIMIT = 0.0 HOME_OFFSET = -0.25 HOME_SEARCH_VEL = -10.0 HOME_LATCH_VEL = 1.00000 HOME_SEQUENCE = 2 [AXIS_2] TYPE = LINEAR HOME = -0.25 MAX_VELOCITY = 41.666 MAX_ACCELERATION = 150.0 STEPGEN_MAXACCEL = 187.5 SCALE = -22.143 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -120.0 MAX_LIMIT = 0.00 HOME_OFFSET = -0.25 HOME_SEARCH_VEL = -10.0 HOME_LATCH_VEL = 1.0000 HOME_SEQUENCE = 0 |
#46
|
|||
|
|||
Hmm. I'm fairly suspicious of those negative axis limits confusing things. I would have expected MIN_LIMIT = 0, MAXLIMIT = (1200, 700, 120), HOME_OFFSET = (1199.75, 699.75, 119.75)
|
#47
|
|||
|
|||
I will change them and give it a try.
Wonder what that will do to the other settings. Thanks. |
#48
|
|||
|
|||
Sorry Brad but that didn't work.
The axis overshot the switch and hit the hard stop. Not to worry. The good news is that I got it to work ![]() I had a thought in the small hours. Was it hanging on to an offset ? So I put a G49 at the end of the program. G0Z5.000 G0Z25.000 G49 G0X0.000Y0.000 M2 % (Blank space after %) Now it works. I think the reason it was referencing in the wrong direction was the switch was sticking. Must change it and see. Thank you for your time and effort. I might make a PDF about this and post it on here. It might help someone in the future. ![]() |
#49
|
|||
|
|||
Hey, glad you got it sorted!
|
#50
|
|||
|
|||
Well the final piece of this particular jigsaw
clicked into place today. I got the touch plate to work. So now I have the functions I had with Mach. Its been a struggle though. The reason why I changed? Earlier on this year I thought the control board was faulty, so I replaced it. A few weeks ago I was having a similar problem, one axis was not moving. Tried a new motherboard, same result. The same thing happened on 3 different computers. Also the driver would not load on 2 computers. I proved it was not the control board by swapping motor wires. Same with the parallel cable. Must be something with the software. I got round it for a while by using the A axis for the X. I still have the driver board, maybe it was ok after all. I had a look for alternative software. Mach 4 does mot use the parallel port so a separate driver is required. Also there has been a lot of discussion about how reliable it is. There was another program but I did not like the look of it. That left Linux. New, supported and free. Thats why. |
#51
|
|||
|
|||
Pdf
Here is the PDF, warts and all.
Hope it helps you. |
#52
|
|||
|
|||
Thanks, Al. You are and have always been an "exceptional friend" of the forum. Thanks again.
|
#53
|
|||
|
|||
Thank you for taking this information to the next level.
|
#54
|
|||
|
|||
Cheers John,
you've made my day. ![]() |
#55
|
|||
|
|||
Thank you as well Jack.
Wise words in your original post. 'EMC2 configuration can be a little more challenging than Mach3. I would suggest staying with Mach if that is where you are now. If you are into learning or doing a DIY (or have really strange things you want to do then EMC2 can be your toy.' It was challenging and strange but I had to do it. Its working well at the moment. |
#56
|
|||
|
|||
Chiming in late on this one but your next step Al is getting Pathpilot to run your machine
![]() |
#57
|
|||
|
|||
Hi Bruce.
Where have you been ? Whats a Pathpilot? I just need a younger me ![]() |
#58
|
|||
|
|||
Hey Al
Just been working too much and not doing enough with my machine ![]() Pathpilot is Tormachs version of Linuxcnc, they use icon their machines. Think of LinuxCNC with a very pretty face. It runs my big red beast at the moment. |
#59
|
|||
|
|||
I use LinuxCNC and I never installed my limit switches. I have never needed them. I home the table every time I reboot the computer and providing the tables limits are set there is no reason it should crash into an end stop unless you miss steps somewhere.
|
#60
|
|||
|
|||
On the subject of Pathpilot,
I came across these videos. Not watched them all yet but they look pretty comprehensive. https://www.youtube.com/watch?v=K-Ty...ovJXhfDcX50Otd |
![]() |
|
|