02-15-2018 06:50 AM
I have built a large test application using Labview 2014 and Teststand 2014 for a customer to calibrate the tools they make that contain accelerometers and magnetometers. The hardware of the test system includes a motion simulator, thermal chamber, magnetometer, and power supply. All of those including the UUT communicates to the software over a VISA connection of some sort. The problem I am having is when the software runs, memory handles continue to increase until the application's memory limit is reached and an out of error message is displayed. Using tools from Sysinternals, I have found that semaphore handles grow throughout the test. I have found a semaphore handle named \Sessions\1\BaseNamedObjects\SemBlocking that continues to grow. Investigating further, it seems that the handles grow when a VISA device is being accessed. During portions of the test where a VISA connection is not being accessed, the handles don't seem to grow. The VISA sessions are opened at the beginning of the test and are closed at the very end. This is a 16 hour test and it takes awhile before the memory limit is reached. I have also used Desktop Execution Trace Tookit, which showed everything working properly as far as memory handling is concerned. So I am wondering if anybody else has seen anything like this before? Are there any other tools I can use that could show me what is generating these semaphore handles?
Thanks
02-15-2018 07:05 AM - edited 02-15-2018 07:08 AM
@Ideal wrote:
... and an out of error message is displayed.
that made me smile
EDIT: sorry i have no recommendations regarding your problem, except the question wether you are using TDMS to write data to file?
02-15-2018 07:08 AM
Oops, I meant out of memory error message.
02-15-2018 07:11 AM
The test is writing to TDMS files and an Access database throughout the test. It is collecting a very large amount of data. After completion of the test, a total of about 7 TDMS files at about 20MB each have been created.
02-15-2018 07:15 AM
from the size of your tdms files, i think this is not the culprit, but regardless you may want to skim over this https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MfNSAU
02-15-2018 07:56 AM
I have developed background threads to avoid the repeated Open/Close VISA memory leaks. Not sure if that will fix your challenge but it may be a ticket to freedom.
Ben
02-15-2018 04:06 PM
My VISA sessions are only opened once at the beginning and remain open until I am finished. I access them way too often to open and close them all the time. I just did a test to keep one of my VISA sessions within Labview and not passing it through Teststand with no change in results.