Feature request: DLL block with matching capability of C-script

Hi,

I am Arief, I am currently using C-script in all of my digital control sim. And I so far not quite liking the coding interface of C-script.

The reason I am using C-script instead of DLL is because I need the Discrete-Variable Sampling Time (Ts = -2) which I use to control the C-script sampling and accurately emulate MCU PWM generation method.

Currently, as a workaround, I put all my code in and external .c code, then only write a small piece of code inside the C-script to invoke my .c file. While it helps a bit, but not able to compile it in external IDE (i.e VScode) is really a bummer.

Please suggest on how to improve the workflow.

Thanks

Arief

Hi Arief,

Thanks for your feedback.

Could you provide a minimal example that demonstrates the issue? It would help us better understand the limitation you’re running into.

For example, in this discussion, I demonstrate a similar SIL-style workflow. The way the code is structured does not prevent me from compiling it as part of a standalone MCU project using an external IDE.

Seeing a minimal example of your use case would help us understand what is preventing you from doing this and provide more targeted guidance.

Hope this helps!