02-26-2021 05:46 AM
Hello,
I develop a software about data acquisition, data management and devices driving. This software communicates with several devices as a chromatograph by ethernet (RJ45), an automated PAL system by ethernet (RJ45) on a local network and flowmeters by USB.
I am working on the communication between the software and the Chromatograph.
It works, I send data request by using “ClientTCPWrite” and gather data by “ClientTCPRead”. Sometimes I get disconnections, but I think I should manage this issue with some locks.
Since I made developments to manage more data from the chromatograph, I get this Runtime error 203 (from Windows?) after around 15 hours of using.
I limited the quantity of data and let it run but still get this error after around 15 hours, so I do not think that the quantity of data requested is the reason.
I checked the memory data allocation by Resource Tracking tools, I optimized my code and I still get this error. (only 270 Mo used in Task manager and 38% of the memory used after getting this issue)
I modified my code to manage thread pool differently (no use of the default thread pool, limited the number of threads created, releasing…), I still get Runtime error 203 always after around 15 hours of using.
Runtime error 203 does not allow to use the computer correctly, some softwares don’t start, my software cannot be closed correctly… A restart is needed to recover full capacity of the computer.
Now I do not know in which way I should go to resolve this issue. Anyone know what can be the reason of this Runtime error 203? It looks like a computer limitation, but I have no clue.
Material: Terra Mini PC V5 6000 / Chromatograph Trace 1310
Software : Windows 10 / Labwindows/CVI 2015
I join screenshot. Let me know if you need more information.
Thank you for your help.
Best regards,
Jean-Marc ROTH
Solved! Go to Solution.
03-01-2021 05:58 AM
Hello,
I found the reason of the Runtime error 203 that appears in my software.
I share it with you if it can help someone in the future.
As said previously, I use flowmeters connected by USB on my computer.
To communicate with this flowmeters I need to call a DLL Dynamically because I have no access to this DLL. (Flowmeter DLL provide by the manufacturer)
Exemple:
int AskFrontBrooksDeviceFlow()
{
//Handle to the DLL
HINSTANCE hinstLib;
hinstLib = LoadLibrary("BrooksDLL.dll");
if (hinstLib != NULL)
{
//Pointer to the function
READ_FLOW ProcAddress;
ProcAddress = (READ_FLOW) GetProcAddress(hinstLib, "ReadFlow");
//Call the function using the function pointer
(ProcAddress)(COM_PORT, BAUD_RATE, FrontMFC.id_h, FrontMFC.id_l, FrontMFC.id_m, FrontMFC.id_s, &FrontMFC.flow, &FrontMFC.flow_unit, &S1, &S2);
//Free the DLL module
FreeLibrary(hinstLib);
return 0;
}
//Hinstace error
return -1;
}
I need to go a little more further but it seems that the calling of this functions every 2 seconds (2 times -> 2 flowmeters) during more than 15 hours is involved in the apparition of this Runtime error 203.
Best regards,
Jean-Marc ROTH
03-01-2021 08:16 AM
Well, I suppose you could load the DLL once at program start and release it on exit, there's no need normally to reload it every time you call functions in the DLL. This will avoid you tp get the error. I usually operate this way and it worls even for long-lasting programs like the one you are developing.
03-01-2021 08:19 AM
Yes, I will operate this way.
Thank you.