Generating a Square Wave with Varying Frequency

I am looking to do control of a stepper motor using dSpace. I am using an Allegro A4982 driver chip. In order to control the stepping of the motor using this driver, I need to input a square wave to the driver. For example, a square wave of 50 Hz will give me a step rate of 50 pps. I want to be able to vary the frequency of the square wave "on the fly" so I can input some sort of motion profile input to the system. Any suggestions on how this might work?

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 11월 11일
편집: Azzi Abdelmalek 2013년 11월 11일

1 개 추천

you can also change the width of the pulse by adding another slider varying from 0 to 1

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2013년 11월 11일

편집:

2013년 11월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by