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
  • TMCL: Digital Inputs

    TMCL is the simple way to implement your motion control application. With this series of simple coding examples we want to provide you an easy start.

    This programs demonstrates how to read out the status of the general purpose inputs. Depending on the status of Port IN_0 is motor 0 turning right (IN_0 = 0) or turning left (IN_0 = 1).

    Before use: Restore Factory Defaults

    // *** Values that have to be adapted *** //
    amax = 1000					//max. acceleration (0 ... 2047)
    vmax = 2000					//max. speed (0 ... 2047)
    cmax = 100					//max. current (0 ... 255)
    
    // *** Initialization / Set up axis parameter *** //
    SAP 5, 0, amax				//set max. acceleration
    SAP 6, 0, cmax    			//set max. current (0 ... 255)
    
    // *** Main Loop *** //
    loop:
    	GIO 0, 0    			//read IN_0
    	COMP 0					//compare with 0
    	JC EQ, turnRight		//if equal jump to turn right
    	ROL 0, vmax				//if not equal turn left at vmax
    	JA loop					//jump to loop
    turnRight:
    	ROR 0, vmax				//turn right at vmax
    	JA loop					//jump to loop

    For more details look at TMCL_reference.pdf  at http://www.trinamic.com/software-tools/tmcl-ide

    Basic Commands, this sample can be used with any TMCL module with one or multiple axes tested with TMCM-1140, TMCM-1161, TMCM-6110.

    Share this:

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

    Related

    October 29, 2015 / Jonas P. Proeger / 2

    Categories: Code Snippet, Tutorial

    Tags: digital input, TMCL

    Great Presentation on TMC Technologies at Engineering Design Show Robotic Liquid Handling: Lab Automation with Micro-Stepping Motors

    Comments are currently closed.

    2 thoughts on “TMCL: Digital Inputs”

    • Harold van Dijken says:
      December 11, 2017 at 1:41 pm

      Please I need some more detailed help about the digital input regarding TMCM -1110, Steprocker. Can I configure all first 8 GIO for one steppermotor?
      How can I change an output pin into a input pin?
      Do I need to use pin 1 and 2 gio (GND) for making the pins low? How are the gio pins labeled for the script?

      I want to make the gio’s hi and low with a arduino. Do you know about examples, schema’s, wirings? General experiences about the I/O on the TMCM-1110 board?

      Thank you in advance.

    • Corné Bekkers says:
      December 22, 2017 at 4:42 pm

      Hi Harold van Dijken,

      SGP 78, 0, 0 will switch PWMU0..2 and PWMD0..2 to inputs.
      SGP 78,0,63 will switch PWMU0..2 and PWMD0..2 to outputs (one bit per pin)

      SIO, 0, 0 will switch off the internal pull-ups (default is on – also one bit per pin).
      With pull-up on you can use any GND on the board or supply GND etc. for pulling down the input (there is no galvanic isolation). I/Os are +5V tolerant. No problem to connect them to the +5V signals of an Arduino board (nevertheless, we currently have no appnote etc. describing this in more detail).

      Switching the pull-ups did not work correctly in last firmware. This has been fixed in the latest one (V1.09), which you can now find on the product page: https://www.trinamic.com/products/modules/details/tmcm-1110/.

      Enjoy the holidays!

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.