Support » Tic Stepper Motor Controller User’s Guide »
7. Variable reference
The Tic maintains a set of variables that contain real-time information about its inputs, outputs, and state, and these variables, in conjunction with the user settings, determine the behavior of the controller. Some of these variables are displayed under the Status tab of the Tic Control Center. Some of the variables can be shown by running the Tic Command-line Utility (ticcmd) with the -s
or --status
option, and all the variables are shown if you additionally use the --full
option (e.g. ticcmd --status --full
). All variables can also be read via the TTL serial, I²C, and USB interfaces (see the “get variable” command in Section 8) for use by custom control programs, and our Tic library for Arduino includes functions that make it easy to read each variable.
General status variables
Offset | Name | Type | Description |
---|---|---|---|
0x00 | Operation state | unsigned 8-bit |
The overall state of the Tic. (See Section 5.4 for descriptions of these states.)
|
0x01 | Misc flags 1 | unsigned 8-bit |
The set bits of this variable provide additional information about the Tic’s status.
|
0x02 | Error status | unsigned 16-bit |
The set bits of this variable indicate the errors that are currently stopping the motor. The motor can only be controlled normally when this variable has a value of 0. (See Section 5.4 for error descriptions.)
|
0x04 | Errors occurred | unsigned 32-bit |
The set bits of this variable indicate the errors that have occurred since this variable was last cleared with the “get variable and clear errors occurred” command.
|
Step planning variables
See Section 5.1 for a more detailed explanation of the motion parameter variables.
Offset | Name | Type | Description | Units |
---|---|---|---|---|
0x09 | Planning mode | unsigned 8-bit |
The kind of step planning algorithm the controller is currently using.
|
|
0x0A | Target position | signed 32-bit |
Motor target position (−2,147,483,648 to +2,147,483,647 = −0x8000 0000 to +0x7FFF FFFF). This value is only meaningful if the “planning mode” variable indicates “target position”. | microsteps |
0x0E | Target velocity | signed 32-bit |
Motor target velocity (−500,000,000 to +500,000,000). This value is only meaningful if the “planning mode” variable indicates “target velocity”. | microsteps per 10,000 s |
0x12 | Starting speed | unsigned 32-bit |
Maximum speed at which instant acceleration and deceleration are allowed (0 to 500,000,000). | microsteps per 10,000 s |
0x16 | Max speed | unsigned 32-bit |
Maximum allowed motor speed (0 to 500,000,000). | microsteps per 10,000 s |
0x1A | Max deceleration | unsigned 32-bit |
Maximum allowed motor deceleration (100 to 2,147,483,647 = 0x64 to 0x7FFF FFFF). | microsteps per 100 s² |
0x1E | Max acceleration | unsigned 32-bit |
Maximum allowed motor acceleration (100 to 2,147,483,647 = 0x64 to 0x7FFF FFFF). | microsteps per 100 s² |
0x22 | Current position | signed 32-bit |
Current position of the motor (−2,147,483,648 to +2,147,483,647 = −0x8000 0000 to +0x7FFF FFFF). Note that this just tracks steps that the Tic has commanded the stepper driver to take; it could be different from the actual position of the motor for various reasons. | microsteps |
0x26 | Current velocity | signed 32-bit |
Current velocity of the motor (−500,000,000 to +500,000,000). Note that this is just the step rate and direction the Tic is sending to the driver, and it might not correspond to the actual velocity of the motor for various reasons. | microsteps per 10,000 s |
0x2A | Acting target position | signed 32-bit |
This is a variable used in the Tic’s target position step planning algorithm. It is accessible mainly for getting insight into the algorithm or for troubleshooting. This value could be invalid while the motor is stopped. | microsteps |
0x2E | Time since last step | unsigned 32-bit |
This is a variable used in the Tic’s step planning algorithms. It is accessible mainly for getting insight into the algorithms or for troubleshooting. This value could be invalid while the motor is stopped. | 1/3 µs |
Other variables
See Section 6 for details about the step mode and decay mode.
Offset | Name | Type | Description | Units |
---|---|---|---|---|
0x32 | Device reset | unsigned 8-bit |
The cause of the Tic’s last full microcontroller reset.
|
|
0x33 | VIN voltage | unsigned 16-bit |
Measured voltage on the VIN pin. | mV |
0x35 | Up time | unsigned 32-bit |
Time since the Tic’s microcontroller last experienced a full reset or was powered up. A “reset” command does not affect this variable. | ms |
0x39 | Encoder position | signed 32-bit |
Raw encoder count measured from the quadrature encoder inputs (TX and RX). | ticks |
0x3D | RC pulse width | unsigned 16-bit |
Reading from the RC pulse input. 0xFFFF means the reading is not available or invalid. | 1/12 µs |
0x3F | Analog reading SCL | unsigned 16-bit |
Analog reading from the SCL pin, if analog readings are enabled for it. 0xFFFF means the reading is not available. | 0 = 0 V, 0xFFFE ≈ voltage on 5V pin |
0x41 | Analog reading SDA | unsigned 16-bit |
Analog reading from the SDA pin, if analog readings are enabled for it. 0xFFFF means the reading is not available. | 0 = 0 V, 0xFFFE ≈ voltage on 5V pin |
0x43 | Analog reading TX | unsigned 16-bit |
Analog reading from the TX pin, if analog readings are enabled for it. 0xFFFF means the reading is not available. | 0 = 0 V, 0xFFFE ≈ voltage on 5V pin |
0x45 | Analog reading RX | unsigned 16-bit |
Analog reading from the RX pin, if analog readings are enabled for it. 0xFFFF means the reading is not available. | 0 = 0 V, 0xFFFE ≈ voltage on 5V pin |
0x47 | Digital readings | unsigned 8-bit |
Digital readings from the Tic’s control pins. A set bit indicates that the pin is high.
|
|
0x48 | Pin states | unsigned 8-bit |
States of the Tic’s control pins, i.e. what kind of input or output each pin is.
|
|
0x49 | Step mode | unsigned 8-bit |
Step mode of the Tic’s stepper driver (also known as microstepping mode), which defines how many microsteps correspond to one full step.
|
|
0x4A | Current limit | unsigned 8-bit |
Stepper motor coil current limit of the Tic’s stepper driver. | See Section 6. |
0x4B | Decay mode | unsigned 8-bit |
Decay mode of the Tic’s stepper driver.
|
|
0x4C | Input state | unsigned 8-bit |
State of the Tic’s main input.
|
|
0x4D | Input after averaging | unsigned 16-bit |
These variables are used in the process that converts raw RC and analog values into a motor position or speed. They are mainly for debugging your input scaling settings in an RC or analog mode. 0xFFFF means the reading is not available. | See Section 5.2. |
0x4F | Input after hysteresis | unsigned 16-bit |
||
0x51 | Input after scaling | signed 32-bit |
Value of the Tic’s main input after scaling has been applied. If the input is valid, this number is the target position or target velocity specified by the input. | Position: microsteps Velocity: microsteps per 10,000 s |
0x55 | Last motor driver error | unsigned 8-bit |
The cause of the last motor driver error. This variable is valid only for the Tic T249.
|
|
0x56 | AGC mode | unsigned 8-bit |
See the description of the corresponding setting in Section 6. | |
0x57 | AGC bottom current limit | unsigned 8-bit |
See the description of the corresponding setting in Section 6. | |
0x58 | AGC current boost steps | unsigned 8-bit |
See the description of the corresponding setting in Section 6. | |
0x59 | AGC frequency limit | unsigned 8-bit |
See the description of the corresponding setting in Section 6. | |
0xFF | Last HP driver errors | unsigned 8-bit |
The set bits of this variables indicate which errors caused the last motor driver error on the Tic 36v4. This variable is only valid on the Tic 36v4.
|