tinyG Settings
-
- Posts: 48
- Joined: Mon Apr 09, 2012 5:47 pm
tinyG Settings
Does any have the settings they've used for the TinyG with 0.9 degree steppers?
Maybe Alden can add here what the settings he used are and we can stick them to the top of this sub-forum as this will likely be the most asked question?
Maybe Alden can add here what the settings he used are and we can stick them to the top of this sub-forum as this will likely be the most asked question?
Re: Settings
Good suggestion. Here are the settings I used in the video. Here's the $$ dump (dump all settings) from TinyG.
The ones you should change from the defaults are marked with /* comments */ in the listing below (there are some other comments as well)
To change a setting enter a $string at the command line. Here's how to change the step angle for motor 1 to 0.9 degrees:
I'm not 100% sure about the motor1 and motor 2 travel per revolution (the X and Y axes). I have not calibrated this. If someone has better values I will substitute.
UPDATE 6/17/12: Changed motor 1 and 2 TR to 36.54 as per Microwavesafe's tests
The ones you should change from the defaults are marked with /* comments */ in the listing below (there are some other comments as well)
To change a setting enter a $string at the command line. Here's how to change the step angle for motor 1 to 0.9 degrees:
Code: Select all
$1sa=0.9<cr>
UPDATE 6/17/12: Changed motor 1 and 2 TR to 36.54 as per Microwavesafe's tests
Code: Select all
tinyg[mm] ok> $$
[fb] firmware_build 338.12
[fv] firmware_version 0.93
[si] status_interval 200 ms [0=off]
[gpl] gcode_select_plane 0 [0,1,2]
[gun] gcode_units_mode 1 [0,1]
[gco] gcode_coord_system 1 [1-6]
[gpa] gcode_path_control 2 [0,1,2]
[gdi] gcode_distance_mode 0 [0,1]
[ea] enable_acceleration 1 [0,1]
[ja] junction_acceleration 200000 mm /* change */
[ml] min_line_segment 0.080 mm
[ma] min_arc_segment 0.100 mm
[mt] min_segment_time 5000 uSec
[ic] ignore_CR (on RX) 0 [0,1]
[il] ignore_LF (on RX) 0 [0,1]
[ec] enable_CR (on TX) 0 [0,1]
[ee] enable_echo 1 [0,1]
[ex] enable_xon_xoff 1 [0,1]
[g54x] g54_x_offset 0.000 mm
[g54y] g54_y_offset 0.000 mm
[g54z] g54_z_offset 0.000 mm
[g54a] g54_a_offset 0.000 mm
[g54b] g54_b_offset 0.000 mm
[g54c] g54_c_offset 0.000 mm
[g55x] g55_x_offset 0.000 mm
[g55y] g55_y_offset 0.000 mm
[g55z] g55_z_offset 0.000 mm
[g55a] g55_a_offset 0.000 mm
[g55b] g55_b_offset 0.000 mm
[g55c] g55_c_offset 0.000 mm
[g56x] g56_x_offset 0.000 mm
[g56y] g56_y_offset 0.000 mm
[g56z] g56_z_offset 0.000 mm
[g56a] g56_a_offset 0.000 mm
[g56b] g56_b_offset 0.000 mm
[g56c] g56_c_offset 0.000 mm
[g57x] g57_x_offset 0.000 mm
[g57y] g57_y_offset 0.000 mm
[g57z] g57_z_offset 0.000 mm
[g57a] g57_a_offset 0.000 mm
[g57b] g57_b_offset 0.000 mm
[g57c] g57_c_offset 0.000 mm
[g58x] g58_x_offset 0.000 mm
[g58y] g58_y_offset 0.000 mm
[g58z] g58_z_offset 0.000 mm
[g58a] g58_a_offset 0.000 mm
[g58b] g58_b_offset 0.000 mm
[g58c] g58_c_offset 0.000 mm
[g59x] g59_x_offset 0.000 mm
[g59y] g59_y_offset 0.000 mm
[g59z] g59_z_offset 0.000 mm
[g59a] g59_a_offset 0.000 mm
[g59b] g59_b_offset 0.000 mm
[g59c] g59_c_offset 0.000 mm
X origin offset: 0.000 mm
Y origin offset: 0.000 mm
Z origin offset: 0.000 mm
A origin offset: 0.000 deg
B origin offset: 0.000 deg
C origin offset: 0.000 deg
[1ma] m1_map_to_axis 0 [0=X, 1=Y...] /* motor 1 is mapped to X axis by default. No change needed */
[1sa] m1_step_angle 1.800 deg /* change if other than 1.8 degree motor is used*/
[1tr] m1_travel_per_revolution 36.54 mm /* UPDATE: changed to agree with Microwavesafe's tests* /
[1mi] m1_microsteps 8 [1,2,4,8]
[1po] m1_polarity 0 [0,1] /* may need to change depending on your setup and motor wiring */
[1pm] m1_power_management 1 [0,1] /* optionally change. Setting to 0 will keep power to the motors when idle */
[2ma] m2_map_to_axis 1 [0=X, 1=Y...] /* motor 2 is mapped to Y axis. Setting advice is same as motor 1 */
[2sa] m2_step_angle 1.800 deg
[2tr] m2_travel_per_revolution 36.54 mm /* UPDATE: changed to agree with Microwavesafe's tests* /
[2mi] m2_microsteps 8 [1,2,4,8]
[2po] m2_polarity 1 [0,1]
[2pm] m2_power_management 1 [0,1]
[3ma] m3_map_to_axis 2 [0=X, 1=Y...] /* motor 3 is mapped to Z axis. Setting advice is same as motor 1 */
[3sa] m3_step_angle 1.800 deg
[3tr] m3_travel_per_revolution 1.250 mm
[3mi] m3_microsteps 8 [1,2,4,8]
[3po] m3_polarity 0 [0,1]
[3pm] m3_power_management 1 [0,1]
[4ma] m4_map_to_axis 3 [0=X, 1=Y...] /* motor 4 is mapped to A axis, which you are not using. Set to '1' to create a second Y if needed */
[4sa] m4_step_angle 1.800 deg
[4tr] m4_travel_per_revolution 360.000 mm
[4mi] m4_microsteps 8 [1,2,4,8]
[4po] m4_polarity 0 [0,1]
[4pm] m4_power_management 0 [0,1]
[xam] x_axis_mode 1 [standard]
[xvm] x_velocity_maximum 16000.000 mm/min /* change. This is pretty fast */
[xfr] x_feedrate_maximum 16000.000 mm/min /* change */
[xtm] x_travel_maximum 170.000 mm /* change */
[xjm] x_jerk_maximum 5000000000 mm/min^3 /* change. Yes, that's 5 billion */
[xjd] x_junction_deviation 0.0500 mm (larger is faster)
[xsm] x_switch_mode 1 [0,1,2]
[xsv] x_search_velocity -1000.000 mm/min /* change */
[xlv] x_latch_velocity 100.000 mm/min /* change */
[xlb] x_latch_backoff 2.000 mm
[xzb] x_zero_backoff 1.000 mm
[yam] y_axis_mode 1 [standard] /* same advice as X axis */
[yvm] y_velocity_maximum 16000.000 mm/min /* change */
[yfr] y_feedrate_maximum 16000.000 mm/min /* change */
[ytm] y_travel_maximum 170.000 mm /* change */
[yjm] y_jerk_maximum 5000000000 mm/min^3 /* change */
[yjd] y_junction_deviation 0.0500 mm (larger is faster)
[ysm] y_switch_mode 1 [0,1,2]
[ysv] y_search_velocity -1000.000 mm/min /* change */
[ylv] y_latch_velocity 100.000 mm/min /* change */
[ylb] y_latch_backoff 2.000 mm
[yzb] y_zero_backoff 1.000 mm
[zam] z_axis_mode 1 [standard]
[zvm] z_velocity_maximum 1200.000 mm/min /* change */
[zfr] z_feedrate_maximum 1200.000 mm/min /* change */
[ztm] z_travel_maximum 50.000 mm /* change */
[zjm] z_jerk_maximum 50000000 mm/min^3 /* change - that's 50 million */
[zjd] z_junction_deviation 0.0500 mm (larger is faster)
[zsm] z_switch_mode 1 [0,1,2]
[zsv] z_search_velocity -400.000 mm/min
[zlv] z_latch_velocity 100.000 mm/min
[zlb] z_latch_backoff 2.000 mm
[zzb] z_zero_backoff 1.000 mm
[aam] a_axis_mode 1 [standard]
[avm] a_velocity_maximum 3600.000 deg/min
[afr] a_feedrate_maximum 3600.000 deg/min
[atm] a_travel_maximum -1.000 deg
[ajm] a_jerk_maximum 20000000 deg/min^3
[ajd] a_junction_deviation 0.0500 deg
[ara] a_radius_value 1.0000 deg
[asm] a_switch_mode 1 [0,1,2]
[asv] a_search_velocity -600.000 deg/min
[alv] a_latch_velocity 100.000 deg/min
[alb] a_latch_backoff -5.000 deg
[azb] a_zero_backoff 2.000 deg
[bam] b_axis_mode 0 [disabled]
[bvm] b_velocity_maximum 3600.000 deg/min
[bfr] b_feedrate_maximum 3600.000 deg/min
[btm] b_travel_maximum -1.000 deg
[bjm] b_jerk_maximum 20000000 deg/min^3
[bjd] b_junction_deviation 0.0500 deg
[bra] b_radius_value 1.0000 deg
[bsm] b_switch_mode 1 [0,1,2]
[bsv] b_search_velocity -600.000 deg/min
[blv] b_latch_velocity 100.000 deg/min
[blb] b_latch_backoff -5.000 deg
[bzb] b_zero_backoff 2.000 deg
[cam] c_axis_mode 0 [disabled]
[cvm] c_velocity_maximum 3600.000 deg/min
[cfr] c_feedrate_maximum 3600.000 deg/min
[ctm] c_travel_maximum -1.000 deg
[cjm] c_jerk_maximum 20000000 deg/min^3
[cjd] c_junction_deviation 0.0500 deg
[cra] c_radius_value 1.0000 deg
[csm] c_switch_mode 1 [0,1,2]
[csv] c_search_velocity -600.000 deg/min
[clv] c_latch_velocity 100.000 deg/min
[clb] c_latch_backoff -5.000 deg
[czb] c_zero_backoff 2.000 deg
tinyg[mm] ok>
Last edited by aldenhart on Sun Jun 17, 2012 3:04 pm, edited 1 time in total.
-
- Posts: 48
- Joined: Mon Apr 09, 2012 5:47 pm
Re: Settings
Perfect! Thanks.
I'll check the calibration when I get that far. Now who do we ask to get this stuck to the top?
I'll check the calibration when I get that far. Now who do we ask to get this stuck to the top?
-
- Posts: 48
- Joined: Mon Apr 09, 2012 5:47 pm
Re: tinyG Settings
The X axis mm per rev is out.
I did a quick calculation, 18 teeth * 2.032mm per tooth (pitch of mxl belt), which gives 36.576mm per revolution. However, when I used this it still seemed a bit out, so with a bit of tweaking I've found that $1tr=36.54mm gives me the best accuracy. Found by measuring the distance between a move that should be 150mm, but only on a ruler, so I could still be a little out.
Is calibration of this value specific to each and every Shapeoko? Has anyone else actually calibrated the movement? I'm still running version 0.90 is there anything in the updates to 0.93 that make a difference to positional accuracy in my case?
I did a quick calculation, 18 teeth * 2.032mm per tooth (pitch of mxl belt), which gives 36.576mm per revolution. However, when I used this it still seemed a bit out, so with a bit of tweaking I've found that $1tr=36.54mm gives me the best accuracy. Found by measuring the distance between a move that should be 150mm, but only on a ruler, so I could still be a little out.
Is calibration of this value specific to each and every Shapeoko? Has anyone else actually calibrated the movement? I'm still running version 0.90 is there anything in the updates to 0.93 that make a difference to positional accuracy in my case?
Re: tinyG Settings
Your tweaked value works well on my setup as well. I've updated the $1tr and $2tr settings to 36.54mm
You may want to get up to 0.93 release, the 338.12 build - which is on the github master branch. It should not affect the short-term accuracy test you have done, but there is a long term drift that was corrected between 338.11 and 338.12. Floating point order of operations can be a pain. Also, some of the settings have changed between 0.92 and 0.93.
- Alden
You may want to get up to 0.93 release, the 338.12 build - which is on the github master branch. It should not affect the short-term accuracy test you have done, but there is a long term drift that was corrected between 338.11 and 338.12. Floating point order of operations can be a pain. Also, some of the settings have changed between 0.92 and 0.93.
- Alden
Re: tinyG Settings
So is there an easy way to upload those settings? Can we modify them as commands like $si=200<cr> $gpl=0<cr> etc and do a file-> send?
Re: tinyG Settings
I looked through the settings, and most of it is similar to the defaults in my build 0.94, so the only things I've changed were
$4ma=1 (y axis)
$4tr=36.54 (same as the other y)
$4pm=1 (same as the other axis)
Also, my polarity should be 0 correct (or at least opposite what m2 is set to) because it is facing towards m2?
Can you think of anything else I need to do to get this up and running out of box for a dual y configuration? Also, any hope for y backlash compensation like on LinuxCNC?
$4ma=1 (y axis)
$4tr=36.54 (same as the other y)
$4pm=1 (same as the other axis)
Also, my polarity should be 0 correct (or at least opposite what m2 is set to) because it is facing towards m2?
Can you think of anything else I need to do to get this up and running out of box for a dual y configuration? Also, any hope for y backlash compensation like on LinuxCNC?
Re: tinyG Settings
Just as a note, I ended up having issues with the z axis similar to what mentioned on the tinyg forum, in that when I was trying to set the current on the z axis motor, it would turn for approximately 3 rotations and then it would stop turning and shake until I hit the reset button. I ended up changing the maximum z velocity (zvm) from 1200 to 900 and it worked great. There is some wobble, but this at least allowed me to rotate the axis!
Serial #: 1295, DW660 Router, TinyG controller, Dual Y Motors, ACME Z-Axis - First Cut - 2/19/2013
-
- Posts: 47
- Joined: Mon Oct 22, 2012 3:17 pm
Re: tinyG Settings
is it me, or does anyone else feel that doing this
jerk_maximum 5000000000 mm/min^3
seem a little excessive? Doesn't this pretty much equate to "Instantly go max speed"?
jerk_maximum 5000000000 mm/min^3
seem a little excessive? Doesn't this pretty much equate to "Instantly go max speed"?
Re: tinyG Settings
It's not excessive. It's only about 23 m/s^3. It means that, in the course of a second, the acceleration can raise from 0 to 23 m/s^2; in other words, don't change acceleration faster than about 2.4 g per second. You typically accelerate for much less than a second, because you are constrained by the maximum speed. Being jerk-limited instead of acceleration-limited means that the machine shakes much less while still being able to move about as fast. It's a bit hard to wrap your head around it; the best way is to experiment a little and see what the setting does (for instance, try a setting ten times lower and see how the moves change).
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk