603,344 active members*
3,773 visitors online*
Register for free
Login
Results 1 to 19 of 19
  1. #1
    Join Date
    Jan 2008
    Posts
    66

    Step and Dir settings

    Hi,

    I asked this over at the DMM section and I'm waiting on an answer as it's specific to their drives and Linuxcnc ver7. Maybe someone here can give me an idea what numbers to plug in?

    On the motor configuration page on pncconfig there is a stepper info configuration section. What values do I need to enter that are specific to the DMM DYN3 drives? This is for the Step On-Time, Step Space, Direction Hold and Direction Setup. Pncconfig has few different default settings to pick from or custom numbers I can enter. What is correct for my drives when I use them in step/dir mode? I'm using MESA 5i25, 7i85s and 7i84 for stepping,i/o's and encoder feedback.
    Here is a link to the stepgen section:STEPGEN
    All I see in the DMM manual is Pulse Train Specifications: T is greater or equal to 2us.
    I'm also not sure what units I'm working in on that stepper info screen.

    Maybe more importantly are the corresponding values that get output to the ini file as that's easier to edit.

    My main issue is lack of speed on the servos. I know something is off in the configuration. When I run the servo tuning in pncconfig the motors respond well and spin fast. However when I run linuxcnc I get joint following errors past 20 ipm. The motor and encoders are set for 20,000 steps per inch.
    Besides the proper step/dir signal and timing, what are some conservative values for max velocity, acceleration ,feed error etc that I should use with the MESA 5i25 and sister boards listed above to get me beyond 20ipm???

  2. #2
    Join Date
    Jan 2008
    Posts
    66

    Re: Step and Dir settings

    I have not received any feedback here or over at DMM.
    Can I assume that if the pulse is 2us, the value for step on time is 1000 and 1000 for step space? What about direction pulse??

  3. #3
    Join Date
    Feb 2008
    Posts
    644

    Re: Step and Dir settings

    Quote Originally Posted by OT-CNC View Post
    I have not received any feedback here or over at DMM.
    Can I assume that if the pulse is 2us, the value for step on time is 1000 and 1000 for step space? What about direction pulse??
    Arghh they should be able to specify their required timing...

    2 usec pulse means the active pulse width should be 2 usec (not 1 usec or 1000 nSec)

    I would try say 2.5 usec step pulse and 2.5 usec step space (2500 ns each) as a starting value
    since the specified minimum width may need some added margin.

    This will allow up to 200 KHz pulse rates. If this is insufficient for your setup you may need to
    shorten the step width and step space times.

    As far as direction setup and hold go, 10 usec (10000 ns) is usually fine for any modern drive
    and has little impact on performance (since direction only changes at low pulse rates)

  4. #4
    Join Date
    Jan 2005
    Posts
    15362

    Re: Step and Dir settings

    OT-CNC

    Your steps/per may be to high, what is your ballscrew pitch, 1:1 drive or are you using gearing

    In the Servo Drive Settings you need to set the Electronic Gear Setting to 500, it is best set at 500 for step/dir control

    Is the Encoder going to the Servo Drive or the Mesa Breakout Board
    Mactec54

  5. #5
    Join Date
    Jan 2008
    Posts
    66

    Re: Step and Dir settings

    PCW thank you for the response. I entered those settings. I'm still maxing out at very low rpms. Linuxcnc prompts me that stepgen max vel is too big for current step timing & pos scale, clipping to max possible.
    I'm still getting joint following errors around 18 ipm when I jog. I'm randomly changing numbers (ferror, max accel, max velocity) in the ini file and not seeing a change. Is there anything I need to turn off in the pid section if I want to use these drives as a hybrid step/servo system (encoder feedback for position error detection and closed loop within drive only)?

  6. #6
    Join Date
    Feb 2008
    Posts
    644

    Re: Step and Dir settings

    Quote Originally Posted by OT-CNC View Post
    PCW thank you for the response. I entered those settings. I'm still maxing out at very low rpms. Linuxcnc prompts me that stepgen max vel is too big for current step timing & pos scale, clipping to max possible.
    I'm still getting joint following errors around 18 ipm when I jog. I'm randomly changing numbers (ferror, max accel, max velocity) in the ini file and not seeing a change. Is there anything I need to turn off in the pid section if I want to use these drives as a hybrid step/servo system (encoder feedback for position error detection and closed loop within drive only)?
    what is your position scale? 2.5usec/2.5usec should get you to 200 KHz which is 6000 RPM with 2000 counts per turn drive scaling

  7. #7
    Join Date
    Jan 2005
    Posts
    15362

    Re: Step and Dir settings

    Quote Originally Posted by OT-CNC View Post
    I'm still getting joint following errors around 18 ipm when I jog. I'm randomly changing numbers (ferror, max accel, max velocity) in the ini file and not seeing a change. Is there anything I need to turn off in the pid section if I want to use these drives as a hybrid step/servo system (encoder feedback for position error detection and closed loop within drive only)?
    What Main Gain, Speed Gain & Integration Gain settings do you have set in the Servo Drive??

    Gear #= 500

    Drive ID 0=X axes 1=Y axes 2=Z axes

    On Position #127, these are the only settings that you use in the Servo Drive for Step/Dir

    Start your Max accel, & Max Velocity settings low & adjust them up until you start to get a Drive fault
    Mactec54

  8. #8
    Join Date
    Jan 2008
    Posts
    66

    Re: Step and Dir settings

    Mactec thanks for chiming in.
    The dmm drives seem to work fine, they are not losing position or faulting out. It's linuxcnc that gives me the errors as I have something off in the configuration. This may be a wrong value within linuxcnc or a parameter I set wrong in the drive. First I want to confirm that the pulsing is correct for the dmm drives. Would you agree with PCW on the step and direction pulse settings coming from his boards and Linuxcnc? (See post #3 above)
    To not confuse readers, the drive has it's own internal gearing numbers and encoder scale separate from the configurations in linuxcnc and they have to match up to work properly. Here is what I have and correct me if any of this is wrong.
    The drive is set internally for 1000 in the gear number and 1000 in the encoder pulse number. This translates to needing 4000 pulses from the controller for one revolution. The encoder also sends 4000 pulses per revolution back to the mesa card. My screw is 5 turns per inch, 5x4000=20,000 pulses per inch which gives me a step resolution of .00005" of travel per step.
    If the host controller steps at 200,000 pulses per sec/4000 pulses per rev, we get 50 rev per sec or 3000 rpm, correct?

    Now linuxcnc in the ini file wants steps per unit so I have entered 20,000 steps per inch both for step scale and encoder scale. This works and is correct with my jog motion. when I jog .2", the motor shaft turns 1 rev.
    I assume this part is correct.

    PCW,
    Where do I find the position scale? Is this the same as step scale in the ini? If so, its the 20,000 steps per inch. BTW, in the pncconfig, under axis scale calculations the motor steps per rev box defaults to 1000 regardless of what numbers I try to enter. I assume that's a bug? So I just edit in the ini file.

  9. #9
    Join Date
    Feb 2008
    Posts
    644

    Re: Step and Dir settings

    Quote Originally Posted by OT-CNC View Post
    Mactec thanks for chiming in.
    The dmm drives seem to work fine, they are not losing position or faulting out. It's linuxcnc that gives me the errors as I have something off in the configuration. This may be a wrong value within linuxcnc or a parameter I set wrong in the drive. First I want to confirm that the pulsing is correct for the dmm drives. Would you agree with PCW on the step and direction pulse settings coming from his boards and Linuxcnc? (See post #3 above)
    To not confuse readers, the drive has it's own internal gearing numbers and encoder scale separate from the configurations in linuxcnc and they have to match up to work properly. Here is what I have and correct me if any of this is wrong.
    The drive is set internally for 1000 in the gear number and 1000 in the encoder pulse number. This translates to needing 4000 pulses from the controller for one revolution. The encoder also sends 4000 pulses per revolution back to the mesa card. My screw is 5 turns per inch, 5x4000=20,000 pulses per inch which gives me a step resolution of .00005" of travel per step.
    If the host controller steps at 200,000 pulses per sec/4000 pulses per rev, we get 50 rev per sec or 3000 rpm, correct?

    Now linuxcnc in the ini file wants steps per unit so I have entered 20,000 steps per inch both for step scale and encoder scale. This works and is correct with my jog motion. when I jog .2", the motor shaft turns 1 rev.
    I assume this part is correct.

    PCW,
    Where do I find the position scale? Is this the same as step scale in the ini? If so, its the 20,000 steps per inch. BTW, in the pncconfig, under axis scale calculations the motor steps per rev box defaults to 1000 regardless of what numbers I try to enter. I assume that's a bug? So I just edit in the ini file.

    Is this a simple open loop step/dir setup? (I would not attempt a step/dir setup with encoder feedback until a simple step/dir setup is working)

    If you get following errors with a open loop setup it can be for a couple of reasons:

    1. Too tight following error limits
    2. Not enough velocity or acceleration headroom for the stepgen
    (stepgen maxaccel and maxvel should be about 25% greater than the per axis maxvel and maxaccel)
    3. Real time problems with the host computer (excessive latency)

  10. #10
    Join Date
    Jan 2008
    Posts
    66

    Re: Step and Dir settings

    I'm attempting step direction with encoder feedback. Encoder feedback mainly for actual dro position and detecting position error between both axis (lathe).

    Should I have purchased an analog +/- 10v board for control instead of the 7i85s?

  11. #11
    Join Date
    Feb 2008
    Posts
    644

    Re: Step and Dir settings

    Quote Originally Posted by OT-CNC View Post
    I'm attempting step direction with encoder feedback. Encoder feedback mainly for actual dro position and detecting position error between both axis (lathe).

    Should I have purchased an analog +/- 10v board for control instead of the 7i85s?
    Its not a hardware issue (a analog velocity mode servo will function much the same as a velocity mode stepgen running a drive with encoder feedback)

    I would still verify operation open loop before messing with encoder feedback

    If you do use encoder feedback, you must tune linuxcnc's PID loop (with FF1 and P) or you are guaranteed to get following errors
    You typically need to increase the following error limits when tuning so you can see what you are doing

    and speaking of seeing what you are doing you also need to setup halscope to plot the following error and velocity
    to be able to know what to adjust.

    Here is a simple tutorial for tuning velocity mode servos in LinuxCNC:

    Servo Tuning Tutorial

    ( replace any mention of analog outpuis with stepgen velocity and its basically the same )

  12. #12
    Join Date
    Jan 2008
    Posts
    66

    Re: Step and Dir settings

    PCW,
    Thank you for the input. I will do what you mentioned above.

  13. #13
    Join Date
    Jan 2005
    Posts
    15362

    Re: Step and Dir settings

    OT-CNC

    As I said in the other posts, your drive gear setting should be set to 500 not 1000 as you have it, this gives you the smoothest running, all you are doing with your setup is supplying a step/dir from your control to the servo drive, with your servo drive Gear setting at 500, you only need 10,000 Steps/Per/Rev setting to turn your Ballscrews ( 1 ) rotation

    You can experiment with your Gear setting once you have it all up & running,but for step/dir control 500 is the best setting to have, there is only ( 1 ) setting in your control that has to relate to this setting, that is the steps/per/Rev=10,000 in your case

    To find your resolution, if you have the 14 bit Encoders (16384 ) you use this number plus your Ballscrew pitch= your resolution
    Mactec54

  14. #14
    Join Date
    Jan 2005
    Posts
    15362

    Re: Step and Dir settings

    Quote Originally Posted by OT-CNC View Post
    I'm attempting step direction with encoder feedback. Encoder feedback mainly for actual dro position and detecting position error between both axis (lathe).

    Should I have purchased an analog +/- 10v board for control instead of the 7i85s?
    As PCW_MESA has said get it running without the Encoder feedback, first this you can play with once you get it going, having this will not detect position error
    Mactec54

  15. #15
    Join Date
    Jan 2008
    Posts
    66

    Re: Step and Dir settings

    mactec, how do I get my desired .00005" step resolution with your suggested 500 gear setting? At 500 I need 2000 steps from linuxcnc for I rev no? 2000steps x 5tpi=10,000 steps per inch =.0001" min step resolution no?
    Also, why do you say it's smoother running at 500?

  16. #16
    Join Date
    Jan 2008
    Posts
    66

    Re: Step and Dir settings

    Open loop works, I was able to get around 300 ipm at 20,000 steps per inch. I had the max_vel at the default value of 1 in my ini file. I pumped that up to 5. I thought that max_vel under the display section only affected the display of the slider. So much to learn!
    I'll have a closer look now at the closed loop configuration.

    Any idea how to expand the decimal display in axis to show an additional digit??

  17. #17
    Join Date
    Jan 2005
    Posts
    15362

    Re: Step and Dir settings

    Quote Originally Posted by OT-CNC View Post
    mactec, how do I get my desired .00005" step resolution with your suggested 500 gear setting? At 500 I need 2000 steps from linuxcnc for I rev no? 2000steps x 5tpi=10,000 steps per inch =.0001" min step resolution no?
    Also, why do you say it's smoother running at 500?
    You are not using a Stepper Motor System

    Your steps/per have nothing to do with your machine resolution, it does not matter what your Steps/Per are, they only need to be correct for what ever you have the gearing set to, 500 is the correct setting for Step/Dir use, ( DMM will also tell you this ) Your Encoder & Screw Pitch is what your machine resolution is, I said this already in the other posts, if you have the 14 Bit Encoder that is 16,384 CPR, or if you have there 17 Bit Encoder that is 65,536 CPR

    Your system is already closed loop the way you have it setup
    Mactec54

  18. #18
    Join Date
    Jan 2008
    Posts
    66

    Re: Step and Dir settings

    Mactec, thanks for the info but i'm getting confused.
    I know that the dmm drives are servo drives and that they are closed loop between the drive and servo. I'm using step/dir to control the servos currently. This is open loop from linuxcnc, without feedback from the encoders. I plan on using feedback from the encoders to make make it closed loop back to linuxcnc.

    I have the 14 bit encoders. Are you saying I should read in the encoder position and just let linuxcnc output the steps to satisfy the commanded position?

    I'm lacking some basic servo knowledge and how step/servo system works in linuxcnc.

    Regarding resolution, would my minimum rotation on the servo be .022 deg with the 14 bit encoder?

  19. #19
    Join Date
    Jan 2005
    Posts
    15362

    Re: Step and Dir settings

    Quote Originally Posted by OT-CNC View Post
    Mactec, thanks for the info but i'm getting confused.
    I know that the dmm drives are servo drives and that they are closed loop between the drive and servo. I'm using step/dir to control the servos currently. This is open loop from linuxcnc, without feedback from the encoders. I plan on using feedback from the encoders to make make it closed loop back to linuxcnc.
    Its still called a closed loop system, there is nothing open about it

    Quote Originally Posted by OT-CNC View Post
    I have the 14 bit encoders. Are you saying I should read in the encoder position and just let linuxcnc output the steps to satisfy the commanded position?
    There is no need to read the Encoder, if your Step/Per are correct, then what ever you input into the control is where your machine it is going to go

    All Linuxcnc is doing is supplying the step/Dir output, to your servo motor, this will move to that commanded position, it will work the same, no matter what way or how you close the loop, you will have the same result

    When using Step/Dir, your Steps/Per Setting is important, If this is off because of any mechanical, having any out of spec parts/backlash Etc, this number that you calculated, then needs to be changed to get precise positioning, these Steps/Per are driving the servo motors to wherever you tell it to go

    To close the loop in Linuxcnc, the Encoders would be connected direct to the control, & not to the drives, this gets complicated to setup
    Mactec54

Similar Threads

  1. CNC-Step High-Z (Heiz) S-720/T Mach3 Settings
    By gsattler in forum Commercial CNC Wood Routers
    Replies: 5
    Last Post: 10-25-2023, 05:12 AM
  2. Step by step guide settings Kflop (Russian language)
    By ukr_sasha in forum Dynomotion/Kflop/Kanalog
    Replies: 2
    Last Post: 04-29-2015, 05:23 PM
  3. Advantages of various step settings
    By cgallery in forum Stepper Motors / Drives
    Replies: 2
    Last Post: 08-31-2014, 02:22 PM
  4. Replies: 3
    Last Post: 04-10-2010, 01:23 AM
  5. Step/Direction pins should be Step FWD and Step BACK
    By rayscott in forum Mach Software (ArtSoft software)
    Replies: 6
    Last Post: 02-10-2010, 12:57 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •