- In the "Capture" tab of your Speedgoat PWM Capture block (e.g., IO397-50k), look for an option to output time (seconds or microseconds) instead of raw counts. If it’s available, turn it on.
- If there’s no built‐in time scaling, just pass the raw counts through a "Gain" block. Multiply by 1/(clock frequency) to get seconds.
- Make sure the capture block’s sample time and any triggering align with your main model.
when we are using PWM capture in speedgoat only duty cycle showing correctly remaining all showing wrong values in millions,how to capture correctly?
10 views (last 30 days)
Show older comments
when we are using PWM capture in speedgoat only duty cycle showing correctly remaining all showing wrong values in millions...how to capture correctly. related files attached

0 Comments
Answers (1)
MULI
on 3 Jan 2025
Edited: MULI
on 3 Jan 2025
I understand that you are seeing very large values for the measured period and yet the duty cycle appears correct. This happens because the FPGA capture block is outputting raw clock ticks instead of real time (seconds).
The duty cycle looks fine because it’s just a ratio, but if you want the period in seconds, you must either enable time scaling in the block or manually convert ticks to seconds.
You can follow the below steps to resolve this:
Hope this helps!
0 Comments
See Also
Categories
Find more on Electrical Block Libraries 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!