02-16-2024 07:31 AM
I am facing an issue with the memory allocation from NI python APIs.
Error code: -1074134954 (Hex 0xBFFA0056) The necessary memory could not be allocated.
Error description is reported in the attached picture in the case of the nidigital API when calling session.load_pattern() method, but I experienced the same issue also when calling session.initiate() or with a different API (such as nidcpower).
The sequence, in the case of nidigital, is the following:
1) Session to the PXI-6571 is open
2) session.load_pattern is called
3) Digital pattern is burst
4) session.reset() and session.close() are called
5) Repeat (1-4) loop X times
.....
6) At certain repetition of the (1-4) loop, the memory allocation issue is raised.
I must specify that in each (1-4) loop, digital patterns length and dimension are always the same.
I am using a STS T2 system with PXI-6571 (nidigital) and PXI-4163 (nidcpower) cards. Using the reset() and close() methods do not solve the issue.
Does anyone know how to solve this memory issue?
02-16-2024 09:32 AM
No image is attached. How many vectors are you using?
02-16-2024 09:35 AM
Error_screenshot
02-16-2024 09:46 AM
I am sorry, the picture should be attached now to the discussion. The .digipatsrc file being loaded is only 7 vectors long, and inside there is a set_loop to iterate inside a tdms file (source_waveform function) for 4096 samples. I believe the pattern size is not relevant since it is correctly loaded and executed, but the memory does not get reset if session.reset() or session.close() are called. Also the exact same error is obtained when calling session.initiate() or even in a different NI API (such as nidcpower).
02-20-2024 03:24 AM
Hi,
An additional information is that this problem is also showing when calling session.initiate() in the nidcpower to perform a single SMU measurement as it can be seen from the screenshot attached. I have no way to know which memory cannot be allocated and how to release it.