How do I store a value in Simulink (sample hold)?
Show older comments
I have a motor control system in Simulink-Realtime (fixed execution 16 kHz) and would like to display the average power per motor revolution (at 1 rev/s). The averaging is easy with a discrete integrator, but how do I store the final value? I want an updated display every motor turn. Currently I solved it by placing a memory block inside a triggered subsystem, but this seems overly complicated to me. Is there a more efficient way of implementing a sample-hold? As it is a real time system (62.5 us max. task execution time), I have to watch out for inefficient coding.
Accepted Answer
More Answers (0)
Categories
Find more on Multicore Processor Targets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!