Issues with code using DLL block

Hello,

I have attached two files containing the code for two DLL blocks. When I simulate both in the same QSpice circuit, they produce different results. The discrepancy arises when I use a structure variable in the code instead of input or output variables created by the DLL block. The code in current_calc1.txt works fine, but the other does not.

Could someone please explain the differences between these approaches?

Thank you!


Mike
current_calc1.txt (2.9 KB)
current_calc2.txt (3.3 KB)

Variable type of m and n are different.