when we are using PWM capture in speedgoat only duty cycle showing correctly remaining all showing wrong values in millions,how to capture correctly?

5 次查看(过去 30 天)
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

回答(1 个)

MULI
MULI 2025-1-3
编辑:MULI 2025-1-3
Hi @EV,
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:
  1. 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.
  2. 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.
  3. Make sure the capture block’s sample time and any triggering align with your main model.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Electrical Block Libraries 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by