Requests for help: Gcode cam follower/ tangential knife control.
-
ok, I'm lost...
I set up the U axis,
I want to control it at the same time as XYZ ( delta) but it is doing all kinds of weird things.
here is my config.g can you see anything i need to change?
; Configuration file for dc42 Kossel updated RWG 11-25-16
; 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 backwards
M569 P4 S0 ; Drive 4 goes backwards
M574 X2 Y2 Z2 U2 S0 ; set endstop configuration (all endstops at high end, active high)0 = none, 1 = low end, 2 = high end.
M584 U4 ; ********** map U drive to second extruder driver.M665 R166.636 L343.788 B155 H405 X 0°, Y 0° ; set delta radius, diagonal rod length, printable radius, homed height and XY tower corrections
M666 X0.01 Y-0.45 Z0.44 Z0.00 U0 ; **********put your endstop adjustments here, or use auto calibration to find them
M92 X80 Y80 Z80 U90 ; Set axis steps/mm (20 tooth pulleys, 1.8deg/step motors)
M350 X64 Y64 Z64 U1 E16 I1 ; ( set E to Set 16x micro-stepping with interpolation
M906 X1500 Y1500 Z1500 U200 E800 I50 ; Set motor currents (mA) and increase idle current to 60% Russ change from default 60 to 10
M201 X1000 Y1000 Z1000 U3000 E1000 ; Accelerations (mm/s^2)
M203 X30000 Y30000 Z30000 U3000 E30000 ; Maximum speeds (mm/min)
M566 X1200 Y1200 Z1200 U3000 E1200 ; Maximum instant speed changes
G21 ; Work in millimetres
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves
;M557 R80 S18 ; ***moved to auto cal file!! define a grid with the specified radius and spacing (for delta printers)results are spored in file /sys/heightmap.csv; FAN CONTROL
M106 P0 I1 ; invert fan pwm; Thermistors and heaters
M305 P0 T100000 B3950 R4700 H0 L0 ; Typical Chinese bed thermistor. Put your own H and/or L values here to set the bed thermistor ADC correction.
M305 P1 T100000 B4388 R4700 H0 L0 ; E3Dv6 hot end. Put your own H and/or L values here if necessary to set the first nozzle thermistor ADC correction.
M301 H0 P20 I0.5 D1000 T0.85 W150 B5 ; PID settings for the bed
M301 H1 P10 I0.10 D100 T0.50 ; PID settings for extruder 0
M570 ; Allow extra heating time; Tool definitions
M563 P0 D0 H1 S"Extruder 1" ; Define tool 0
;M563 P1 D1 S"360 Drive" ; **********Define tool 1 ( use if tool is an extruder)
G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures
;M92 E90 ; ********** (Set extruder steps per mm 20 1024 ,this is 360 deg ) for first and second extruders ( use if tool is an extruder);Servo control
M307 H6 A-1 C-1 D-1 ; Disable heater channel 6 for use with servo CNC spindle. use M280 P6 Sxx the S is the ms use 0-200, I1 to invert Sig, must use on every command
M280 P6 S30 ; set the "throddle" to boot high, low, high. boots the esc
M280 P6 S5
M280 P6 S30;*** If you have a dual-nozzle build, un-comment the next 2 lines
;M563 P1 D1 H2 ; Define tool 1
;G10 P1 S0 R0 ; Set tool 1 operating and standby temperatures
;M92 E663:663 ; Set extruder steps per mm; Z probe and compensation definition
M558 P1 X0 Y0 Z1 H5 F300 T10000 I1 ; Z probe is IR and is not used for homing any axes, Z probe dive height 3mm, probing speed 300mm/min, travel speed 10000mm/min , Invert (I1) or do not invert (I0)
G31 X0 Y0 Z0 P500 ; Set the zprobe offset and threshold (put your own values here). For a delta, use zero X and Y offset.;*** If you are using axis compensation, put the figures in the following command
;M556 S78 X0 Y0 Z0 ; Axis compensation hereM207 S7.0 F3600 Z0.1 ; Set firmware retraction details
M572 D0 S0.1 ; set pressure advanceM208 X0 Y0 Z-30 U0 S1 ; ********** set minimum limments
;M208 X0 Y0 Z0 ; set max limments
T0 ; select first print headM501 ; load Eprom settings
I'm sure there are thing in there that are old, its not a clean file... i need it clean it up.
If i dont home U, i can get it to work, but if i home it it dose not run at all... i have know idea why.
here is my homeu.g
G91 ; use relative positioning
M220 S100 ; Set speed factor override percentage to 100% if its higher so the home dose not slam the top.
G1 S1 U360 F3000 ; move axis 360 and look for and stop
G1 S2 U20 ; move axis
G1 S1 U-20 ; move axis to find home again
G1 U10 F2000 ; move to X0 facing position ( change this number to set home where you want)
G90 ; back to absolute positioning
G1 U200 F500 ; center the head and set a reasonable feed rateany help is a huge plus!
Thank you!
~Russ
ps. the first time i hit home U the entire printer makes high pitch noises from the motor? know idea what that's all about but it messes up the motors... egh!
-
Which firmware version are you using? There was a bug with homing additional axes on a delta, that I fixed in one of the 2.02RC releases.
-
Thanks David,
Im using 1.19 i believe. Need to double check in the morning.
I can upgrade and see if that fixes it.
A few other Q.
-
In the mean time dose the config.g look good or did i miss somthing? Also the homeu.g
-
Can i set up one axis as relative while the rest are absolute?
-
If i send this command. G1 X50 Y50 U10 will the U complete before the X and Y or will they all finish at the same time?
-
Can i set up axis U to allways move at the same apeed all the time? And use the F command to change it other wise?
Such as using a G0 command to move it one speed and use G1 to move another? Thses will be fixed speeds for each? But only for the U axis?
If i can set up G1 and G0 for set speeds on U where do i do that?Thank you thank you thank you!
Im going crazy over here
But ill get there!
~Russ
-
-
-
Your M584 command that creates the U axis must come before the M574 command that refers to U. Also the M584 command should re-define the extruder drivers, otherwise driver 4 will be both an axis and an extruder.
-
No.
-
At the same time.
-
No. The F parameter determines the speed of the move as a whole. If there is any XYZ movement, then it is the speed of the XYZ component of the move.
-
-
Having read all above (but quite quickly to be honest), were I to attempt this, I would lean heavily on the G-Code concept that a G1 move does internal calculations to ensure that all axis specified on that move arrive at the same point at the same time when the move ends.
Also, A is normally the first rotational axis. Given RepRap flexibility, you could call it A or U... but I'm going to call it A below, as this is more normal CNC nomenclature.
Assuming A is defined as a rotational axis:
G1 Xnnn Ynnn Annn will smoothly rotate the A axis "in coordination with" the XY move. A series of these should do what you want.
Homing on A should be setup mechanically so that A can continuously rotate, and that "home" is triggered for a fraction of a degree of that rotation.
Relative vs. absolute? Doesn't really matter, when you realize an NIST standard rotational axis can be moved an infinite amount, limited only by the number of digits that the G-Code parser will accept.
That is, as you wind a coil, A might move through 0, many tiny increments, past 360, and just keep going. Far along in a coil, moving from 394857.2 to 394857.24 is perfectly legitimate.
Anyway, I'd build everything on those assumptions. You MAY already be doing that... but I wanted to make a pretty strong recommendation to NOT treat a rotational axis as an extruder, or anything else. Treat it as a rotational axis. G-Code standards will give you a big jump on what you are trying to accomplish.
-
DC42, does RepRap support rotational axis move coordination on G2?
Russ, if it does, that would make the G-Code much simpler. You could have a single line of G-code that does each "circle" of the coil. If it does, I'll post some examples.
By the way, for coil winding, you may wish to generate the G-Code with a simple script. PERL, Python, Java, etc.
-
@danal said in Requests for help: Gcode cam follower/ tangential knife control.:
DC42, does RepRap support rotational axis move coordination on G2?
RRF does not currently distinguish between linear and rotational axes.
G2 and G3 moves can specify movement along additional axes, which will be done linearly and coordinated with the XY motion.
-
Yes, this was also a question I had.
David,
If it was you trying to make what im trying to make, How would you set up and control a rotanial axis?
You deeply know the limitations of the firmware.
In the end it might not be possible to make fluid movements like im trying to do.
So what ever the best options i have ill stick with those. I want others to be able to use there Duet controler to use a tool end as im making.
At the moment My current limitation is that I want to position the tool in the direction I want to go and in order to do this the tool has to stop every time it has to turn. I'm not sure if there's any way to work around this problem?
If I use arcs instead of point to point then is it possible to command the tool to follow the Ark. In any fashion?
From what I can tell so far I'm going to have to stop every time I want to turn the tool
Thanks for your feedback I'll do whatever I can with what options I have and eventually may have to try a completely different platform and order to achieve this, but even if it's slow it will still allow people to make knife cutters and other things so it's still worth pursuing.
~Russ
-
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