olzmom.blogg.se

Bmglib dll project 64
Bmglib dll project 64






bmglib dll project 64

The DLL block receives the values from PSIM as the input, performs the calculation, and sends the output back to PSIM. In this case, the DLL block is called only at the discrete times. However, when the inputs of the DLL block are connected to the output of one of these discrete elements (zeroorder hold ZOH, unit delay UDELAY, integrator I_D, differentiator D_D, z-domain transfer function block TFCTN_D, and digital filters), the DLL block is considered as a discrete element. PSIM calls the DLL routine at each simulation time step. Note that unused input nodes must be connected to ground. You are then ready to run PSIM with your own DLL Additional remarks : The input pin with a dot is for the first input in. Global variables above the function simuser (t,delt,in,out) are not allowed!!! You then have the following code:ħ /6 Note that DLL Blocks are in the menu Elements\Other\Function Blocks\ 11.

bmglib dll project 64

The maximum length of the input and output array "in" and "out" is 30. But DO NOT change the function name, number of variables, variable type, and sequence. You may change the variable names (say from "t" to "Time"). From the "Project" menu, go to "Add to Project"/"Files.", and select "msvc_dll.c" which is in the directory E\Test\msvc_dll.c.ĥ If you do not use the file msvc_dll.c but your own C code, please pay attention to the following : You need to have the following variables : /6 t: Time, passed from PSIM, by value delt: Time step, passed from PSIM, by value in: input array, passed from PSIM, by reference out: output array, sent back to PSIM (Note: the values of out can be modified in PSIM) The function name has to be declspec(dllexport) void simuser (t, delt, in, out). When asked "What kind of DLL would you like to create?", select An empty DLL project 7.








Bmglib dll project 64