2 questions tic driver

Hello,

question1:
I have a tic249 and a tic36v4 stepper motor driver. Is there a way to retrieve the current position of the stepper motor from their memories?

question2:
I am running stepper motors with mentioned drivers above but want to deenergize them once the position command had ended. For example when I am through runing: ticcmd -d 00357615 --resume --position x the driver is still energized. I tried putting the deenergize function right after the above line but it just didn’t run the whole thing. Please let me know how to solve these issues.

-Farhad

Hello,

question3:
I am trying to find a getter function that can determine whether a limit switch is on or off in my python script. I can find an example script in the stepper motor driver tic manual for running tic code in python but nothing for how to get the limit switch status.

-Farhad

Hello, Farhad.

  1. You can use the “Get variable” command to read the “Current position” variable. Information for the “Get variable” command can be found in the “Command reference” section of the Tic user’s guide, and details for the “Current position” variable can be found in the “Variable Reference” section. Since you are using ticcmd, you can use the -status or -status --full options to get the information back about the variables, as described in the “Command reference” section for the “Get variable” command. If you are doing this programmatically, I recommend having your program run ticcmd -status --full, parsing the output, and extracting the information you are interested in. You can find information about doing that in this post from David.

  2. The de-energize command will de-energize the motor when it is received, so if it is sent before the motion is completed, it will interrupt the commanded motion. You might try polling the “Current position” and waiting until it matches your commanded target position before sending the de-energize command.

  3. In the status output described in #1 above, you can look at bits 2 and 3 of the “Misc flags 1” variable to see if the forward or reverse limit switch is active respectively. Alternatively, you can look at the relevant bits of the “Digital readings” variable, which each hold a digital reading from one of the Tic’s control pins.

Brandon