In this simple DLL at startup the output should be ""
and after trigger the output should change in a string.
In the code below I show how I have programmed it.
It is not working the output keeps the value "0".
What is wrong with my code?
Thanks for any help.
Code: Alles auswählen
//Call from PROFILAB, this is the actual function call DLL
DLLEXPORT void _stdcall CCalculateEx(double *PInput, double *POutput, double *PUser, StringParam PStrings)
{
if (PInput[CLK] < 2.5) //Input CLK low?
{
if (PUser[CLK_OLD] > 2.5) //falling edge CLK?
{
//output longstr1 to putput 0
sprintf((char*)PChar(PStrings[0]),"%s",longstr1);
}
}
PUser[CLK_OLD] = PInput[CLK]; // Value of CLC stored for next cyclus
}