jog a velocity stepgen while paused
24 Oct 2016 19:51 #82003
by Badger
jog a velocity stepgen while paused was created by Badger
I have a stepgen running in velocity mode from a hypot component that would be handy to be able to jog it while my machine is paused. The part I need to move is run by a servo through a belt drive and I can disable the drive and reach in the machine to grab the pulley and move it but it is a bit of a chore depending on where the gantry is. One options I can think of are to have a separate stepgen hooked up to the same pins that I could control when paused by a switch or keyboard but I don't think that would work while paused. Another option would be to hook up a cheap signal generator in parallel from the BOB to the servo drive to feed it steps while LinuxCNC is paused but that sounds like a good way to damage the drive. Can LinuxCNC stop in mid-step where the breakout board may, or may not be sending a step signal to the servo drive?
Thanks, Badger
Thanks, Badger
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
24 Oct 2016 20:50 #82010
by Todd Zuercher
Replied by Todd Zuercher on topic jog a velocity stepgen while paused
Just add an offset component between the joint command and the stepgen.
linuxcnc.org/docs/2.6/html/man/man9/offset.9.html
linuxcnc.org/docs/2.6/html/man/man9/offset.9.html
Please Log in or Create an account to join the conversation.
24 Oct 2016 21:19 #82013
by Badger
Replied by Badger on topic jog a velocity stepgen while paused
Thanks Todd. I was thinking that offsets would return to the previous position like "moveoff" but I will try to figure out how to implement it.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
25 Oct 2016 00:56 #82022
by Todd Zuercher
Replied by Todd Zuercher on topic jog a velocity stepgen while paused
The offset component will hold the value set to offset.N.offset. as long as you can live with the joint moving at the max settings of the stepgen. If you want more controlled motion you will need to add a few more things like a limit3.
The following user(s) said Thank You: Badger
Please Log in or Create an account to join the conversation.
26 Oct 2016 15:55 #82089
by andypugh
Replied by andypugh on topic jog a velocity stepgen while paused
If it's a velocity stepgen then you could use a mux-N component.
Connect the existing PID (?) to the in0 input of the mux. setp the other inputs to varius jog speeds. Connnect the .sel bits to the fast/slow jog buttons.
The PID will attempt to return to the original position when re-enabled. You will tend to get following-errors too.
The solution probably involves the offset component and a sample-hold to store the current offset that is latched when the PID is re-enabled.
If there isn't a position loop, then there is no need for the extra stuff.
Connect the existing PID (?) to the in0 input of the mux. setp the other inputs to varius jog speeds. Connnect the .sel bits to the fast/slow jog buttons.
The PID will attempt to return to the original position when re-enabled. You will tend to get following-errors too.
The solution probably involves the offset component and a sample-hold to store the current offset that is latched when the PID is re-enabled.
If there isn't a position loop, then there is no need for the extra stuff.
The following user(s) said Thank You: Badger
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
26 Oct 2016 16:47 #82099
by Todd Zuercher
Replied by Todd Zuercher on topic jog a velocity stepgen while paused
Nah, why mess about with something that will give you following errors, just use a limit3 to the offset connected to the position input of the PID. You should not get any following errors then. (if it's all connected right) The limit3 should smooth out the step change in position command and the offset will handle the feedback.
Please Log in or Create an account to join the conversation.
26 Oct 2016 21:08 #82119
by Badger
Replied by Badger on topic jog a velocity stepgen while paused
Additional details: I am using a DMM servo which closes the loop itself with no feedback to LCNC. I am using step pulses from in velocity mode to drive it. What it does is drive the needle on my Rugbot 1000 and there are times where I need to change the position of the needle for threading, or starting, or whatever. The mechanism prefers to always go in one direction so having it reverse to the previous position is not good.
I will research the mysteries of mux and limit3 to see if they may help. Thanks for pointing me in a new direction.
Having so many options, and so much help online make LCNC so much more usable vs commercial programs.
I will research the mysteries of mux and limit3 to see if they may help. Thanks for pointing me in a new direction.
Having so many options, and so much help online make LCNC so much more usable vs commercial programs.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
27 Oct 2016 12:35 #82139
by Todd Zuercher
Replied by Todd Zuercher on topic jog a velocity stepgen while paused
Just curious about the details, because this is an intriguing problem (and application).
What is the multiple of steps you need the needle to advance by?
What are the situations you need the needle to stop in the up position?
When do you not want it to stop in the up position?
This might an extreme solution but maybe you can use the servo's ability to scale its step resolution such that 1 step input is a complete cycle of the needle. This way the needle would always stop at the top of its travel. (That is assuming you can set the step distance of the servo that long.)
What is the multiple of steps you need the needle to advance by?
What are the situations you need the needle to stop in the up position?
When do you not want it to stop in the up position?
This might an extreme solution but maybe you can use the servo's ability to scale its step resolution such that 1 step input is a complete cycle of the needle. This way the needle would always stop at the top of its travel. (That is assuming you can set the step distance of the servo that long.)
Please Log in or Create an account to join the conversation.
27 Oct 2016 15:52 #82143
by Badger
Replied by Badger on topic jog a velocity stepgen while paused
There is a video of a earlier version of the Rugbot 1000 in the show your stuff category. I have changed the stitching mechanism to a needle and blade system which I hacked out of a cheap commercially available tufting gun. What happens is the hollow needle enters the fabric first and opens up a space where the blade can then push the yarn though the opening, the needle retracts, the fabric grips the yarn and the blade retracts. The servo that runs the mechanism runs at a velocity that is calculated by a "hypot" components that is reading the X & Y motion to calculate the rate of movement. I can control the stitches per inch by setting the scale on stepgen for the servo, which is not an axis. It works fabulous and gives me perfectly even stitches at all speeds and directions. From a LCNC perspective it is open loop but the servo drive closes the loop internally. I had to use a servo because the speed and torgue of steppers didn't work for the speed range I needed which is currently about 300 stitches per minute, at 5mm per stitch and a 2:1 belt reduction.
The current problem is that when the needle mechanism stops, either at the end of a path or by pausing to fix something, there is no telling if the needle or the blade are going to be forward. If the hollow needle is forward I can move the carriage back to the fabric an all is fine. If the blade is forward of the needle it will catch on the fabric and cause problems. What would be nice is to "jog" the servo to get the needle ahead of the blade to get going again. Since starting this thread I have found a mechanical binding in the mechanism that makes it hard to manually rotate the servo when the carriage is retracted so fixing the binding may be sufficient. When the carriage is retracted it hits a switch that disables the servo.
I have also though about researching sub routines similar to ATC and adding a sensor to the mechanism so that at the end of a run it will automatically "jog" the needle to the correct orientation.
I will try to post a short video of the current mechanism which is a little Rube Goldberg but fun to watch and it actually works for the most part.
The current problem is that when the needle mechanism stops, either at the end of a path or by pausing to fix something, there is no telling if the needle or the blade are going to be forward. If the hollow needle is forward I can move the carriage back to the fabric an all is fine. If the blade is forward of the needle it will catch on the fabric and cause problems. What would be nice is to "jog" the servo to get the needle ahead of the blade to get going again. Since starting this thread I have found a mechanical binding in the mechanism that makes it hard to manually rotate the servo when the carriage is retracted so fixing the binding may be sufficient. When the carriage is retracted it hits a switch that disables the servo.
I have also though about researching sub routines similar to ATC and adding a sensor to the mechanism so that at the end of a run it will automatically "jog" the needle to the correct orientation.
I will try to post a short video of the current mechanism which is a little Rube Goldberg but fun to watch and it actually works for the most part.
Please Log in or Create an account to join the conversation.
Time to create page: 0.121 seconds