Requests for help: Gcode cam follower/ tangential knife control.
-
I will be upgrading my firmware and testing the homing here in a couple of hours so will find out and make sure everything is good on that part.
~Russ
-
ok, firmware up to date.
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 2.02RC2(RTOS) ELECTRONICS: Duet WiFi 1.0 or 1.01 FIRMWARE_DATE: 2018-09-07b2
now, i see its homing but i cant move it at all once its homed or even before its homed?
But now i get an error if its not homed and try to move it. where before it just moved only if it was not home yet.
now I'm stuck, i cant move it. U is rendered useless. ? strange because it dose home
did i miss end stop liniments or something?
I also updated my config.g
these now should be correct. I redefined the extruder drives correctly yes? and moved M574 after M584
; Axis and motor configuration
M569 P0 S1 ; Drive 0 goes forwards
M569 P1 S1 ; Drive 1 goes forwards
M569 P2 S1 ; Drive 2 goes forwards
M569 P3 S1 ; Drive 3 goes forwards
M569 P4 S0 ; Drive 4 goes backwards
M569 P5 S0 ; Drive 5 goes backwards
M584 U4 E3:5
M574 X2 Y2 Z2 U2 S0when I run a file with U commands, it completely ignores the U commands?.
not sure what to check next, please let me know what to look for. Thanks!!!!
~Russ
-
also something to note, U dose not show up here? E0 andE1 do? but the current is correct for E0 for U ?
is this normal?
~Russ
-
@russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:
also something to note, U dose not show up here? E0 andE1 do? but the current is correct for E0 for U ?
~Russ
At one point, the Web interface had problems if the printer itself was configured for axis that were not in sequence. Be sure you are on the very latest web interface, and/or that bug may still exist.
-
Russ,
Given David's answer that RepRap does not distinguish axis, and given that G-Code (and RepRap) ensure that all axis in a given single move reach their individual endpoints in sync, this all adds up to doing EXACTLY what you want for a coil winder.
That is, if the current XYZ position of the "control point" is somwhere around a coil, ready to make the next coil, and the U axis is "pointed aft" to correctly lay the wire, then a G2 arc move that specifies a next XY 1/4 of the way around the coil, and a U that specifies 90 degrees from where U starts (in the correct positive or negative direction)... that move will smoothly rotate U as XY accelerate, move, deccelerate.
Personally, I'd do 1/4 arcs while debugging so that you can "see" what is happening better.... but once you've confirmed how this all should work, and "good" g-code, then G2 moves that do full circles, one entire coil per G2 line, should be easy.
This is all very hard to put into words... does it make sense?
p.s. I'd still recommend you define your rotational axis as A (not U). This is a widespread standard for extra axis in CNC. It also MIGHT make the Web interface display it better.
-
@russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:
I redefined the extruder drives correctly yes?
You are using:
M584 U4 E3:5
Is E3:5 valid? if you don't have a Due5x or Due2x then you only have 5 drivers total and the first one is 0.
-
@danal said in Requests for help: Gcode cam follower/ tangential knife control.:
Russ,
Given David's answer that RepRap does not distinguish axis, and given that G-Code (and RepRap) ensure that all axis in a given single move reach their individual endpoints in sync, this all adds up to doing EXACTLY what you want for a coil winder.
That is, if the current XYZ position of the "control point" is somwhere around a coil, ready to make the next coil, and the U axis is "pointed aft" to correctly lay the wire, then a G2 arc move that specifies a next XY 1/4 of the way around the coil, and a U that specifies 90 degrees from where U starts (in the correct positive or negative direction)... that move will smoothly rotate U as XY accelerate, move, deccelerate.
Personally, I'd do 1/4 arcs while debugging so that you can "see" what is happening better.... but once you've confirmed how this all should work, and "good" g-code, then G2 moves that do full circles, one entire coil per G2 line, should be easy.
This is all very hard to put into words... does it make sense?
p.s. I'd still recommend you define your rotational axis as A (not U). This is a widespread standard for extra axis in CNC. It also MIGHT make the Web interface display it better.
Hi Danal,
Thanks for all your feed back,
what your saying makes sense. but let me get something correct.
If i send "G2 X90.6 Y13.8 I5 J10 U45"
David is saying that as the arc move is happening, The U will slowly move around the arc. and the motion will be fluid on the U along the direction of the arc?
however, doing it point to point i will need to add the U on the line before the move so i know its going in the right direction. correct?
i just want to be sure i understand... clearly...
Also, are you able to make a simple script program that has an in interface for such a G code generator?
if yes and your willing to give it a go let me know. ill need to make a list of parameters that i would need. just thought I would through it out there.
Thanks for the help and feed back!
~Russ
-
@adavidm said in Requests for help: Gcode cam follower/ tangential knife control.:
@russ-gries said in Requests for help: Gcode cam follower/ tangential knife control.:
I redefined the extruder drives correctly yes?
You are using:
M584 U4 E3:5
Is E3:5 valid? if you don't have a Due5x or Due2x then you only have 5 drivers total and the first one is 0.
yeah i think so, even tho nothing will happen with E5... but i can remove it and see if anything changes.
nope, same thing.
~Russ
-
ok, good news, i needed to set up my M208 correctly, now i can move my axis to the limits. and homing works.
now, whats a workaround to disable the limits? I dont want any limits on the rotational axis?
A have to have them in place or i cant move the axis at all... but i really dont want them at all because it can spin in one direction forever... so is there a way to disable the software limits for one axis?
and yes i know i can set them to some crazy high / low number... but that seems a bit odd. so i thought i would ask if they can be disabled in any way?
Thanks!
~Russ -
@russ-gries Perhaps with this: https://duet3d.dozuki.com/Wiki/GCode#Section_M564_Limit_axes
M564: Limit axes ¶
ParametersHnnn H1 = forbid movement of axes that have not been homed, H0 = allow movement of axes that have not been homed (firmware 1.21 and later)
Snnn S1 = limit movement within axis boundaries, S0 = allow movement outside boundaries
ExampleM564 S0 H0
Allow moves outside the print volume and before homing, or not. If the S parameter is 0, then you can send G codes to drive the RepRap outside its normal working volume, and it will attempt to do so. Likewise if the H parameter is zero you can move the head or bed along axes that have not been homed. The default behaviour is S1 H1. On some types of printer (e.g. Delta and SCARA), movement before homing may be prohibited regardless of the H parameter.However, I believe that disables limits for all axis. And may not even apply to you as you use a Delta. Perhaps @dc42 can provide more details.
-
it seems that G2 and G3 commands work well, nice and smooth.
can you pose some simple arc commands to test? a circle or something.
The U ( will change it to A later) is set up so that i can send it 0-360 as a full circle....
I tried to match the steps/mm to = 360 deg rotation. as genghisnico13 was saying would be a good idea.
so in the code just put the proper deg angle with the arc.
and ill run some tests and see how it reacts. so far it looks good playing with it but i done have a proper way to generate the G code with arc commands ATM.
and my hand coding of those commands is not working well
Thanks,
~Russ -
@russ-gries You have a nice idea. I am following it with great interest!
Your construction could support such ideas like PCB motor and PCB actuator.
https://hackaday.io/project/158017-linear-pcb-motor
https://reprap.org/forum/read.php?160,813817,page=1
or Venture Tape for heat bed
https://www.henschke-geraetebau.de/dr/heizbett.html -
Have you reached out to @Kulitorum to find out how he setup and coded the tangential blade in the 3d print huset printer:
https://3dprinthuset.dk/the-bod/
The video linked form there shows it printing.(edit: I saw you have done, I will email him in case he is not monitoring the forum)
-
Yes, i asked him for an example of the gcode,
He did not respond.
I also asked him if he could shate the script. He said he could not share it. Due to restrictions with the company im sure.
This is ok.
We current have built a simple Gcode script that adds the values in for U acording to the vectors. For point to point. My friend Matt has been helping me with that.
However it seems that using arcs and sright lines is going to be the best option.
We will need to require that the U move is done already before the sright line is executed.
This is all fine and from what i can tell he is doing this on his concrete printer. As well as arc moves so it all looks smoth until it gets to a cornner.
But yes. If you can get a sample of his code that would be great. That would help us understand if he is using G2 &G3 commands. I think he is.
Thanks for the input and help everyone!
~Russ
-
@russ-gries Yeah i asked him as well and the post processing is proprietary which is understandable.
That said it sounds like you are on the right track. For straightlines it is simple as you say, take the two end points, calculate the tangent of the vector and then move the U axis accordingly. For a true arc (G2,G3) its more of a pain, probably break it down into segments?
-
@russ-gries You could try to contact this person also:
https://www.youtube.com/watch?v=1ZyMd8CaONQ&t=1s
http://www.3ders.org/articles/20170904-researchers-at-singapores-ntu-making-recycled-3d-printable-concrete-that-could-save-the-planet.html
It's a university of Singapore, maybe they are allowed to share code or knowledge.
In one of his articles he told that the 3D model he created was built from splines, so he already knew the values for the 4th axis. He used a CNC gantry printer supporting 4th axis as 3D printer:
http://sffsymposium.engr.utexas.edu/sites/default/files/2017/Manuscripts/ApproachingRectangularExtrudatein3DPrintingf.pdf
chapters 2 and 3.I searched a bit at the grbl corner, because what you do is similar to using the CNC A Axis, which is used in CNC to control the rotary table e.g., routing gears. There are some starting activities, but I did not find finished code yet.
-
To draw a circles in the same direction each time, you would need to increase U from e.g. 0 to 360 degrees for the first rotation, then 360 to 720 degrees for the second, and so on. For linear axes the maximum distance you set in M208 can be very high, so this shouldn't be a problem, although you may get some loss of accuracy when the U coordinate gets very high because of rounding error.
You could use G92 U0 to reset the assumed U position to zero occasionally, however this will have the side effect of causing motion to stop momentarily.
-
This post is deleted! -
@dc42 said in Requests for help: Gcode cam follower/ tangential knife control.:
To draw a circles in the same direction each time, you would need to increase U from e.g. 0 to 360 degrees for the first rotation, then 360 to 720 degrees for the second, and so on. For linear axes the maximum distance you set in M208 can be very high, so this shouldn't be a problem, although you may get some loss of accuracy when the U coordinate gets very high because of rounding error.
You could use G92 U0 to reset the assumed U position to zero occasionally, however this will have the side effect of causing motion to stop momentarily.
THANKS,
Can you explain this rounding error.
What is the maximum amount of numbers after the decimal place i can have for the axis?
I also noticed that this might be a problem.
Right now I'm using absolute accordance for U (soon to be A) so yes. There continuing to count up for the pulses.
It should be accurate for the most part but i would like to hear more about this rounding that happens im guessing in the firmware yes?
Becuse after 100's of loops it could get way off...
THANKS!
~Russ
-
For those interested, here is what our current script spits out.
This is just a simple circle.
G1 Z0
G1 X12.5629 Y-0.5687 U-92.8147 ( Delta = 42.1853 Val = 267.185 )
G1 X12.3774 Y-1.8196 U-98.4351 ( Delta = -5.62044 Val = 261.565 )
G1 X12.0701 Y-3.0462 U-104.065 ( Delta = -5.62971 Val = 255.935 )
G1 X11.6441 Y-4.2369 U-109.686 ( Delta = -5.62101 Val = 250.314 )
G1 X11.1034 Y-5.38 U-115.315 ( Delta = -5.62889 Val = 244.685 )
G1 X10.4533 Y-6.4647 U-120.936 ( Delta = -5.62107 Val = 239.064 )
G1 X9.7 Y-7.4804 U-126.563 ( Delta = -5.62692 Val = 233.437 )
G1 X8.8508 Y-8.4174 U-132.186 ( Delta = -5.62321 Val = 227.814 )
G1 X7.9138 Y-9.2666 U-137.814 ( Delta = -5.62818 Val = 222.186 )
G1 X6.8981 Y-10.0199 U-143.437 ( Delta = -5.62321 Val = 216.563 )
G1 X5.8134 Y-10.67 U-149.064 ( Delta = -5.62692 Val = 210.936 )
G1 X4.6703 Y-11.2107 U-154.685 ( Delta = -5.62107 Val = 205.315 )
G1 X3.4796 Y-11.6367 U-160.314 ( Delta = -5.62889 Val = 199.686 )
G1 X2.2529 Y-11.944 U-165.936 ( Delta = -5.62211 Val = 194.064 )
G1 X1.0021 Y-12.1295 U-171.564 ( Delta = -5.62795 Val = 188.436 )
G1 X-0.261 Y-12.1916 U-177.185 ( Delta = -5.6211 Val = 182.815 )
G1 X-1.524 Y-12.1295 U-182.815 ( Delta = -5.62956 Val = 177.185 )
G1 X-2.7749 Y-11.944 U-188.435 ( Delta = -5.62021 Val = 171.565 )
G1 X-4.0016 Y-11.6367 U-194.064 ( Delta = -5.62861 Val = 165.936 )
G1 X-5.1922 Y-11.2107 U-199.687 ( Delta = -5.62364 Val = 160.313 )
G1 X-6.3354 Y-10.67 U-205.313 ( Delta = -5.62542 Val = 154.687 )
G1 X-7.42 Y-10.0199 U-210.938 ( Delta = -5.62534 Val = 149.062 )
G1 X-8.4357 Y-9.2666 U-216.563 ( Delta = -5.62459 Val = 143.437 )
G1 X-9.3727 Y-8.4174 U-222.186 ( Delta = -5.62321 Val = 137.814 )
G1 X-10.222 Y-7.4804 U-227.811 ( Delta = -5.62482 Val = 132.189 )
G1 X-10.9753 Y-6.4647 U-233.437 ( Delta = -5.62657 Val = 126.563 )
G1 X-11.6254 Y-5.38 U-239.064 ( Delta = -5.62692 Val = 120.936 )
G1 X-12.166 Y-4.2369 U-244.689 ( Delta = -5.62517 Val = 115.311 )
G1 X-12.5921 Y-3.0462 U-250.31 ( Delta = -5.62052 Val = 109.69 )
G1 X-12.8993 Y-1.8196 U-255.94 ( Delta = -5.62967 Val = 104.06 )
G1 X-13.0849 Y-0.5687 U-261.56 ( Delta = -5.62084 Val = 98.4396 )
G1 X-13.1469 Y0.6944 U-267.19 ( Delta = -5.62944 Val = 92.8101 )
G1 X-13.0849 Y1.9574 U-272.81 ( Delta = -5.6205 Val = 87.1896 )
G1 X-12.8993 Y3.2083 U-278.44 ( Delta = -5.62922 Val = 81.5604 )
G1 X-12.5921 Y4.435 U-284.059 ( Delta = -5.61974 Val = 75.9407 )
G1 X-12.166 Y5.6256 U-289.692 ( Delta = -5.6323 Val = 70.3084 )
G1 X-11.6254 Y6.7688 U-295.309 ( Delta = -5.61706 Val = 64.6913 )
G1 X-10.9753 Y7.8534 U-300.938 ( Delta = -5.62944 Val = 59.0619 )
G1 X-10.222 Y8.8691 U-306.563 ( Delta = -5.62459 Val = 53.4373 )
G1 X-9.3727 Y9.8061 U-312.189 ( Delta = -5.62657 Val = 47.8107 )
G1 X-8.4357 Y10.6553 U-317.814 ( Delta = -5.62482 Val = 42.1859 )
G1 X-7.42 Y11.4086 U-323.437 ( Delta = -5.62321 Val = 36.5627 )
G1 X-6.3354 Y12.0588 U-329.058 ( Delta = -5.6207 Val = 30.942 )
G1 X-5.1922 Y12.5994 U-334.691 ( Delta = -5.63332 Val = 25.3087 )
G1 X-4.0016 Y13.0254 U-340.313 ( Delta = -5.62133 Val = 19.6874 )
G1 X-2.7749 Y13.3327 U-345.936 ( Delta = -5.62364 Val = 14.0637 )
G1 X-1.524 Y13.5183 U-351.56 ( Delta = -5.62413 Val = 8.43958 )
G1 X-0.261 Y13.5803 U-357.19 ( Delta = -5.62922 Val = 2.81036 )
G1 X1.0021 Y13.5183 U-362.81 ( Delta = -5.6205 Val = 357.19 )
G1 X2.2529 Y13.3327 U-368.44 ( Delta = -5.63011 Val = 351.56 )
G1 X3.4796 Y13.0254 U-374.064 ( Delta = -5.62347 Val = 345.936 )
G1 X4.6703 Y12.5994 U-379.686 ( Delta = -5.62211 Val = 340.314 )
G1 X5.8134 Y12.0588 U-385.311 ( Delta = -5.62479 Val = 334.689 )
G1 X6.8981 Y11.4086 U-390.94 ( Delta = -5.62906 Val = 329.06 )
G1 X7.9138 Y10.6553 U-396.563 ( Delta = -5.62303 Val = 323.437 )
G1 X8.8508 Y9.8061 U-402.186 ( Delta = -5.62321 Val = 317.814 )
G1 X9.7 Y8.8691 U-407.814 ( Delta = -5.62818 Val = 312.186 )
G1 X10.4533 Y7.8534 U-413.437 ( Delta = -5.62321 Val = 306.563 )
G1 X11.1034 Y6.7688 U-419.062 ( Delta = -5.62459 Val = 300.938 )
G1 X11.6441 Y5.6256 U-424.687 ( Delta = -5.62534 Val = 295.313 )
G1 X12.0701 Y4.435 U-430.313 ( Delta = -5.62542 Val = 289.687 )
G1 X12.3774 Y3.2083 U-435.936 ( Delta = -5.62364 Val = 284.064 )
G1 X12.5629 Y1.9574 U-441.565 ( Delta = -5.62861 Val = 278.435 )
G1 X12.625 Y0.6944 U-447.185 ( Delta = -5.62021 Val = 272.815 )On this one we keep the U on the same line, just for testing.
Indeed if we wanted to do it correctly we would need to have the U on its own line, so its going the correct direction before the move. we have tested both. I just dont like waiting for every stop.
Currently my U stepper has a gear down ratio of something like 1:100 . this makes it compact but it can not spin fast... I think if i had it moving faster it would look more smooth.
Say is there something I can do with the Jerk settings or anywhere else to make the moves smother? Even tho there are stops at every point with U on its own line in the code?
Thanks!
~Russ