Control a Servo with Speedgoat IO135
Show older comments
I am trying to control a simple servo motor (FS90R) using MATLAB Simulink and a Speedgoat IO135 machine, but I can't figure out how to output the appropriate PWM signal. The built-in Simulink PWM block does not compile for the IO135 machine. Does anyone have any tips on generating a 50Hz signal with 5-10% duty cycle for controlling the servo? Thanks!
Accepted Answer
More Answers (1)
Alex
on 5 Mar 2025
0 votes
2 Comments
Dimitri MANKOV
on 6 Mar 2025
Hi Alex,
It feels wrong to mis-use an analog output channel this way. Besides sampling rate considerations, there is also the quesiton of synchronization, i.e., of making sure that the frame of "high/low voltage" values passed to the IO135 module is generated correctly and output without any time shifts. Moreover, this approach would require you to use DMA, which will generate a 1 model step delay in your algorithm. While it might work, it just doesn't feel like a clean solution.
Dimitri
Alex
on 6 Mar 2025
Categories
Find more on Real-Time Deployment and Code Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!