v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill <answered>

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

gerald martin
Posts: 72
Joined: Mon Oct 15, 2018 7:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill <answered>

Post by gerald martin »

I did a clean install of the new Router software. I am using a custom home / auto square routine originally written by Eric Schimelpfenig here, with minor mods for my machine. Since the software upgrade, CNC12 does not seem to recognize the Y axis homing sensor (Input 3). Using Alt+I shows the switch is alive and changes state fine. But when homing, the Y axis moves past the switch, crashes against the hard stop and faults out the servo.

I will attach my current report.zip, and one from before the upgrade. And a current report: Most likely I fat fingered something in the wizard settings. Appreciate your help.

Gerald
gerald martin
Posts: 72
Joined: Mon Oct 15, 2018 7:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill

Post by gerald martin »

To clarify, the first report above is before the software upgrade. The second is after, with the current issue. Also, I have not been able to complete the homing sequence yet - it's Z-Y-X. Z homes OK, but Y crashes against the hard stop.
Toaster
Posts: 139
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill

Post by Toaster »

Ok Gerald I took a look at your homing file. I think I know what the issue is, but I'm not certain because I don't know how you have your IO setup. So while I can't solve your problem, I can teach you how to solve it for yourself.

Firstly, let's look at the order that things happen, this is the first batch of commands in your homing file:

#100=5
;G43 H1; picks tool 1
;#23503=#10001; this will set the z travel so that the tool can't be jogged into the table 10001 is tool number 1
G91
G0 X1
G90

This moves around the X a little bit. On my setup I have these moves in here to get away from an extra prox switch that I have. It's a bit dangerous to have these in the beginning of your homing script because you have not raised Z up at all, so if your machine was left near a clamp, or your Z axis moved down when powered off your first move could knock over a clamp or break a bit. I'd do a Z move first, more on that later.

M92/Z L1
M26/Z
G53 G0 Z-0.1
M26/Z

This next batch of commands sets the Z axis machine zero at the top. For the safety reasons I mentioned earlier, these should be first. The command M92/Z L1 moves the Z up (up in my case because of how my drives are setup, your setup might be different) until it hits a limit switch. M26 zeros the Z G53 -.1 moves down .1" and then it zero's again. While this works, there's probably a better way to do it. The M92 and M91 commands move plus and minus to a home/limit switch. If you don't have your home/limit switches defined correctly in the Acorn wizard these inputs will be ignored. EVEN if you can see them go green on the Alt I menu, the Wizard needs to know what the inputs are for. Again, M92/M91 will only respond to inputs that are defined as home/limit switches.

M91/Y L1
M26/Y
G53 G0 Y0.1
M26/Y

This next batch of commands does the Y axis. See my last few sentences above about why the M91 command may be ignoring your home command. I suspect it's because of improperly configured home/limit switches.

M24

;M91/X L1
;M26/X
;G53 G0 X.584
;M26/X

This last batch, M24 is my squaring script. What you've done here is comment out the X zeroing routine. This is bad! You need to home your X axis too! The way this script works is that it brings Z all the way up to the top and zeros it (that way it's out of the way) then it does Y, and then X.

The way the M24 script works is this:

On my machine I measured the distance between the two sensors on each side of the gantry with the gantry "slacked" (IE I powered off the machine, and powered it on and let the gantry sit wherever it was). I had to measure the distance between the X homing switch, and the extra one on the far side of the gantry accurately. The distance between these switches doesn't matter, it could be .25" or 90" but I had to measure it.

To get that measurement I used a quick and dirty method with the M100/M101 commands. All these commands do is move until an input that you define is triggered. That's it. So I set one to hit my X prox switch, noted the location, and then I set another command to move to touch the secondary switch and used a calculator to get the distance between the two switches. On my setup they're about an inch apart.

