Internet PLC Forum
General => Technical support => Topic started by: acxysty on February 02, 2022, 07:27:08 AM
-
Dear all
We are trying to use both PWM and STEPMODE mode in the same program in order to drive a motor in one way or in another, the motor being wired on a single output.
We achieve easily both mode but we are facing some issues when changing from one mode to the other mode.
Shifting STEPMODE -> PWM mode works fine
Shifting PWM mode -> STEPMODE does not work.
At the end of the PWM mode we use instruction SETPMW ch,0,0 on order to stop the motor, followed by new STEPSEED + SETPMOVE instrictions but the output does deliver any signal...
It looks like the SETPWM mode cannot be overwrite ?
Any suggestions
Thank you in advance
Regards
Thierry
-
SETPWM ch, duty, freq
If you set the duty to < 0 it will reset the PWM channel
so please try: SETPWM 1, -1, 0
-
Thank you for your feedback.
We will try that and report.
Regards
Thierry
-
It works fine now using SETPWM 1,-1,0.
Thank you
Regards
Thierry