Does a C block have knowledge of what step is being run?

Hi, Len.

I’ve developed both C & C++ code to reliably handle multiple component instances, multiple simulation steps, and shared resources (such as a data logging file). The C code version is heavily commented and, I hope, is clear.

What the code doesn’t explain is exactly why QSpice requires this approach. I’ve been working on a tutorial-style PDF but, well, code is easy, coherent explanations are hard. Maybe I’ll get that finished tomorrow.

Anyway, see the C-Block Basics #2 code on the dev channel of my GitHub repo. Let me know what you think.

–robert

3 Likes