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.)
  • 0: Reset
  • 2: De-energized
  • 4: Soft error
  • 6: Waiting for ERR line
  • 8: Starting up
  • 10: Normal
0x01 Misc flags 1 unsigned
8-bit
The set bits of this variable provide additional information about the Tic’s status.
  • Bit 0: Energized – The Tic’s motor outputs are enabled and if a stepper motor is properly connected, its coils are energized (i.e. electrical current is flowing).
  • Bit 1: Position uncertain – The Tic has not received external confirmation that the value of its “current position” variable is correct (see Section 5.4).
  • Bit 2: Forward limit active – One of the forward limit switches is active.
  • Bit 3: Reverse limit active – One of the reverse limit switches is active.
  • Bit 4: Homing active – The Tic’s homing procedure is running.
  • Bits 5–7: reserved
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.)
  • Bit 0: Intentionally de-energized
  • Bit 1: Motor driver error
  • Bit 2: Low VIN
  • Bit 3: Kill switch active
  • Bit 4: Required input invalid
  • Bit 5: Serial error
  • Bit 6: Command timeout
  • Bit 7: Safe start violation
  • Bit 8: ERR line high
  • Bits 9–15: reserved
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.
  • Bits 0–15: These bits correspond to the same errors as those of the “error status” variable documented above.
  • Bit 16: Serial framing
  • Bit 17: Serial RX overrun
  • Bit 18: Serial format
  • Bit 19: Serial CRC
  • Bit 20: Encoder skip
  • Bits 21–31: reserved

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.
  • 0: Off (no target; not sending steps)
  • 1: Target position
  • 2: Target velocity
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.
  • 0: Power up
  • 1: Brown-out reset
  • 2: Reset line (RST) pulled low by external source
  • 4: Watchdog timer reset (should never happen; this could indicate a firmware bug)
  • 8: Software reset (by firmware upgrade process)
  • 16: Stack overflow (should never happen; this could indicate a firmware bug)
  • 32: Stack underflow (should never happen; this could indicate a firmware bug)
A “reset” command does not affect this variable.
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.
  • Bit 0: SCL
  • Bit 1: SDA
  • Bit 2: TX
  • Bit 3: RX
  • Bit 4: RC
  • Bits 5–7: reserved
0x48 Pin states unsigned
8-bit
States of the Tic’s control pins, i.e. what kind of input or output each pin is.
  • Bits 0–1: SCL
  • Bits 2–3: SDA
  • Bits 4–5: TX
  • Bits 6–7: RX
Each group of two bits encodes a number that represents one of the following states:
  • 0: High impedance
  • 1: Pulled up
  • 2: Output low
  • 3: Output high
Note that the reported state might be misleading if the pin is being used as a TTL serial or I²C pin. The state of the RC pin cannot be set.
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.
  • 0: Full step
  • 1: 1/2 step
  • 2: 1/4 step
  • 3: 1/8 step
  • 4: 1/16 step
  • 5: 1/32 step
  • 6: 1/2 step 100%
  • 7: 1/64 step
  • 8: 1/128 step
  • 9: 1/256 step
The different Tic models have different available step modes; see Section 4.3 and the step mode setting reference.
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.
  • Tic T500:
    • 0: Automatic
  • Tic T249:
    • 0: ADMD
  • Tic T825:
    • 0: Mixed
    • 1: Slow
    • 2: Fast
  • Tic T834:
    • 0: Mixed 50%
    • 1: Slow
    • 2: Fast
    • 3: Mixed 25%
    • 4: Mixed 75%
This variable is not valid for the Tic 36v4.
0x4C Input state unsigned
8-bit
State of the Tic’s main input.
  • 0: Not ready
  • 1: Invalid
  • 2: Halt
  • 3: Target position
  • 4: Target velocity
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.
  • 0: None
  • 1: Over-current
  • 2: Over-temperature
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.
  • Bit 0: Overtemperature
  • Bit 1: Overcurrent A
  • Bit 2: Overcurrent B
  • Bit 3: Predriver fault A
  • Bit 4: Predriver fault B
  • Bit 5: Undervoltage
  • Bit 7: Verification failure

Related Products

Tic T825 USB Multi-Interface Stepper Motor Controller (Connectors Soldered)
Tic T825 USB Multi-Interface Stepper Motor Controller
Tic T834 USB Multi-Interface Stepper Motor Controller (Connectors Soldered)
Tic T834 USB Multi-Interface Stepper Motor Controller
Tic T500 USB Multi-Interface Stepper Motor Controller (Connectors Soldered)
Tic T500 USB Multi-Interface Stepper Motor Controller
Tic T249 USB Multi-Interface Stepper Motor Controller (Connectors Soldered)
Tic T249 USB Multi-Interface Stepper Motor Controller
Tic 36v4 USB Multi-Interface High-Power Stepper Motor Controller (Connectors Soldered)
Tic 36v4 USB Multi-Interface High-Power Stepper Motor Controller

Related Categories

Tic Stepper Motor Controllers
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors