# Best practise to open and close connection to Tic Controller

**URL:** https://forum.pololu.com/t/best-practise-to-open-and-close-connection-to-tic-controller/27340
**Category:** Motor controllers/drivers and motors
**Created:** [January 7, 2025, 10:44am UTC](https://forum.pololu.com/t/best-practise-to-open-and-close-connection-to-tic-controller/27340 "2025-01-07T10:44:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![astroalex](https://forum.pololu.com/letter_avatar_proxy/v4/letter/a/4bbf92/32.png) [@astroalex](https://forum.pololu.com/u/astroalex)
#### Post date: [January 7, 2025, 10:44am UTC](https://forum.pololu.com/t/best-practise-to-open-and-close-connection-to-tic-controller/27340/1 "2025-01-07T10:44:45Z")

</div>

Dear all,  
developing a program in c# for a T500 based on the TicDotNet and LibUsbDotNet libaries.  
Connection via USB, no serial or whatsoever.

Currently the command chain for accessing/starting the T500 is:

- open connection to device
- reinitialize
- energize
- clear\_driver\_error
- wait\_for\_device\_ready
- reset\_command\_timeout

for disconnecting:

- reset\_command\_timeout
- deenergize
- close connection

I want to understand what would be best practice to establish/open a connection to the TIC.  
Is above okay, too much or something missing? Same for disconnect.

Secondly I often get position uncertain flags which prevent me from using the controller / stepper as a device able to provide absolut positioning. Especially after above mentioned disconnect command and removing the Tic from USB and power. Do I miss something on the disconnect routine?

I though the Tic is storing the last position in memory even when no power supply or USB is connected.

Thanks in advance for clarification,  
Alex

---

<div class="post-metadata">

### Author: ![BrandonM](https://forum.pololu.com/user_avatar/forum.pololu.com/brandonm/32/609_2.png) [@BrandonM](https://forum.pololu.com/u/BrandonM)
#### Post date: [January 7, 2025, 9:03pm UTC](https://forum.pololu.com/t/best-practise-to-open-and-close-connection-to-tic-controller/27340/2 "2025-01-07T21:03:03Z")

</div>

Hello, Alex.

Your start-up procedure generally depends on your application and how you have the Tic configured. For example, if the Tic has just been powered up, you might only need to send an `energize` and `exit safe start` command. You typically shouldn’t need to clear driver errors; if you do, there is probably something else causing those errors that you should look into. Additionally, the `energize` command resets the command timeout, so sending `reset command timeout` again right after that is probably redundant (depending on how long you’re waiting for the device to be ready). Your shut down procedure looks okay (although you probably don’t need to reset the command timeout again before de-energizing).

The Tic does not store the last position through power cycles, and the `position uncertain` flag will be set any time the Tic is no longer in control of the motor’s position (e.g. when it is de-energized, power cycled, or after a `halt and hold` command).

Brandon
