LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm getting an error 50353 about locking memory pages into physical memory

I'm performing a task of activating a relay, taking data (voltages), evaluating data (simple less than greater than), deactivating the relay and then repeating.  The setup is a flat sequence loop (with the four actions, relay on, take data and record, evaluate, relay off) inside of a for loop.  I get to about 1350 iterations of the for loop and I get the following error:
 
Error -50353
 
One or more memory pages in the specified logical buffer could not be locked into physical memory.  The operation could not be completed as specified. 
 
I'm using express VIs for taking and recording data, and for switching relays I'm just doing DAQmx create digital channel and then writing either high or low. 
 
Any suggestions?
 
Thanks.
 
J.Bowen@usmboats.com
J Bowen
US Marine; A Brunswick Family Boat Company
Product Integrity, Component Testing, and Validation
LabVIEW 8.2
CompactDAQ
DaqPad 6015
SCC-2345
0 Kudos
Message 1 of 7
(3,847 Views)
Hello J Bowen,

That error can sometimes be caused by not clearing your DAQmx tasks properly and freeing up the system resources reserved by these tasks.  Make sure you are correctly clearing your DAQmx tasks at the end of your program using the DAQmx Clear VI.  The DAQ Assistant Express VIs will take care of this automatically when the program stops.  For the tasks you create manually, make sure to make a call to the DAQmx Clear function before ending your program.  Follow the DAQmx shipping examples for an idea of how to do this properly  Also, I would recommend upgrading to the latest version of the NI-DAQmx driver which can be downloaded here.  Let us know if this solves the problem.

Regards,
Travis G.
Applications Engineering
Message 2 of 7
(3,840 Views)
I believe it was an issue of not clearing out the tasks.  What I had done is when I was opening and closing the relay I was setting up a new digital output task then outputing high or low, so for each iteration I created two new digital tasks and I was trying to iterate ~5000 times.  I reprogramed it to create a new digital channel outside of my for loop and then have it dump the task to an hidden indicator which I used as a local variable for the relay switches inside of the for loop.  I haven't had any problems with it after that.  Simple memory leak!!!!
 
Thanks for your help!!
 
J
J Bowen
US Marine; A Brunswick Family Boat Company
Product Integrity, Component Testing, and Validation
LabVIEW 8.2
CompactDAQ
DaqPad 6015
SCC-2345
0 Kudos
Message 3 of 7
(3,834 Views)

Dear J Bowen,

Can you share out the solution I mean the block diagram. I have encountered the 50353 occurred at DAQmx Read (Analog DBL 1 Chan 1 Samp). Does anyone can help me? The attached is as below:

 

Download All
Message 4 of 7
(3,520 Views)

Hi *LJ,

I tried to take a look at your code, but I was unable to open all of the parts of your code because there were missing subVIs that you did not attach to the post.  I took a look at the VIs that you did post and I noticed that except in the AnalogueInput1.vi you do not clear the DAQmx tasks in your program.

Tip: in the AnalogueInput1.vi you call both a DAQmx Control Task VI and a DAQmx Clear Task VI.  The DAQmx Clear Task VI will release all reserved resources, so in this case you don’t need to release resources using the DAQmx Control Task VI.

In general, you should always clear each DAQmx task at the end of a program.  Look through your code and make sure that for each task you create, you have a corresponding clear task. If desired, you can call the clear task as the last step in the subVIs that you have created to configure and read/write to your various inputs and outputs.

Tip: If you have multiple reads or writes taking place inside of a while loop you can improve the execution speed of your program if you configure the task outside the while loop, perform as many reads or writes inside the while loop, and then at your end of the program clear the task outside of the while loop.

Jared T.
0 Kudos
Message 5 of 7
(3,498 Views)
I currently don't have that block diagram any more.  But I can speak to what the problem was.  I basically had a task that I repeated in a while loop (read data, evaluate, open or close valve).  In that loop I create a new DAQmx task each time, and as a result I overloaded the computer with thousands of new tasks.  The way I fixed the issue was to create the task outside of the loop and then use the Stop/Start DAQmx vis to control the execution of the task within the loop.  That way I had one task that I started and stopped as opposed to continuously creating new tasks.  Hope this helps!
J Bowen
US Marine; A Brunswick Family Boat Company
Product Integrity, Component Testing, and Validation
LabVIEW 8.2
CompactDAQ
DaqPad 6015
SCC-2345
0 Kudos
Message 6 of 7
(3,495 Views)

I am getting the same error in my application during finite analog input. Were you able to resolve this issue?

 

Thanks.

0 Kudos
Message 7 of 7
(3,225 Views)