Z-axis homing - Y-axis tuning - ClearPath servo firmware updates

More
08 Jun 2024 17:22 #302638 by swift.gate0199
Hello!

I hope your day is going ok. I've taken over my dad's self-made LinuxCNC machine. He's still here but he doesn't use it anymore and told me it's mine so I'm trying to figure out how to use it for making some fancy wood projects. I've spent more than a month trying to figure things out and he doesn't seem to remember a lot of it. Now I hopefully only have a few more things to figure out and I might have it somewhat ready to use properly. Although a lot of time I spent screwing with FreeCAD before deciding to just get Vectric VCarve which I don't regret at all, totally worth the price for the time it saves messing with FreeCAD. FreeCAD is great but I just couldn't get it to do what I wanted properly and was always running into bugs and it was always crashing on me.

Anyway, as far as LinuxCNC and the router itself, here are the issues I'm having with that. Any help or tips are more than welcome. I appreciate anything you can help with. Thank you for taking a look!

1. Z-axis homing. I'm having trouble figuring out how to make the z-axis with the spindle on it home first before the others. He said he has always just powered off the machine and moved it up by hand and put a little piece of wood in it to hold it up. This is obviously not ideal. From what I've seen it's supposed to home before the others will home. I believe it's in immediate homing mode and has no limit switches on it. He has some limit switches I can try to add to it but he couldn't get them to work properly so he switched to a different kind of switch. The X and the two Y joints are homing fine, X has one limit switch on one side, both Y have limit switches on each end, although I've never tested the max-limit switches on the other ends of the ball screws so I'm not sure if they are hooked up right or not yet. There are 4 lines into inputs on the Mesa board that I believe come from the limit switches. I've looked over the docs and no matter what I change in the ini file I can't figure out how to make it home the Z-axis properly. I'm not sure the proper steps to take to figure this out. I've messed with it for days. I must be missing something.

If I set HOME to anything other than 0 it just waits and does nothing and seems to eventually time out and not home anything. I've tried every combination of things I can think of in the ini file and I'm not sure if I have to change anything in hal or not.

Does the Z-axis require a limit switch before LinuxCNC will let it home? Or should I be able to somehow configure it to just use a soft limit or tell it to go somewhere?

Can I use the ClearPath MSP software to set the motors to home or will they just get reset since they'll lose power? There is an option to configure them to home when they are powered on. I'm a bit confused by all of this. I suppose maybe that's the next thing I should figure out since it seems like a good possibility to potentially solve the issue.

I was just concerned that the only way to stop them would be to turn off the power to them if something didn't work right. Furthermore, when the Z-axis is powered off it seems it doesn't lock into position and can fall down, which I suppose makes sense if it doesn't have any physical locking mechanism and the weight of the spindle can just pull it down or it can be moved by hand. I'm not sure how the motor would know it's moved when it has no power and how it would be able to reset itself to home when powered on. It seems like maybe they can somehow detect the home automatically even when there aren't limit switches but I'm not sure and don't want to wreck it. I suppose more research is necessary before I risk blowing something up.

2. Vibrating Y-axis. I noticed that the Y-axis was extra jittery. Really, really badly, and sometimes would continually vibrate the ball screws when stopping. It was like the whole house was vibrating. Eventually we figured out we could auto-tune the motors. They only had windows software so now I have a new windows laptop I can hook up to them that I got yesterday.

However since it's a tandem y-axis we found an idea somewhere to put a similar weight of the gantry onto the X-axis and tune that motor and copy it to both Y-axis motors. This has surprisingly seemed to somewhat work, it's way better now, although there still seems to be a bit of vibration and finishing paths aren't perfect, they are kind of dotted or have lines or imperfections still. I think due to the gantry sometimes vibrating and I'm not sure exactly why that happens but I was thinking maybe it had to be tuned better than how we did it. Everything seems tight and nothing seems to wiggle at all when I try to move it by hand, although the gantry does seem to sometimes wobble or jiggle a bit when in operation due to the forces. I suspect it would be good to tune both y-axis motors at the same time since it has unique behaviours and the ball screws are about twice as long and the gantry might slightly jiggle when the motor stops or changes abruptly, or maybe even in certain areas, I'm not completely sure. But it doesn't seem that tuning both at once is really possible that I can tell, unless there is some trick to it.

