[Error]Help With DLL

Hello Guys,

I made a DLL file with C code (I’m implementing a PLL) but when I try to load the DLL on PSIM “General DLL” Block I receive the error: “Unable to Access the function “RUNSIMUSER” in DLL file: C://…”. If someone could please help me i’ve tried to change the name of my C function to RUNSIMUSER but it didn’t work.


1 Like

Hi Thiago,

I apologize for the delayed response, please check that the dll you have compiled has the same bits as the PSIM version you are using. You can check the bits of you PSIM by looking in Help->about PSIM, if you see no bits defined you are using 32-bit. The 64 bit version will be clearly labelled. You dll needs to be 32-bit if you have 32 bit PSIM. If you have 64-bit PSIM you need to have a 64-bit dll. If you did not compile the dll, we provide access to both the 32-bit and 64-bit versions please contact our support email and they can provide you the proper links if you need a different version of PSIM.

Hello, Sorry for open again this topic.

I was trying to simulate using a 3 input dll block, but when I try to run it says the same the Unable to Access the function but actually show some chinesse character. I am using a 64 bit version and the compilation is with visual studio 2017.

My code is:

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>

double t, double delt, double *in, double *out)

// Place your code here............begin
//Assuming DLL has 1 input and 1 output ( in[0] and out[0] )

static double error = 0;
error = in[0] - 1000;
if (error &lt; 0) {
	out[0] = 1;
	out[1] = 0;
if (error &gt; 0) {
	out[0] = 0;
	out[1] = 1;
if (error == 0) {
	out[0] = 0;
	out[1] = 0;

// Place your code here............end



Please email your question to support@powersimtech.com, along with your PSIM license number and university/company affiliation for prompt and in depth technical support.

When i turn on my laptop getting the error like dll error in c drive. so far i have contacted lenovo laptop not booting for help to solve this error. Is there any faster way to achieve this?

For that, I have some different tricks by which you will be fine to know about it. I used apple devices so I used a compiler for coding because for that coding is the most important part. So also if you have apple devices then from apple id verification failed, you will take more information.