ADI Trinamic Blog

We transform digital information into physical motion.

 
  • Newsletter
  • Blog Ethics
  • Legal/Impressum
  • Main Website
Menu
  • Newsletter
  • Blog Ethics
  • Legal/Impressum
  • Main Website
  • Want to get rid of the Limit Switches? Homing using the Encoder Deviation

    Limit switches require a lot of wiring, and are subject to wearout. With sensOstep PANdrives or modules using an external encoder the homing you can implement the homing with the following TMCL routine.

            VECT 21, DeviationIrq  //Define Interrupt on Encoder Deviation
            EI 21                  //Activate Interrupt
            EI 255
            
            SAP 212, 0, 5000       //max. Encoder-deviation
            ROR 0, 1000            //Start Motor
            
    Loop:                          //Empty Main Loop
            JA Loop
            
    DeviationIrq:                 //Interrupt Service Routine Motor is already haltet then
            SAP 0, 0, 0           //Set Position to 0 (homing)
            SAP 1, 0, 0
            SAP 209, 0, 0
            RETI
    

    Drive the motor with a low current towards a mechanical reference position. As soon as it contacts the reference position, it is stopped. The encoder deviation will go up and trigger an interrupt.

    As soon as the drives are stopped the interrupt service routine resets the position counter to zero.

    Tested with a PD-1140 with integrated sensOstep Encoder

    Share this:

    • Twitter
    • Facebook
    • LinkedIn
    • Pinterest
    • Print
    • Email

    Related

    August 5, 2015 / Jonas P. Proeger / 0

    Categories: Code Snippet, Tutorial

    Tags: Encoder, Homing, PANdrive, TMCL

    Working Student Video and Postproduction TRINAMIC presents EtherCAT® Slave Controller

    Comments are currently closed.

Recent Posts

  • Guest Blog: UBC Thunderbots
  • Guest Blog: TURAG
  • Guest Blog: School of Engineering Telecom Physics University of Strasbourg
  • Guest Blog: STAR Dresden
  • Pushing the Limits of Stepper Motor Control in 3D Printing

Social

  • View trinamic.mc’s profile on Facebook
  • View Trinamic_MC’s profile on Twitter
  • View trinamic’s profile on GitHub
  • View UC4SHA5_GAw1Wbm2T2NWpWbA’s profile on YouTube

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Newsletter

 

Info

Waterloohain 5
22769 Hamburg
+49 40 514 806 40

Tags

3D printer 3d printing arduino BLDC cDriver code code snippet coolStep drive Driver ease of use ethercat eval kit evaluation kit Field Oriented Control FOC GUI guide heliostat How-To IC linear stage motion controller motor driver open source hardware programming rtmi servo servo controller IC setup silentstepstick stealthChop stepper stepper motor stepper motor driver stepper motor driver ic stepper motors technology TMC4671 tmc5130 TMCL TMCL-IDE TRINAMIC TRINAMIC Motion Control tuning

Tag Cloud

    3D printer 3d printing arduino BLDC cDriver code code snippet coolStep drive Driver ease of use ethercat eval kit evaluation kit Field Oriented Control FOC GUI guide heliostat How-To IC linear stage motion controller motor driver open source hardware programming rtmi servo servo controller IC setup silentstepstick stealthChop stepper stepper motor stepper motor driver stepper motor driver ic stepper motors technology TMC4671 tmc5130 TMCL TMCL-IDE TRINAMIC TRINAMIC Motion Control tuning

Pages

  • Blog Ethics
  • Newsletter
  • Player Embed
  • Search Videos
  • User Videos
  • Video Category
  • Video Tag

Categories

  • Competition
  • Guest blog
  • Industry News
  • Jobs
  • Myths about Motors
  • Open Source Hardware
  • Products
  • Projects
    • DIY
    • University Projects
  • Research
  • Social
  • Software
  • technology
  • Trade Shows
  • Tutorial
    • Code Snippet
  • Uncategorized

Copyright © 2015 TRINAMIC BlogTheme created by PWT. Powered by WordPress.org

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.