Resource Library
AN-004: Using Hold Current with Step/Dir Modules
Preconditions
First of all, make sure that your module or PANdrive™ is equipped with appropriate firmware:
- for TMCM-1060, TMCM-1180, PD-1060, and PD-1180 firmware revision 4.36 or higher and
- for TMCM-1021, TMCM-1161, and PD-1161 firmware revision 1.15 or higher.
The firmware revision installed on the module or PANdrive can be determined using the TMCL-IDE (available on www.analog.com). Please perform a firmware upgrade if the firmware revision number of the module or PANdrive should be lower than mentioned above. Instructions on how to do this can be found in the TMCL-IDE User Manual (available on www.analog.com). Use the command Install OS of the TMCL-IDE for upgrading the firmware of your module or PANdrive.
How to Configure Hold and Run Current Values
The hold current and the run current values can be configured using TMCL commands. Two axis parameters have to be set:
- Axis parameter #6 for the run current and
- Axis parameter #7 for the hold current.
Both values have a range of 0… 255 where 0 means 0% and 255 mean 100% of the maximum current of the module. The values can be set using SAP (set axis parameter) commands. After setting these values they can be stored permanently using the STAP (store axis parameter) commands. This is useful when the module is to be connected via step/direction interface, only.
Use the direct mode function of the TMCL-IDE to issue the SAP and STAP commands.
How to Select a Step/Direction Mode
For selecting a step/direction mode, proceed as follows:
- Use the SAP command of the TMCL-IDE and select axis parameter 254.
- Set the parameter to 0 to turn off step/direction mode or to a value between 1 and 5 to select one of the options mentioned below. (The value range of the axis parameter 254 is 0 to 5.)
- This chosen step/direction mode can be stored permanently by using the STAP command.
Options for Step/Direction Mode Operation
Five options for switching between hold current and run current in step/direction operation have been introduced. Please find the description in the following paragraphs.
Non-Automatic Current Switching (Option 1)
Use the ENABLE input on the step/direction connector to switch between hold current and run current. This step/direction option (1) gives the full control of the motor current to the step/direction signal generator. For this purpose, a third signal from the step/direction signal generator is needed which determines if hold current or run current is to be used.
Automatic Current Switching (Option 2)
Automatic switching between hold and run current: after the first step pulse the module automatically switches over to run current, and a configurable time after the last step pulse the module automatically switches back to hold current. The ENABLE input on the step/direction connector does not have any functionality, because no extra signal is needed to determine which current is to be used.
Note: The time between the last step pulse and switching to hold current can be configured using axis parameter 214. This parameter is set in units of 10ms (so its default value of 200 means 2s). This can also be stored permanently using a STAP command.
Run Current Only (Option 3)
Always use run current, never switch to hold current. The ENABLE input on the step/direction connector does not have any functionality.
Attention: It is suggested not to use run current always, because the motor might extremely heat up!
Automatic Current Switching and Non-Automatic Driver Stage Switching (Option 4)
Automatic current switching like (2), but the ENABLE input is used to switch the driver stage completely off or on. This can be used for energy saving (when there is no holding torque needed) or for emergency switch-off.
Note: The time between the last step pulse and switching to hold current can be configured using axis parameter 214. This parameter is set in units of 10ms (so its default value of 200 means 2s). This can also be stored permanently using a STAP command.
Run Current Only and Non-Automatic Driver Stage Switching (Option 5)
Always use run current like (3), but the ENABLE pin is used to switch the driver stage completely off or on.
The step/direction option (5) is like option (3), but the step/direction generator has the ability to completely switch off the driver stage. This can be used for energy saving (when there is no holding torque needed) or for emergency switch-off.