585,604 active members*
3,201 visitors online*
Register for free
Login
Results 1 to 11 of 11
  1. #1

    Deviation in axis A and Z

    Good day!
    I use this driver to control suction cups, axis A and Z, using micro step 16.
    After performing the Zero Axis, all suction cups are aligned. After starting the loop 100 times (G code Axis A: G0 A7 G0 A0 G0 A-7 G0 A0. G code Axis Z: G0 Z7 G0 Z0 G0 Z-7 G0 Z0), KMotion show me axis A = 0, Z = 0, but in fact both right suction cups are lower than left. If I run this cycle again, the difference between suction cups will increase.
    As I understand, there is little deviation appeared in the controller-driver, and it is gathering in every cycle.

    Why can this happen? How can I fix this?

  2. #2
    Join Date
    May 2006
    Posts
    4045

    Re: Deviation in axis A and Z

    A common problem is to have improper Step/Direction Timing which can cause a drive to sometimes make one step in the wrong direction when the axis reverses direction. Each time this occurs the result is a 2 microstep shift.

    I see you have 3.3V TTL output mode selected. Those drives may work better using 5V sinking open collector mode.

    Those drives may support CW/CCW mode. Using that mode instead of Step/Direction will completly eliminate any Direction Setup Timing issues.

    How to select those modes is described here.
    TK
    http://dynomotion.com

  3. #3

    Re: Deviation in axis A and Z

    I did these:
    1. To use Open Collector - Step/Dir mode, changed in the Init file: ch2->OutputChan0=2; ch3->OutputChan0=3; for axis Z and A respectively. The motors DON’T move, but the KMotion shows me that axis moving. So I returned to previous settings ch2->OutputChan0=10; ch3->OutputChan0=11; and motors start moving as before.
    I use Kflop JP7 pins # 15-22 – these are 5V pins.

    2. To set the pulse the Step High, added in the Init file: FPGA(STEP_PULSE_LENGTH_ADD)=32 + 0x80; and start testing cycle. Result – the axis has deviation as on the photo.

    It seems my driver are not supported CW/CCW mode.
    What I should do, please help

  4. #4
    Join Date
    May 2006
    Posts
    4045

    Re: Deviation in axis A and Z

    Hi RuslanRobot,

    1. To use Open Collector - Step/Dir mode, changed in the Init file: ch2->OutputChan0=2; ch3->OutputChan0=3; for axis Z and A respectively. The motors DON’T move, but the KMotion shows me that axis moving.
    You may need to re-wire the connections to your drives. Unlike TTL mode Open Collector mode operates like a switch to GND. It does not source any current. You must wire +5V to the Drive for it to work. See diagram below. You haven't told us what Drives you have, what their specifications are, or how you wired it.




    I use Kflop JP7 pins # 15-22 – these are 5V pins.
    All KFLOP IO are actually 3.3V. The 5V Tolerant IO will not be damaged if 5V is applied.


    To set the pulse the Step High, added in the Init file: FPGA(STEP_PULSE_LENGTH_ADD)=32 + 0x80; and start testing cycle. Result – the axis has deviation as on the photo.
    I'm not sure what you mean. 32 would reduce the pulse width to about 2us. I would expect this to make things worse if anything. Are you saying it stayed the same?

    You might try the other polarity (remove the '+ 0x80') with:

    FPGA(STEP_PULSE_LENGTH_ADD)=63;

    This might increase the Direction Setup Time. See the scope traces below that show 5.7us Direction Setup Times for a drive that steps on a rising edge then a falling edge.


    Here is FPGA(STEP_PULSE_LENGTH_ADD)=63; // set the pulse time to 3.78?s
    (Driving a 1.5K pull up to 5V)



    Here is FPGA(STEP_PULSE_LENGTH_ADD)=63+0x80; // set the pulse time to 3.78?s and inverted
    (Driving a 1.5K pull up to 5V)




    It seems my driver are not supported CW/CCW mode.
    What drivers are you using and what are their specifications?
    TK
    http://dynomotion.com

  5. #5

    Re: Deviation in axis A and Z

    Can you tell me please , - is this connection scheme right?

    It seems to me, that in fact we connected something wrong.

  6. #6
    Join Date
    May 2006
    Posts
    4045

    Re: Deviation in axis A and Z

    That looks correct to me for 5V open collector mode. Is that now what you are changing it to? Or is that the way it was somewhat working with TTL mode? Do your Drives need to be enabled?
    TK
    http://dynomotion.com

  7. #7

    Re: Deviation in axis A and Z

    This connection scheme was the plan, but in fact we wrong connected. So we need to do in accordance with this scheme.
    No, my drives don't need to be enabled.

    Thank you!

  8. #8

    Re: Deviation in axis A and Z

    1. I bought another driver - Leadshine EM 402 (it supported CW/CCW mode). On the scheme, driver require VCC and ENABLE. What pins I have to connect on the Kflop to be connected to VCC and ENABLE?
    2. Please, give me the code FPGA to set the lenght of the signal 5 miliseconds (or little more than 5 ms).
    3. If I adding +0x80 to FPGA code, I chane the polarity of the signal?

  9. #9
    Join Date
    May 2006
    Posts
    4045

    Re: Deviation in axis A and Z

    Hi RuslanRobot,

    The specifications I found indicate the EM402 does not support CW/CCW mode and requires minimum of 10 microsecond pulses.

    KFLOP can only provide a maximum pulse of 3.78 microseconds (63 16.67MHz clocks)

    I don't believe that drive will work with KFLOP.

    VCC would be +5V

    Any unused output could be used for enable. Although the specification says it is not required.

    Yes adding 0x80 (bit7) inverts the pulse and direction signals.

    It would be helpful if you included links to your drives and their specifications.
    TK
    http://dynomotion.com

  10. #10

    Re: Deviation in axis A and Z

    Here is the specification on my driver (it is on russian, please translate it by google)
    https://darxton.ru/files/pdf/stepperdrive/EM402.pdf

    Please tell me, - will it work with Kflop?

  11. #11
    Join Date
    May 2006
    Posts
    4045

    Re: Deviation in axis A and Z

    Hi RuslanRobot,

    No. It specifies a 5us minimum pulse:

    Attachment 425014

    An English manual I found says 10us

    Attachment 425016

    Although listed as a feature I don't see how CW/CCW is supported.

    Regardless KFLOP only provides a 3.78us pulse width maximum.

    Most newer Leadshine Drives only require 2.5us Pulses.
    TK
    http://dynomotion.com

Similar Threads

  1. Deviation Problem
    By RAF. in forum BobCad-Cam
    Replies: 1
    Last Post: 03-25-2018, 07:20 PM
  2. Bridgeport EZTRAK DX 3 - Axis Deviation from Cutter Path
    By IamPatrick in forum Bridgeport / Romi Lathes
    Replies: 1
    Last Post: 02-27-2018, 11:58 PM
  3. deviation
    By oliver4711 in forum LinuxCNC (formerly EMC2)
    Replies: 4
    Last Post: 01-31-2010, 08:31 PM
  4. ~ 0.025 deviation in any length
    By s_volenszki in forum LinuxCNC (formerly EMC2)
    Replies: 7
    Last Post: 09-17-2008, 08:50 PM
  5. CNC deviation error
    By Alex S.A in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 10-22-2004, 08:10 PM

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
  •