======DC Motor Control====== DC motor control is implemented in myCNC software, and it useful for certain hardware such as the affordable THC lifters used on certain systems: {{:mycnc:dc-motor-control-004.png}} To turn on DC motor control, head into Settings -> Config -> Technology -> THC, and enable the DC Motor Control option: {{:mycnc:dc-motor-control-001.png}} When the checkbox is enabled, the Z+ and Z- buttons send commands to turn on the DC motor instead of controlling the Z axis via pulse-dir. This is also relevant in situations where it appears that the the pulse-dir Z axis does not move and the coordinates do not change despite pressing the buttons - it is then necessary to check whether this option has been incorrectly left enabled. Pictured below is the DC motor driver board: {{:mycnc:dc-motor-control-003.jpg}} There are two control signals - direction and PWM voltage (speed) reference signal. ====Gvariables used for DC control==== ^ Name ^ Global variable ^ Description ^ | GVAR_SET_THC_PWM | 8970 | Set a PWM number to work with the DC motor | ^ Value assigned to variable ^ | 0 | | Disable (switch to regular pulse-dir axis) | | 1 | | Enable PWM1 | | 2 | | Enable PWM2 | | 3 | | Enable PWM3 | ^ Name ^ Global variable ^ Description ^ | GVAR_SET_THC_PWM_Dir | 8971 | Set a DIR signal number | ^ Name ^ Global variable ^ Description ^ | GVAR_SET_DC_MOVE | 8972 | Give a Jog command, with the recorded variable being the movement speed | ^ Value assigned to variable ^ | Positive value | | Movement up | | Negative value | | Movement down | | 0 | | Stop |