Fixed timestep for C++ block?

Hi, Andru.

I’ll be interested to see whether there are better ways than I’ve implemented in the Wave Source Component (Wave Source Component -- Proof of Concept Code - #16 by RDunn).

What I did there is set the time step in MaxExtStepTime() to force the first simulation point to happen “soon enough.” Then, as each sample is read from the file, I calculate/save the next time point. In Trunc(), I force the next time point to be at that saved time. But, frankly, I’m not sure this is how this is intended to work.

I considered using a pulse voltage source as an input clock (test for rising or falling edge in the main entry point). Perhaps that would work better for your needs.

–robert