Incorrect Axis Motion
17 Jul 2017 08:19 - 17 Jul 2017 23:06 #95871
by sanmd
Incorrect Axis Motion was created by sanmd
Hello.
I'm currently attempting to fix up a machine that a few people have worked on before me and left no documentation so what everything I know is here unfortunately. I've tried to run this machine and have come across some interesting behavior related to its motion. When I manually move the quill, the axis on which I want it to move is not the axis on which it moves. I've attached an image with the operation I tried to perform and the result I got. I assumed it was a wiring problem so I went back and traced all the wires as best I could (some were shrouded) and they all seem to be attached correctly. I also checked the .hal file and I think it's correct (I'm new to all this).
Next, I went back into the stepconf and used that to test each axis and saw some really strange behavior. I would have assumed to see the same results as manual but got something completely different. I've also attached an image of these results below along with the hal and ini files.
A little background on the machine: it has two x-axis motors, one y-axis, and one z-axis. All motors are from Oriental motors and the breakout board is the cnc4pc c10 rev 10 board. Please let me know if there are any other questions. Any help in figuring out what's happening would be greatly appreciated.
Thank you!
Edit: In the "Front" image, the x-axis is left to right, y-axis is into the image, and the z-axis is down to up.
I'm currently attempting to fix up a machine that a few people have worked on before me and left no documentation so what everything I know is here unfortunately. I've tried to run this machine and have come across some interesting behavior related to its motion. When I manually move the quill, the axis on which I want it to move is not the axis on which it moves. I've attached an image with the operation I tried to perform and the result I got. I assumed it was a wiring problem so I went back and traced all the wires as best I could (some were shrouded) and they all seem to be attached correctly. I also checked the .hal file and I think it's correct (I'm new to all this).
Next, I went back into the stepconf and used that to test each axis and saw some really strange behavior. I would have assumed to see the same results as manual but got something completely different. I've also attached an image of these results below along with the hal and ini files.
A little background on the machine: it has two x-axis motors, one y-axis, and one z-axis. All motors are from Oriental motors and the breakout board is the cnc4pc c10 rev 10 board. Please let me know if there are any other questions. Any help in figuring out what's happening would be greatly appreciated.
Thank you!
Edit: In the "Front" image, the x-axis is left to right, y-axis is into the image, and the z-axis is down to up.
Last edit: 17 Jul 2017 23:06 by sanmd. Reason: Added machine pictures and descriptions.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
17 Jul 2017 11:20 #95878
by Todd Zuercher
Replied by Todd Zuercher on topic Incorrect Axis Motion
Could you post a photo of the actual machine?
Please Log in or Create an account to join the conversation.
17 Jul 2017 17:01 #95928
by andypugh
Replied by andypugh on topic Incorrect Axis Motion
If jogging X+ and X- move different physical motors then it sound very much like the DIR pins are going to the wrong places, possibly to the STEP or ENABLE inputs of completely separate drives.
Please Log in or Create an account to join the conversation.
17 Jul 2017 23:07 - 17 Jul 2017 23:09 #95945
by sanmd
Replied by sanmd on topic Incorrect Axis Motion
Added some images and some description. Hopefully the machine makes more sense. As for the DIR pins, I've traced them fully from the breakout to the physical motor drivers. I'll try to do that again tomorrow just to make sure I've done it correctly. Honestly, that's what I would have thought but after seeing what I think was correct wiring, I thought the problem might be in the hal file.
Last edit: 17 Jul 2017 23:09 by sanmd.
Please Log in or Create an account to join the conversation.
18 Jul 2017 00:43 #95951
by andypugh
Replied by andypugh on topic Incorrect Axis Motion
Well, yes, the problem might be in the HAL file, but I don;t know how you can decide that the wiring is correct without knowing what the HAL file thinks each pin is for.
Please Log in or Create an account to join the conversation.
18 Jul 2017 01:25 #95953
by sanmd
Replied by sanmd on topic Incorrect Axis Motion
I based it on my understanding of lines like this:
net xstep => parport.0.pin-02-outsetp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-outsetp parport.0.pin-04-out-invert 1
I thought I understood that "xstep" was linked to pin 2 and direction to 3 but now that I'm looking at it again, I just noticed the pin 4. Probably should have noticed that earlier and, damn, do I feel dumb.
Thanks @andypugh for pointing me there again. I'm going to try sorting that out now. Correct me if I'm wrong but, the "dir" pin doesn't matter unless the corresponding "step" pin isn't powered, right? As in, the direction the motor is set to spin doesn't matter if it isn't stepping at the same time?
net xstep => parport.0.pin-02-outsetp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-outsetp parport.0.pin-04-out-invert 1
I thought I understood that "xstep" was linked to pin 2 and direction to 3 but now that I'm looking at it again, I just noticed the pin 4. Probably should have noticed that earlier and, damn, do I feel dumb.
Thanks @andypugh for pointing me there again. I'm going to try sorting that out now. Correct me if I'm wrong but, the "dir" pin doesn't matter unless the corresponding "step" pin isn't powered, right? As in, the direction the motor is set to spin doesn't matter if it isn't stepping at the same time?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
18 Jul 2017 03:02 - 18 Jul 2017 03:07 #95954
by Todd Zuercher
Replied by Todd Zuercher on topic Incorrect Axis Motion
The two example lines you posted should have been 4 lines link this
I don't know what kinds of problems it could cause having those setp lines mashed onto the ends of net commands.
(I'm a little surprised Linuxcnc would even open with lines like that.)
The dir pin matters all the time. It determines the direction of movement when pules are generated on the step pins (step pins turning on/off). So if the dir pin is off and the step pin pulses the motor will turn one direction. If the dir pin is on, and the step pin pulses it will turn the other direction. (sometimes the motor will toggle back and forth 1 step and not really move, other times it may step and move in one direction, if pulses are sent to the dir instead of the step pin.it depends on the drive.)
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
setp parport.0.pin-04-out-invert 1
I don't know what kinds of problems it could cause having those setp lines mashed onto the ends of net commands.
(I'm a little surprised Linuxcnc would even open with lines like that.)
The dir pin matters all the time. It determines the direction of movement when pules are generated on the step pins (step pins turning on/off). So if the dir pin is off and the step pin pulses the motor will turn one direction. If the dir pin is on, and the step pin pulses it will turn the other direction. (sometimes the motor will toggle back and forth 1 step and not really move, other times it may step and move in one direction, if pulses are sent to the dir instead of the step pin.it depends on the drive.)
Last edit: 18 Jul 2017 03:07 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
18 Jul 2017 07:40 #95958
by sanmd
Replied by sanmd on topic Incorrect Axis Motion
In that case, it's set up as follows:
I'd opened it in notepad and everything was clumped together so I must have misread. In this, it seems that the pins are being set properly and the wires correspond accordingly.
setp parport.0.pin-02-out-invert 1
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
setp parport.0.pin-04-out-invert 1
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
setp parport.0.pin-05-out-invert 1
net ydir => parport.0.pin-05-out
setp parport.0.pin-06-out-invert 1
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
setp parport.0.pin-07-out-invert 1
net zdir => parport.0.pin-07-out
I'd opened it in notepad and everything was clumped together so I must have misread. In this, it seems that the pins are being set properly and the wires correspond accordingly.
Please Log in or Create an account to join the conversation.
18 Jul 2017 08:42 #95961
by andypugh
Replied by andypugh on topic Incorrect Axis Motion
There is a further complication here.
xstep, ystep etc actually don't mean anything. Those are signal names (that you can freely choose) and there is no guarantee that the data in the xstep signal is the x-axis steps.
Each "signal" needs a source and at least one destination pin. Your destination pin for xstep is parport.0.pin-02-out, but what is the source pin? You would normally expect it to be stepgen.0.step. And you would normally expect stepgen.0.position-cmd to be linked to joint.0.motor-position-cmd. But an almost infinite number of possible variations exist.
So, check the source of xstep (and make sure that there isn't a confusing variant, like x-step in use) then see that it is connected to the correct pins of the step generator, and that the step generator is connected to the correct joint.
xstep, ystep etc actually don't mean anything. Those are signal names (that you can freely choose) and there is no guarantee that the data in the xstep signal is the x-axis steps.
Each "signal" needs a source and at least one destination pin. Your destination pin for xstep is parport.0.pin-02-out, but what is the source pin? You would normally expect it to be stepgen.0.step. And you would normally expect stepgen.0.position-cmd to be linked to joint.0.motor-position-cmd. But an almost infinite number of possible variations exist.
So, check the source of xstep (and make sure that there isn't a confusing variant, like x-step in use) then see that it is connected to the correct pins of the step generator, and that the step generator is connected to the correct joint.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1377
18 Jul 2017 11:54 #95972
by Todd Zuercher
Be careful opening, and especially editing Linuxcnc files in Windows. Windows uses a different set of characters to indicate new lines than Linux does, and can scramble a config file if you are not careful. If you must use Windows to work on Linux files, I'd suggest using the program Notpad++ as your text editor. It can display the line endings and convert the formatting from one system to the other.
Replied by Todd Zuercher on topic Incorrect Axis Motion
I'd opened it in notepad and everything was clumped together so I must have misread. In this, it seems that the pins are being set properly and the wires correspond accordingly.
Be careful opening, and especially editing Linuxcnc files in Windows. Windows uses a different set of characters to indicate new lines than Linux does, and can scramble a config file if you are not careful. If you must use Windows to work on Linux files, I'd suggest using the program Notpad++ as your text editor. It can display the line endings and convert the formatting from one system to the other.
Please Log in or Create an account to join the conversation.
Time to create page: 0.134 seconds