Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I get a 'memPageLockError' with the ScanStart function?

I am using PCI-6110 and PCI-6111 boards for high speed data acquisition. I am using triggered acquisition into a preallocated buffer using SCAN_Start() and DAQ_Check() functions amongst others. I find that I get a -10447 memPageLockError status returned from SCAN_Start() when the total number of points I request for a total of 4 channels exceeds 33,533,952 points. This is less than half that which SCAN_Start() is supposed to be able to handle (2^24 * number of channels), and through experimenting, I have found that this is actually a different error to that thrown by SCAN_Start() when its limit is exceeded (> 2^24 throws an error code -10010 for 1 channel).
 
I would like to know where this limit comes from. If I know what it is I can work around it but I am worried that it may be machine dependent. Could somebody please tell me if this is machine dependent or perhaps if this an error which has a patch in a later NI-DAQ version (something mentioned in a related posting but I'm not sure if it applies here).
 
Details of my system:
OS: Windows 2000 SP4
Programming Language: Borland C++ Builder 5.0
NI-DAQ: 6.9.1f28
RAM: 512MB
 
(Update to NI-DAQmx not really an option at this point).
 
Thanks.
0 Kudos
Message 1 of 2
(6,600 Views)
Hi,
  assuming you're not multi-threading, I think that Windows is stopping the driver allocating that amount of memory in one go - if you're allocating doubles (so 8x33,533,952 = 268MB (and change) then the OS won't allow that amount of memory to be allocated in one go. (Windows tends to page lock to 64MB)
Why do you need a buffer that big? (I know Scan Start is a finite setup, but I'm wondering about going for a continuous setup instead where a much smaller buffer would be required.)
 
Can you use DAQmx (
Driver here :
Borland interface here :
)
 
Hope that helps.
 
Thanks
 
Sacha Emery
National Instruments (UK)
 
 
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 2
(6,590 Views)