The ClearPath MSP software also has fine tuning option where it's possible to set the stiffness which I wonder if it will help or if I have to do something else somewhere else in LinuxCNC. I don't want to mess with things if it's going to make things worse or blow something up. I'm going to try this as well and see what happens.

3. Servo firmware updates. When I originally auto-tuned the X-axis and Z-axis motors I also updated their firmware. Since I did this, or at least I think, it seems that the Y-axis motors no longer will go into standby with the orange lights, so I cannot upgrade their firmware because of this. Maybe it's not necessary to upgrade their firmware but I'm wondering if it might help the issues I'm having.

I don't know why this would happen and it makes no sense to me, however, I did also notice that they may be on a separate circuit than the X and Z. There are two power switches on the outside of the box he setup that has the Mesa board and whatnot inside of it. One turns the power on for the computer and one for the Mesa board, or at least I hear the fan come on when I turn the other one and it seems like the other motors come on and LinuxCNC only recognizes it on after that switch is on and LinuxCNC won't start unless I have that switch on because it doesn't find the board. I noticed when I turn the power on for the computer it lights up the other two motors, I think the Y-axis motors, if my memory serves me right. I might be wrong about which switch turns on which motors, but the point is that the Y-axis motors no longer go into their orange state where they should be able to be flashed. Previously they would go into that state the same as the X and Z motors when only one of the switches was on. So I'm not sure why it does this or what he has done from here and I'm not sure what would cause this to change. I was thinking maybe it was the firmware update of the other two motors since I noticed it around that time. I'm not sure what else has changed besides that but I'm not sure how that would do that. I am completely clueless about this part. I understand this might be beyond LinuxCNC, however maybe someone will know something or have some tips of what to do about this.

I can provide any images or files or additional info if necessary. I don't currently have the most up to date files on the computer I'm posting from but I can certainly get them if they are required. The hal files are split into several separate files for various things including the pendant.

Here is a list of hardware if it's relevant:
Mesa 7I76E | manual
Teknic ClearPath-SDSK Servos
Spindle
HY01D523B-VFD | manual
vistaCNC iMachIII P2-S pendant

Please Log in or Create an account to join the conversation.

More
09 Jun 2024 04:57 #302659 by rodw
Be sure you are running Linuxcnc 2,9.2 (or at least 2.8 or higher) to get support for your tandem axis
This will mean you must have homing switches installed on the 2 Y axes.
Then, read the section in the docs titled Homing Configuration about 5 times!
Your Z axis should have a switch at the top of travel.
All homing switches MUST stay enabled from the trigger edge to the end of travel
HOME_SEQUENCE in your ini file controls which axis is homed first (and which axes are treated as a joint axis (eg your Y)

Dont forget that pncconf will create a working config if you change linuxcnc versions.
 
The following user(s) said Thank You: swift.gate0199

Please Log in or Create an account to join the conversation.

More
09 Jun 2024 07:29 #302666 by swift.gate0199
Alright, good idea, let's focus on the z-axis homing first. And thank you very much for your help!

I'm running 2.9.2. Previously it was on 2.8.0 pre1 and seemed to be working ok for him. I updated things to 2.9.2 though since I thought it would be good to be on the latest version so hopefully it is.

There are indeed homing switches on both ends of both the y-axis. There's a homing switch on only one end of the x-axis for some reason, and none on the z-axis. Although there are some other types laying around I could install somehow.

Well I think I've only read the Homing Configuration page 4 and a half times so I'll read it a couple more times and see if that works =) Seriously though, maybe some of it didn't make sense to me so I just glossed over it with information overload so I'll work on understanding every single word of it and research it or ask questions if I don't think I understand something perfectly to make sure I do.

"All homing switches MUST stay enabled from the trigger edge to the end of travel"
To be clear, do you mean that as they are being pressed they don't disable until the very end when they are supposed to stop? This is how those particular switches seem to work. They have a wheel on the end of an arm and when pressed the arm will go back until I hear a click and it stops the axis from moving in that direction and then go the other way to their final home position.

The other switches he has laying around he said might be called impedance switches and he couldn't get them to work correctly for some reason. I think he said they had a magnet in them or something that was supposed to detect something when it came close to it but it didn't work. I'm not sure if this is what I should be trying to use but maybe I just have to figure out the right way to use them if they are possible to use.