That M24 first checks the distance between the two switches, because when the machine is off that distance could change a bit, not a lot, but a little bit (clamp one side of your gantry and push the other and you'll see what I mean). So let's say you power up and the distance is .9 instead of 1", that M24 script will add that discrepancy to the amount it "swings" the gantry into square so you get an accurate square every time.

The hidden secret to my squaring script is this: My secondary X sensor isn't defined in Acorn at all. If it were defined as a limit switch every time the gantry drove over it Acorn would get triggered as a "limit switch" and stop the machine. I can still use the M100 commands to check for it while squaring, but in normal operation it's completely ignored. (there's probably a better way to do this, but it works for me and has for several acorn versions)

Ok, so back to the homing script:

After you come back from M24 your gantry is squared, but NOT zero'd. That's what the last part you have commented out does so uncomment that!

Now let's step back for a second...

You've appeared to jump head first into custom scripts. That's good, but you might want to consider taking a simpler approach to start. Forget squaring for a second. I'd consider using the Acorn wizard to generate a homing routine for you. It works really well, and will build you a very nice homing script. Get that dialed in and working just right. Then open it up in a text editor and look up every single command that is in that homing file and understand what it does. Add a comment after each line with a note about what it does. Then make a copy and start fooling with it. You'll always have a reliable script to fall back on, and to check against.

For squaring I'd do this: Do manual squaring first. Set your stop blocks to be square so you can pull your gantry tight against them and power up. Mark where square is exactly. Then as you graduate to hacking my squaring script you've got a known good reference to fall back on to make sure your script is doing what you want. That's how you can square manually.

My custom scripts aren't things I built overnight. I usually start with a known good script, or something that came with Acorn. From there I just made incremental changes one at a time. While you and I have very similar machines, they are likely more different than the same. So my scripts should be used as a good template, not something you can just run. That goes back to my suggestion of learning the default stuff really well first, and then building/hacking your own thing/someone elses.
cnckeith
Posts: 3107
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
CNC Control System Serial Number: none
Contact:

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill

Post by cnckeith »

thanks for the great post Toaster, cool customizations.
i'll add by saying for those that don't want to build/learn custom macros and home files the Wizard generated Auto Squaring and Homing home program works well and i have been using it on a number of machine tools. Just follow the instructions on how to set outlined in the Axis Pairing guide. here..
https://www.centroidcnc.com/centroid_di ... _guide.pdf

video
https://photos.app.goo.gl/nv1JY6YruWAWu3HfA
When requesting support READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043

Please ALWAYS post a FRESH report. To make a report: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

(We pride ourselves on providing timely solid technical support but, without good information we may not be able to help and/or reply until such information is posted.)
Sword
Posts: 190
Joined: Fri Nov 30, 2018 1:04 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill

Post by Sword »

Gerald (and maybe Keith),

If you did a clean install and manually set it up with the Wizard, there's a situation that I have run into in the past (reported this quite some time back Keith, but didn't follow up on it with you). In Homing and Travel, if you choose to use "Create your own" and "Automatic", the axis M91 +/- boxes are grayed out and can't be set. If any of them are defaulted to a value that is opposite of the M91 in your homing file, CNC12 will use the Wizard value instead of what's in your homing file and the homing will fail. I always have to choose "Wizard generate" and "Automatic", then set the proper M91 +/- values for each axis, and then go back and set "Create your own".

Scott
Toaster
Posts: 139
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill

Post by Toaster »

Scott, I've run into that same issue too. I too did the same workaround.

Keith, you've made a good point that I was heading towards... You guys put a lot of thought into making the default setup work very well for a variety of tools. I've gone off on my own a bit because I wanted really granular control over certain things, and in the case of the squaring in particular, when it first came out (or I was testing it) I think there was some stuff that didn't work exactly the way I wanted so I just wrote my own script and I've stuck with it.

So the message here is maybe don't be like me unless you have to! :)
gerald martin
Posts: 72
Joined: Mon Oct 15, 2018 7:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill

Post by gerald martin »

Thanks all, and sorry for the delay here.

Eric: Regarding the X axis homing lines that are commented out: For some reason I put those lines in the M24 macro. So I was getting the x axis homed. I can't remember why I did that though.

I will attach a screenshot showing my input settings.
Screenshot (18).png
Note: Apparently the M92 (move axis positive to home/limit switch, right) works, because my Z axis homes. It's the M91 that is failing.

Keith: There is only one reason I'm using a custom squaring/homing routine. Last I knew, Autosquare in CNC12 only works with the HomeAll input. My inputs are discrete. If the only option is to wire my Baumer proximity sensors in series and use HomeAll in the wizard...maybe I could try that. However, it appears possible to me that there is some kind of glitch going on in the software here. I am open to learn, and I know that my tech know-how is much lower than some of the other participants here. I did, however, read up in the CNC12 manual on the M codes used in Eric's macro, and it seems to me they should be fine. Unless - does autosquare support systems with discrete homing inputs?

Scott, I need to try your suggestion, I think.

Gerald
cnckeith
Posts: 3107
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
CNC Control System Serial Number: none
Contact:

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill

Post by cnckeith »

auto square is 'supported' with individual homing inputs but you have to create and debug that program yourself like Toaster did. I suggested you use the Wizard generated Auto Home and Square home since you are struggling with a custom home program. :D
the canned method uses HomeAll and SlavedHomeInput to save on inputs and is fully outlined in the manual on how to setup.
When requesting support READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043

Please ALWAYS post a FRESH report. To make a report: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

(We pride ourselves on providing timely solid technical support but, without good information we may not be able to help and/or reply until such information is posted.)
Toaster
Posts: 139
Joined: Mon Oct 29, 2018 5:25 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill <answered>

Post by Toaster »

Gerald if you M91 commands aren't working for any axes let me refer you to this comment:
The M92 and M91 commands move plus and minus to a home/limit switch. If you don't have your home/limit switches defined correctly in the Acorn wizard these inputs will be ignored. EVEN if you can see them go green on the Alt I menu, the Wizard needs to know what the inputs are for. Again, M92/M91 will only respond to inputs that are defined as home/limit switches.
Regarding the X axis homing lines that are commented out: For some reason I put those lines in the M24 macro. So I was getting the x axis homed. I can't remember why I did that though.
It's really important that you keep track of every change you do and why you did it. That's why in some of my programs you see a ton of comments. Even if they are documenting the most basic things. I'm not much of a coder, and being able to retrace my steps is really important, especially since once I get these things working I don't come back and look at them long periods of time. (I'm not perfect at following my own advice though!)

This is why "real" software developers use code repositories like GitHub, it tracks all of your changes.

But back to your problem, to make these scripts you really need to break each command/step down one at a time and debug it. M91/92 should work. Don't move on until you 100% solve that, same with the next problem, same with the next.

Please don't take the following as a disparaging comment, but you might want to consider not trying to customize the heck out of things right now. There's real value in using the built in stuff. You'll get better support here first of all, and things like the squaring and homing scripts that are auto generated work, and they work well.

It's likely that they'll work great for you. If you want to mod them further for speed, or some special work that you have you can start from a known good point and add features one line at a time perhaps even using scripts like mine (or others) as a guide.
gerald martin
Posts: 72
Joined: Mon Oct 15, 2018 7:37 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: v4.62 Router: Issue with Y axis homing since upgrade from 4.20.1 Mill <answered>

Post by gerald martin »

Thanks to your help, it's fixed. Scott was spot on.

I had to make CNC12 create its own homing file so that I could set the M91 / M92 values correctly for axis 1, 2, and 3. Then I restarted the software and told it I had my own homing file.

Finally, I copied my homing file back into the cncm directory to replace the system generated one.

Here's how I needed to write the settings:
Screenshot (19).png
It's fixed.

Keith: Could this be addressed to spare others from this same issue? Apparently Scott ran into it before. It seems unusual if the user is specifying a homing file, to jump through the steps I provided above.
Post Reply