Updating the Axis Configuration File
Many values and activities used in this system are based on the respective axis’ configuration. Those configurations are in the respective axis file found in the directory:
| /home/reuben/linuxcnc/configs/RoseEngineButlerLocal/REB_Axes |
The settings you should consider changing are:
- SCALE, and
- STEP_SCALE
The calculations and notes for each setting used is in the comments fields in the file for the respective axis.
Notes:
- It is recommended that you make a copy the current line, and comment it out (add a “#” as the first character in the line). For example:
| # SCALE = 17.778 | ← The old value, commented out |
| SCALE = 25 | ← The new value |

Virtual desktop pager
- Debian Linux has a virtual desktop pager which allows for task switching easily. This is the set of 4 blocks shown at the top of the screen towards the right. Each of these blocks is a workspace (or virtual desktop). The selected desktop has a dark grey background; the unselected three are lighter grey.
- When making changes, the recommended editor is Geany.
Setting the Scale
There are a number of factors used for setting the scale in the axis configuration files.
Driver Settings
The DM542T Digital Stepper Driver is usually set to
| ① | 1 step | = | 32 microsteps |
Stepper Motor Settings
The stepper motors typically used have these settings:
| 1 step | = | 1.8° | |||
| ② | 1 motor rev | = | 360° | = | 200 steps |
| 1.8° |
Based on ① and ②, the item driven by this stepper motor moves at the rate of:
| ③ | 200 | steps | X | 32 | microsteps | = | 6,400 | microsteps |
| motor rev | step | motor rev |
Gear Ratio
Usually the stepper motor has a gear with a different number of teeth from the driven gear (i.e., attached to the leadscrew). In that case, we need to calculate the ratio as it will affect the amount of imparted movement. For example,
| ④ | Gearing_Ratio | = | 48 teeth on driven gear | = | 4 |
| 12 teeth on stepper motor drive gear |
Which means that each revolution of the leadscrew takes 4 revolutions of the stepper motor’s spindle.
Leadscrew Settings
| What are Starts? This web page has a very good overview of starts and what that means for leadscrews. |
The leadscrew used in this example has these parameters:
| Pitch | = | 2 mm |
| Starts | = | 4 |
Therefore,
| ⑤ | Linear Movement | = | 2 | mm linear movement | X | 4 starts | = | 8 | mm linear movement |
| motor rev | motor rev |
Using These Values
Now we can use the values from ③, ④, and ⑤ in this formula to identify the needed values for the INC file.
| ⑥ | STEP_SCALE | = | 6,400 | microsteps | X | 4 | X | 1 | motor rev | = | 3,200 | microsteps |
| motor rev | 8 | mm linear movement | mm linear movement |
Or, expressed in imperial measurements:
| ⑦ | STEP_SCALE | = | 6,400 | microsteps | X | 4 | X | 1 | motor rev | X | 25.4 | mm | = | 325,100 | microsteps |
| motor rev | 8 | mm linear movement | inch | inch linear movement |
Within the file,
| ⑧ | ENCODER_SCALE | = | STEP_SCALE |
Therefore, the entries in the relevant include file are (no commas are used in the include file):
| STEP_SCALE | = | 325100 |
| ENCODER_SCALE | = | 325100 |
Reversing the Direction
If the axis is running in the wrong direction, you can reverse it by making the values negative.
| STEP_SCALE | = | -325100 |
| ENCODER_SCALE | = | -325100 |
Tuning the Settings
The calculations above should get very close to the expected movement for a selected axis. But, it is important to ensure the observed movement matches the calculated movement. To do this,
- Use the Rose Engine butler to move the axis a certain distance (e.g., 1 inch).
- Measure the actual movement.
- Adjust the STEP_SCALE & ENCODER_SCALE values as necessary. The formulas below can help with determining the new values.
| ⑨ | New STEP_SCALE | = | Current STEP_SCALE | X | Planned Movement Distance |
| Actual Movement Distance | |||||
| New ENCODER_SCALE | = | New STEP_SCALE |
Additional Information
Additional information about the files related to the axes is in the Rose Engine Butler Support Manual in the document about Files & Directories.
| spacer line |
|
eMail comments to |