HOME_SEQUENCE is set to 0 for z, 1 for x, and -2 for both y.

Now that you mention it, at one point I did actually run pncconf to generate some new configs and to try and update the existing configs. It didn't seem to quite work properly to fix the vibration before and maybe even made things worse so I didn't use it. I might have copied some of it into the current configs. I'll have to test this out and see what happens but it sounds like maybe I just have to install a limiter switch at the top of the z-axis and maybe then it'll work ok.

Thank you for all your little tidbits of wisdom!

Please Log in or Create an account to join the conversation.

More
09 Jun 2024 14:52 #302679 by jimmyrig
While it might not seem like it to you..... You almost got it!

Put that home switch on z.
Your sequence is correct.

For those clear path servos. Save the tune you have that works ok. Playing around with it shouldn't break things. I'm not familiar with how those tune but have worked on a few machines with them. Most of them have the problem you describe.
Two things you can do about it.
1. Mess around with your pid tune. Typically if it's jittery only when stopped your "I" part of the tune is having issues. It's either oscillating when I is too high (you should be able to see this) or not moving but on when I is too low. This can happen when your mechanics are sticky, the gantry is out of alignment, etc. basically the servo is trying to gently get to a position and hold it without overshooting.... But can't make cause something is holding it back. The motors either needs more power (higher I) or fix your mechanics.
2. Increase the deadband. If the mechanics are good and playing with I doesn't seem to help ( or you don't want to mess with it) try increasing the deadband. Servos are very accurate and often try to get to an insane level of precision (some have millions of encoder counts per revolution) so you may be telling it to go to encoder position 1,000,000 and it goes to 999,999,364 instead but tried to get to 1mil. Hence the jittery. But you don't care as after dividing that error by the pitch of your ball screw is going to result in some tiny tiny tiny linear distance. So increasing the deadband tells the servo.....ya you are close enough don't worry about it.

Option 3
Don't worry about it. If the motors are cool to the touch after jittering for an hour or so it's not a big deal. If they are too hot to much for more than a sec it should be fixed to extend motor life. Anything in-between is up to you. Personally I'd fix it cause it's annoying. If it's hot mess with the "I" tune, if it's cool mess with the deadband.




Hope that helps
The following user(s) said Thank You: swift.gate0199

Please Log in or Create an account to join the conversation.

More
09 Jun 2024 15:47 #302682 by swift.gate0199
Any and all info is definitely very helpful. Thank you, I really appreciate it! And thanks for the encouragement.

Hopefully now I can figure out how to actually hook this thing up properly. I found the switches here . They are inductive proximity sensor switches. It says 6-36V DC so I'm not sure how these will work on the Mesa board or how I'll even mount them or even how to get wires run all the way from then through the things he has. So looks like I have some more research and tinkering to do. I think first I have to figure out how to test them to make sure they actually will work before going through all the trouble.

 

Please Log in or Create an account to join the conversation.

More
09 Jun 2024 17:42 #302688 by swift.gate0199
Well it seems we have to get at least 18ft of wire to be able to reach where the switch has to be. First though I'm still trying to figure out how to properly test it before going through all that trouble of mounting it. I found out where to mount it and now just have to figure out how to hook it up and test it. I added some images of the Mesa board that my dad setup. I'm going to have to read a bunch more and see if I can understand it but if anyone has any pointers I'm happy to hear them.
Attachments:

Please Log in or Create an account to join the conversation.

More
09 Jun 2024 18:40 #302697 by jimmyrig
Those should work, I use something similar on most of my machines. They only work with steel, not aluminum.

If memory serves
Brown is +
Black goes to mesa (signal wire)
Blue is -
The sensor usually has a wiring diagram on the sticker

The easy way to test this
Hook up power leave the signal wire unplugged.

Put a piece of steel by it, light should light up on the back of it.

Now plug the signal into the next open digital input on the mesa

