Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -10447 : "unable to grant page lock" with SCAN_Start

Hello, I have a problem with SCAN_Start in an C program. Here is what I am doing:

I have a DLL written im Microsoft C 6.0. This DLL does some measurement and calculation.
I am using NIDAQ 7.0, traditional mode. The DLL is called by an LabVIEW VI (Labview version 7.0).
The Hardware I am using is a DAQ-Card 6062E (but I also get the error with an E-Serie 6024 PCI on an other computer).

I set up my measurement with (I deleted the error handling here)

DAQ_DB_Config(DeviceNummer, iDBmodeON);
SCAN_Setup (DeviceNummer, AnalogChannelsInUse, iChannelList, iGainList);
SCAN_Start(DeviceNummer, pMonBuffer, LenMonBuffer, iSampTB, uSampInt, iScanTB, uScanInt );

I have only 4 channels defined in iChannelLis
t and using a sample rate of 200 Hz.
The buffer "pMonBuffer" was createtd with malloc and is 16000 Bytes long.
The buffer is valid and I check all other input values, tehy are correct to me.
The call of SCAN_Start returns error -10447, which means that "The operating system is unable to grant a page lock".

I do not have many aplications open, and I have 256 MB of memory in my computer (P4, 1.8Ghz)
The operating system in Windows 2000 prof. with all actual patches.
What can this bee?

Thank you for your help

Stephan
0 Kudos
Message 1 of 4
(3,105 Views)
Hi Stephen:

You should not see this problem unless you allocate a buffer larger than 64Mb. To probe this further:

1) Try reducing the buffer size further to 200bytes and see if the error comes up again
2) Try running the C code separately outside LabVIEW to see if it errors only when used in LabVIEW.

Let me know what the results are and we will try to get to the bottom of things.

Regards,
Bharat Sandhu
Applications Engineering
National Instruments
Penny
0 Kudos
Message 2 of 4
(3,104 Views)
Hi Bharat Sandhu
I found the error: it was a wrong parameter in Scan_start (I did not see it, althoug I read many times throug the code). The "count" parameters wants the number of samples in the buffer. I set count to the number of bytes I allocated for the buffer.
So NiDAQ thinks, that the buffer is twice as big as I allocated it.


Thank you
Stephan
Message 3 of 4
(3,104 Views)
Hi stephan,
Many thanks for posting your find. I am using a PCI-6110 and NI-DAQ in c++ (not Measurement Studio or LabVIEW) and receiving the same error. I had also placed the wrong number in the "count" parameter of the SCAN_Start function. You've saved me a significant amount of time.
0 Kudos
Message 4 of 4
(3,104 Views)