Tic36v4 & OSX Controller software

Been using the Tic 36v4 in an application, so far only designing with the gui. Now, moving on to create some shell scripts, I can’t seem to control the motors, or engage them using the CLI. The cli will return a status okay. So it’s connected okay, but can’t engage or control the motors. When I switch back to gui, all is fine.

For what it’s worth, I don’t see a cu.usbmodemfa121 file in dev if that’s what it defaults to for virtual usb. But why then is the GUI working perfectly?

Thoughts?

Been using the Tic 36v4 in an application, so far only designing with your GUI. Now, moving on to create some shell scripts, I can’t seem to control the motors, or engage them using the CLI. The command in terminal will return a status okay. So it’s connected, but can’t engage or control the motors. When I switch back to gui, all is fine.

For what it’s worth, I don’t see a cu.usbmodemfa121 file in dev. If the program defaults to that virtual usb, but then why would the GUI work?

Your help, Brandon or anyone is much appreciated.
j.

Hello.

I merged your two posts since they contained mostly the same contents.

There are a couple of reasons I suspect could be causing the motor to not respond, including the safe-start error or the command timeout error. I recommend reading through the “Setting up USB control” section of the Tic user’s guide if you have not done so already.

If you continue having problems, can you tell me what commands are you sending and how the Tic responds (if at all)? Is the red LED lit on the Tic? When you check the status (e.g. ticcmd -s) does it show any “Errors currently stopping the motor”? Also, could you post a copy of your settings file? You can save your settings file by selecting the “Save settings file…” option within the “File” menu of the Tic Control Center while the board is connected.

Brandon

Thank you Brandon and also for your patience as I get familiar with your products.

Yes, it was a need to energize and jump out of safe start. But the docs are slim so I had a couple Qs if you wouldn’t mind. Thank you in advance for your time, especially these days…

  1. I noticed that no matter what I set the output min and max to, (beyond the 200) - it still only needs 200 full steps to complete a rotation. I thought setting it to 1024 might allow a full rotation to be 1024 steps. It seems the only resolution increase is by half, quarter steps, etc. But those are all in increments of 200?
    (And is it that this value is only for RC?? and we are limited to 200 clicks for 360 degrees. Frankly I’d just like 360)

  2. Here’s an example of a shell script to demonstrate. It works… any suggestions on use of resume timeouts and such?

#!/bin/bash
#This is a test of the command list.

ticcmd -d 00298741 --reset-command-timeout

#Mark current position and set it as Zero.
ticcmd -d 00298741 --halt-and-set-position 0

ticcmd -d 00298741 --resume 
sleep 0.5 # Waits 0.5 seconds.

ticcmd -d 00298741 --position-relative 200
sleep 3.0 

ticcmd -d 00298741 --position-relative 100
sleep 1.0 

ticcmd -d 00298741 --position-relative 50
sleep 1.0 

ticcmd -d 00298741 --position-relative 25
sleep 1.0 

ticcmd -d 00298741 --position-relative 5
sleep 1.0 

ticcmd -d 00298741 --position-relative 100
sleep 1.0 

ticcmd -d 00298741 --position-relative 5
sleep 1.0 

ticcmd -d 00298741 --position-relative 115
sleep 1.0 

ticcmd -d 00298741 —-enter-safe-start

ticcmd --status --full

Name: Tic 36v4 High-Power Stepper Motor Controller
Serial number: 00298741
Firmware version: 1.07

t# Pololu Tic USB Stepper Controller settings file.
# https://www.pololu.com/docs/0J71
product: 36v4
control_mode: serial
never_sleep: false
disable_safe_start: false
ignore_err_line_high: false
auto_clear_driver_error: true
soft_error_response: decel_to_hold
soft_error_position: 0
serial_baud_rate: 9600
serial_device_number: 14
serial_alt_device_number: 0
serial_enable_alt_device_number: false
serial_14bit_device_number: false
command_timeout: 0
serial_crc_for_commands: false
serial_crc_for_responses: false
serial_7bit_responses: false
serial_response_delay: 0
vin_calibration: 0
input_averaging_enabled: true
input_hysteresis: 0
input_scaling_degree: linear
input_invert: false
input_min: 0
input_neutral_min: 2015
input_neutral_max: 2080
input_max: 4095
output_min: -200
output_max: 200
encoder_prescaler: 1
encoder_postscaler: 1
encoder_unlimited: false
scl_config: default
sda_config: default
tx_config: default
rx_config: default
rc_config: default
invert_motor_direction: false
max_speed: 2000000
starting_speed: 0
max_accel: 40000
max_decel: 0
step_mode: 1
current_limit: 215
current_limit_during_error: -1
auto_homing: false
auto_homing_forward: false
homing_speed_towards: 1000000
homing_speed_away: 500000
hp_enable_unrestricted_current_limits: false
hp_toff: 50
hp_tblank: 0
hp_abt: true
hp_tdecay: 16
hp_decmod: auto_mixed

Status

Name:                         Tic 36v4 High-Power Stepper Motor Controller
Serial number:                00298741
Firmware version:             1.07
Last reset:                   Power-on reset
Up time:                      2:36:03

Encoder position:             0
RC pulse width:               N/A
Input state:                  Position
Input after averaging:        N/A
Input after hysteresis:       N/A
Input before scaling:         N/A
Input after scaling:          600
Forward limit active:         No
Reverse limit active:         No

VIN voltage:                  12.009 V
Operation state:              Normal
Energized:                    Yes
Homing active:                No

Target position:              600
Current position:             599
Position uncertain:           No
Current velocity:             282842
Max speed:                    2000000
Starting speed:               0
Max acceleration:             40000
Max deceleration:             40000
Acting target position:       600
Time since last step:         90000
Step mode:                    Full step
Current limit:                215 mA

The “output_min” and “output_max” values in the settings file are the “RC and analog scaling” values in the “Input and motor settings” tab of the Tic Control Center. They do not control how many steps per revolution, but how many steps correspond to the min and max input values for those input modes.

The number of steps per revolution is a function of the stepper motor you are using and does not depend on what input method you are using with the Tic controller. For example, if you are using a 200 step per rotation motor, that is the number of full steps it takes to make a rotation; the driver can then divide each step into partial steps. For example, the Tic 36v4 supports microstep resolutions from full step, down to 1/256 steps. When set to 1/256 microstep mode, it would take 51200 to make a single revolution.

I do not see any obvious problems with your shell script; did you have any particular concern about it?

Brandon