General > Technical support

PWM and STEPMODE

(1/1)

acxysty:
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

support:

SETPWM  ch, duty, freq

If you set the duty to < 0 it will reset the PWM channel

so please try:  SETPWM 1, -1, 0

acxysty:
Thank you for your feedback.
We will try that and report.
Regards
Thierry

acxysty:
It works fine now using SETPWM 1,-1,0.
Thank you
Regards
Thierry

Navigation

[0] Message Index

Go to full version