-
TMCL: Turn one Motor Left and Right
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 program demonstrates how to turn one motor for 5 seconds left and then 5 seconds right.
Before use: Restore Factory Defaults
// *** Values that have to be adapted *** // vmax = 2000 //max. speed (0 ... 2047) amax = 1000 //max. acceleration (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 // *** Main Loop *** // loop: ROL 0, vmax //turn motor left WAIT TICKS, 0, 500 //wait 5 seconds. 500 * 10ms MST 0 //stop motor ROR 0, vmax //turn motor right WAIT TICKS, 0, 500 //wait 5 seconds. 500 * 10ms MST 0 //stop motor 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.
Related
September 3, 2015 / Jonas P. Proeger / 0
Categories: Code Snippet, Tutorial
Tags: TMCL
Getting Started with your brand new TRAMS Arduino Mega RepRap Shield TMCL: Turn One Motor to an Absolute Position
Comments are currently closed.