Best practise to open and close connection to Tic Controller

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

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