Post Go back to editing

Limit switch

Category: Software
Software Version: TMCL-IDE 4.11.0

Dear Sir or Madam,

I am trying to control a linear stage with a stepper motor using a TRINAMIC TMCM-102-IF motion controller, TMCL-IDE 4.11.0 software, and a USB connection in Direct Mode. Controlling the motion itself is no problem. However, I am experiencing an issue when using the limit switches.

When a limit switch is activated, the stage pulls the corresponding signal line from +5 V to 0 V (active low). The controller correctly detects the switch state, and I can read the status in the TRINAMIC software.

By default, the limit switches are ignored (Parameters 12 and 13, "Stop switch disable", set to 1). After manually setting Parameters 12 and 13 to 0, the limit switches worked correctly the first time they were activated. When a switch was triggered, the stage stopped and the controller correctly blocked further movement toward that switch.

However, after moving the stage back toward the center, motion in that direction remained blocked, even though the switch was no longer activated.

I repeated the test with the opposite limit switch and observed the same behavior. After triggering limit switch 2, movement toward limit switch 2 was permanently blocked as well. As a result, both directions are now blocked.

I have verified the following:

  • The wiring is correct.
  • When the limit switches are ignored (Parameters 12 and 13 set to 1), the stage operates normally.
  • When limit switch monitoring is enabled, the stage does not move (since both directions are blocked)
  • If only one limit switch is ignored, movement in the corresponding direction is possible.
  • The stage provides the correct signals at both switches: +5 V when inactive and 0 V when active (verified with a voltmeter).
  • The controller correctly reports the state of both switches in the TRINAMIC software.

It appears that activating a limit switch sets an internal status or parameter that prevents further motion in that direction. However, when the switch is released, this status does not seem to be cleared automatically.

I have already tried the following:

  • Rebooting the controller
  • Clearing the error flags (Parameter 36)
  • Restoring the factory settings (Parameter 137)

Unfortunately, none of these actions resolved the issue. Motion in both directions remains blocked.

Has anyone experienced a similar problem or knows how to reset the limit-switch status so that motion is re-enabled after the switch is released?

Thank you in advance for your help,

Markus