Move piece of steel and make sure mesa led lights up (or turns off if it's on by default)

You will need to configure your hal file so it's looking at the right input. Chances are if you used pnf config you did this without knowing it.

Now when you try to home z will go first. Shake a piece of steel in front so it turns the sensor on and off about once a second until the y axis starts going.


If it doesn't let us know what's going on and we will help more.
The following user(s) said Thank You: swift.gate0199

Please Log in or Create an account to join the conversation.

More
10 Jun 2024 00:58 #302728 by swift.gate0199
Hello,

I just thought I would give an update. We managed to get one of the switches hooked up properly and the z-axis homing working. Woohoo! Thanks to everyone for their help and suggestions and taking the time to read my surely nonsensical ramblings. You helped me a lot.

I played with the motors a bit and set the y-axis motors to increase the stiffness in the fine-tuning which hopefully helps with some of the dots. It doesn't seem to vibrate much after we simulated the y-axis weight on the x-axis and did auto-tuning in the ClearPath MSP software and then copied the config to both of the y-axis motors. I'll try adjusting the I or the deadband after that process and see if that helps now because I only tried those before doing that to try and fix the vibration issue and it didn't work. Auto-tuning on the x-axis simulating the y-axis as best we could is what helped with that.

A note that for the LJ18A3-8-Z/AX inductive proximity sensor switch I hooked the black wire to the field input 8 which was the first available digital input. I'm not sure if 0-3 were digital because they weren't hooked up to anything. The other switches were hooked up to 4-7 and in a video I saw someone say they were capable of analogue so I used 8 instead. I thought I remembered reading something in the Mesa board manual about all of them being capable of analogue but maybe I'm not understanding something properly there which wouldn't be surprising. But it works like this so I don't think I'm going to worry about it. I hooked up the blue wire to the field power ground on the Mesa board and the brown wire to the power on the same orange field power block. This seemed to be the right way. The light on the switch is always on until it detects metal. This actually works.

Now, here is another big problem I was having. The MAX_VELOCITY for the z-axis was set to 0 in halshow. After spending countless hours trying to figure out why the z-axis won't move I started looking at everything in halshow and discovered that the others were at 116 but the z-axis was 0. I eventually traced it to a line the pendants hal file. There are some lines commented out for an extra axis but it uses the A axis. I realized one of the lines was for MAX_VELOCITY on JOINT_3 which is my z-axis and once I uncommented that halshow showed 116. I don't know if I need the other lines but things seem to be working from what I can tell so hopefully it's ok.

Another issue I'm having now is that I realize that when the machine is powered off or loses power that the z-axis falls down. I'm not sure if there's an ideal way to fix this yet but I don't want to wreck anything or anyone if the machine suddenly loses power for some reason. Who knows when the power could go out. When the x and y are at home the bit could potentially have something under it since it's over the work area still so I don't think it's ideal to just put a block of wood under it or use a little piece of wood to jam in the space under the spindle sliding part, like my dad was doing. Especially if I forget to put it in there which is quite likely sometimes. Is there any other way of dealing with this that I can implement in this particular setup? Or do I just have to code something to tell me when I shut the computer down to put a block of wood under it?

Thanks again!

Please Log in or Create an account to join the conversation.

More
10 Jun 2024 10:21 #302748 by rodw
Sorry, looks like I lost a post or was distracted. The 7i76e which I saw you were using should use PNP prox sensors and your link was NPN.
You can use NPN sensors with a 2.2 k 1 W pullup resistor.

You  may  be able to set up a brake with your servo drive on the Z axis. 
The following user(s) said Thank You: swift.gate0199

Please Log in or Create an account to join the conversation.

More
10 Jun 2024 13:11 #302756 by swift.gate0199
Oh, no worries. Thank you for the reply!

Hmm, so the thing I'm using shouldn't actually work or is it just going to be damaging in some way if I run it like that or cause other issues then? It does seem to be working the way I hooked it up but if it's going to wreck something maybe it's not good to run it like that.

Also, where should I place the resistor? I'll see if I can figure out how to go about doing that if it's something I should be doing to prevent damage somehow.

A brake sounds exactly like what I might want to use too. I'm guessing there are specific types or brands I should be looking for to make it brake when the power is lost to prevent the spindle from falling. I have absolutely no idea how to determine if it's going to be compatible with things or even how to go about hooking one up but I suppose that's some more things I'll have to research.

Thank you!

Please Log in or Create an account to join the conversation.

Time to create page: 0.183 seconds
Powered by Kunena Forum