Can TMC223 determine that motor is not connected?

Can TMC223 determine that motor is not connected?

Postby carsten » 09 Mar 2010, 18:36

Is it possible to determine that no motor is connected? I have written a program that will successfully move a linear drive when the motor is connected. However, when I disconnect the motor completely (i.e. nothing attached to OA1, OA2, OB1, or OB2) the code runs as though there were a motor attached, except that this (phantom) motor never stalls. In normal operation it would stall when the drive encounters the limit of travel in either direction. My code checks the following flags:
ElDef
TSD
UV2
CPFail
StepLoss
AbsStall
DelStallLo
DelStallHi

In addition, the program monitors Motion and ActualPos. I am not checking OVC1 or OVC2, since 1) these flags seem to be used to set ElDef, and 2) I don't expect an open circuit to draw any current at all.

Basically, the program sets up the motor and stall parameters, resets the position so that wherever the motor is at the moment is position 0, then sets up a new position of -32768. This will definitely make the drive hit the left barrier. When the stall is identified, the next position is +32767, so the drive will definitely hit the right barrier. Finally, the drive is positioned half-way between the two barriers, and the limits are reported. This works fine with a motor attached. Without the motor, the program performs the same operation, including reporting the limits, which now correspond to -32768 and +32767. While the motor is running the program is in a tight loop reading FullStatus1 and FullStatus2, and checking the flags mentioned above.
carsten
User
User
 
Posts: 12
Joined: 22 Jan 2010, 20:29

Re: Can TMC223 determine that motor is not connected?

Postby Olav Kahlbaum (TRINAMIC) » 11 Mar 2010, 09:12

Normally, the ElDef flag (and maybe also the StepLoss flag) will be set if the motor is not connected.
User avatar
Olav Kahlbaum (TRINAMIC)
Site Admin
 
Posts: 3363
Joined: 11 Aug 2006, 08:02

Re: Can TMC223 determine that motor is not connected?

Postby carsten » 11 Mar 2010, 16:28

Yes, that was my interpretation of the spec. But it is not what I see. What is normal, and what is not? Is it possible that the algorithm that determines if the flag should be set depends on certain other parameters? What seems to happen is that at different settings of Vmax, Vmin, Irun, etc. the flag may be set more often, while with other combinations it may not. I will try to investigate this some more when I have time.
carsten
User
User
 
Posts: 12
Joined: 22 Jan 2010, 20:29

Re: Can TMC223 determine that motor is not connected?

Postby TRINAMIC_BD » 11 Mar 2010, 18:09

When the Eldef Flag becomes set during motion, this might be, if the coil current of the motor cannot be reached, i.e. due to too high motor coil resistance or too high velocity. This is not a defect, but might indicate, thate the motor is operating with reduced torque and thus might lose steps.
User avatar
TRINAMIC_BD
Site Admin
 
Posts: 2442
Joined: 25 Jul 2006, 12:21
Location: Hamburg (Germany)


Return to TMC222 / TMC223 / TMC211

Who is online

Users browsing this forum: Bing [Bot] and 1 guest