caveduck
semi old rocketeer
- Joined
- Jun 6, 2011
- Messages
- 1,827
- Reaction score
- 585
@new2hpr Thanks for the kind words! I did look into the encoder question when I was planning the project since I knew that DROs all use linear encoders, but I found pretty quickly that the motor shaft encoders are the favorite for moderate cost CNC closed-loop servo conversions. Cost vs accuracy is a lot better, and Integration is way easier. Retrofitting full-travel linears onto machines that weren't designed for it can require modifying the castings. DMM provides encoders with their motors; everything is plug-n-play. If you're curious about the higher-end linear encoders, there's a ton of good information on newall.com
Let's dive into some setup. Here is a screenshot from the DYN4 drive setup utility's configuration page. The two important things here are to put "Gear Number" == 4096, and to set the "Command Input Mode" radio button to "PULSE / DIR". I think the latter is Canadian for STEP/DIR. The one hidden-yet-important fact here is that when Gear Number == 4096, then you need to apply 16k (16384) pulses to move the motor 1 rev.
You don't need to worry about the gains/filter constants yet - the defaults are fine for no-load testing. We'll run the auto-tune later when it's hooked up to the machine.
The related place in Mach4 where you need the pulses-per-rev information is the Mach4 (not ESS) config Motors tab. You select one of the motors on the right (Motor0 here) and it displays a plot of the axis velocity vs time.
The fields at the bottom are crucial. This was covered in a previous post, but the values here are now correct Assuming you set Gear Number in the drive to 4096, then "Counts Per Unit" here needs to be:
CPUnit = 16384 * leadscrew_pitch. With 5 pitch leadscrews, this value is 81920
Velocity = max inches/minute. I'm using 400 based on some user reports
Acceleration = inches/minute per second. My value of 4.0 is just a guess for now.
CAVEAT: The UI for this dialog is flaky. Be aware that changing the counts/unit for a motor will silently auto-adjust the velocity and acceleration without updating the displayed values until you select a different motor and come back to the one you're editing.
Let's dive into some setup. Here is a screenshot from the DYN4 drive setup utility's configuration page. The two important things here are to put "Gear Number" == 4096, and to set the "Command Input Mode" radio button to "PULSE / DIR". I think the latter is Canadian for STEP/DIR. The one hidden-yet-important fact here is that when Gear Number == 4096, then you need to apply 16k (16384) pulses to move the motor 1 rev.
You don't need to worry about the gains/filter constants yet - the defaults are fine for no-load testing. We'll run the auto-tune later when it's hooked up to the machine.
The related place in Mach4 where you need the pulses-per-rev information is the Mach4 (not ESS) config Motors tab. You select one of the motors on the right (Motor0 here) and it displays a plot of the axis velocity vs time.
The fields at the bottom are crucial. This was covered in a previous post, but the values here are now correct Assuming you set Gear Number in the drive to 4096, then "Counts Per Unit" here needs to be:
CPUnit = 16384 * leadscrew_pitch. With 5 pitch leadscrews, this value is 81920
Velocity = max inches/minute. I'm using 400 based on some user reports
Acceleration = inches/minute per second. My value of 4.0 is just a guess for now.
CAVEAT: The UI for this dialog is flaky. Be aware that changing the counts/unit for a motor will silently auto-adjust the velocity and acceleration without updating the displayed values until you select a different motor and come back to the one you're editing.
Last edited: