LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can the NI-HWS API read in a portion of an HWS file?

I am using SignalExpress to acquire NI-HWS files using the PXI 5922 acquisition card. I want to take the acquired data and convert it into a format that I can use in other applications. I don't have LabVIEW or any other software from NI. I am using the NI-HWS C library. The only information I have about this library can be found at
The help file found here is also attached to this message.
 
This documentation has help on a function that can read HWS files:
 
tHWS_Status niHWS_RetrieveAnalogWfmF64 (const char filePath[], double* rate, double* gain, double* offset,
    long wfmBufferSize, double* wfmBuffer, long* numSamplesInWfm);
 
I have no problem using this function, until I decide I want to read in only a portion of the waveform. As far as I understand the documentation, I should be able to set wfmBufferSize equal to the number of samples I want to read in and then the size of wfmBuffer can be just big enough to read that many samples from the waveform. But if I make my buffer smaller than the total size of the file, I get an error, even if it's large enough to read in the number of samples I have requested. The error says that the buffer isn't large enough for the whole file. This is especially problematic when I'm dealing with 24 hours of data, sampled at 50 kSamples/sec and a resolution of 24 bits (~35 gB).
 
It seems that using this function, I am forced to read in the whole file or nothing at all. Say it ain't so!!!

Message Edited by Magoo on 11-03-2005 04:11 PM

0 Kudos
Message 1 of 4
(3,248 Views)

Magoo,

Thank you for contacting National Instruments! Have you tried using the niHWS_ReadAnalogF64 instead of the retrieve?  This is a low-level function, so you will need to open the file and get the waveform reference first.  Let me know if this works out for you.  Thanks and have a great day!

Regards,

Lon A.

Message 2 of 4
(3,219 Views)
Lon,

That did the trick. Apparently there is a bug in the higher-level function call. Thanks for the suggestion!

Magoo
0 Kudos
Message 3 of 4
(3,212 Views)

Magoo,

Great!  I am glad you got it working!  Thanks again for contacting National Instruments and have a great weekend!

Regards,

Lon A.

0 Kudos
Message 4 of 4
(3,209 Views)