PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI Acquisition Rate Capabilities

I am using an NI PXI-8187 Embedded Controller with two NI PXI-6289 M Series A/D PXI cards.  My controller has a Pentium IV 2.5 GHz processor, 1 GB RAM, and 40 GB hard drive.  I am using LabVIEW RT 7.1 OS.  I simply need to sample 30 input channels in differential mode at 50 kHz for a period of approximately 1000 seconds and store the data on the hard drive to be processed at a later time.  The input values must be signed DBL (32-bit).  I have been having trouble with buffer overwrite errors.  Should it be possible to acquire and store this amount of data at this rate given the hardware/software that I am currently using?  Thank you very much for your time and help.
 
Evan Sengbusch
0 Kudos
Message 1 of 11
(5,866 Views)
Evan,

Thanks for posting to the NI discussion forums.  The 500kS/s maximum sampling rate for multiple channel acquisition on the NI PXI-6289 is the first limitation.  This 500 kS/s rate is divided between each channel you add to your scan list so only 10 channels per board can be sampled at the desired rate of 50kS/s.  Buffer overwrite/overflow errors can be avoided by
a) increasing the size of the buffer
b) decreasing the sampling rate
c) increasing the rate/amount you remove from the buffer
or
d) some combination of all three
You can increase the size of the buffer by specifying a larger number of samples per channel on the DAQmx Timing VI.  This VI not only sets up the acquisition clock but also the acquisition buffer.  However, increasing the buffer size may simply prolong the inevitable overflow in many applications.  Often the real solution will be to increase the number of samples that are read from the buffer using the DAQmx Read VI on each iteration of the loop in the software. 
Hopefully this is helpful in answering your questions.  Good luck with your application.

Regards,

Neil S.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 11
(5,825 Views)
Neil,
 
Thank you for your response.  It is now clear to me that I will only be able to sample a maximum of 20 channels at 50 kHz given the two cards I currently have.  However, I am only able to write to disk a maximum of 12 channels, not 20, before I get a buffer overwrite error.  I believe this is the buffer of the PC that is overwriting, not the buffers of the cards.  I found some documentation on the NI website that claims that the PXI-8187 should be able to stream data to the hard disk at a maximum rate of 20 Mb/s.
 
 
This should be more than adequate, because sampling 20 channels at 50 kHz, with each sample being 32-bits, gives a total data aquisition rate of 4 Mb/s.  Furthermore, I found an example VI at
 
 
that is supposed to test how fast the PC is capable of streaming data to disk.  It is written in LabVIEW 6 and I use LabVIEW 7.1, so I don't know if that matters, but when I run it on my host PC it gives a believable answer, in the range of 35 Mb/s.  However, when I download the test program to my PXI-8187, it tells me that the maximum stream to disk speed that the PXI Controller is capable of is 2.4 Mb/s.  This is in contradiction to the information I found on the link I gave you above that said it should be 20 Mb/s, but it agrees perfectly with what I have been observing:  our channel limit is 12, which corresponds exactly to a stream to disk rate of 2.4 Mb/s.  Is there anything that could be slowing the write to disk speed of my PXI controller, or was the documentation I read regarding that speed inaccurate?  Thank you very much for you time and help.
 
Evan
0 Kudos
Message 3 of 11
(5,811 Views)
Evan,

Theoretically you should be able to stream at the rate of 20Mb/s.  I am surprised you are not getting a faster write speed than 2.4 Mb/s.  A few suggestions:
1. Defrag the controller's hard drive. 
2. Assure that there are not other processes that are trying to access the hard drive at the same time. 
3. Update the BIOS if it is out-dated: the most current bios is located at ftp://ftp.ni.com/support/pxi/pxi-8180/PXI-8187/BIOS
It will also be helpful to have a few more details about your system to be able to track down this issue.  What version of Windows are you running?  What other software do you have on the computer?  What version of DAQmx do you have installed?
Hopefully these suggestions are helpful in getting your application up and running.

Regards,

Neil S.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 11
(5,789 Views)

Neil,

You will have to forgive my ingorance here, but I am a physicist and computing is not my specialty.  I do not know what you mean by "defrag" the controllers hard drive.  Secondly, I am hesitant to update the BIOS, because other people here at CERN use the same controller at other times for other purposes, and I do not want to cause problems for their programs.  Would a BIOS update likely cause them trouble?  Also, my PXI controller boots into LabVIEW RT and does not have Windows on it.  As far as I know, the controller has never even had a monitor or keyboard hooked up to it.  We always operate the controller through a host controller and connect to the PXI device via ethernet cable.  I did see something in the knowledge  base about updating the BIOS with a USB key:

http://digital.ni.com/public.nsf/allkb/9C9362590B05CD6E86256B270082164A

Is this how you would reccommend doing it, and if so, it still seems that I would need to connect a monitor and keyboard to the PXI controller, is this true? 

To answer your other questions:

As I said, the PXI controller itself does not have Windows installed, it only boots into LabVIEW RT.  My host PC that I connect to the controller with uses Windows XP.  Installed on the PXI is DAQmx 8.0.0.  The only other software installed on the controller are the standard NI software that comes with installation (WatchDog, NI-VISA, NI-Scope, NI-Motion RT, DataSocket, etc.)  I don't think there are any other applications running on the PXI controller, however, I have never understood how I can check this easily.  Can you tell me how to check what programs are set to start up at bootup on the PXI controller or check what programs are running on the PXI at any given time?

Finally, the main while loop of the program I am running is very simple.  It reads data samples (1000 or 10000 per iteration) and writes them to a file that is open on the hard disk.  That is all.  I have attached my VI in case you care to take a look.  As I said, it is not very complex, but perhaps there is something simple that I have missed.  Thank you again for all your help.  Hopefully we can get this figured out.


Evan

0 Kudos
Message 5 of 11
(5,751 Views)
Evan,

I apologize for missing the fact that you were using the LabVIEW RT OS.  In this case I doubt defragging the hard drive would help anyway.  Updating the BIOS should not effect any other users of the controller.  If anything it should improve their applications as well.  The method that you found in the KnowledgeBase is probably the best way to go about updating the BIOS.  You will need to connect a monitor and keyboard to the controller to do the BIOS update.  I agree the program you sent is pretty basic.  If the BIOS update does not fix the problem I will see if I can find any other reasons the streaming speed could be slower.

Regards,

Neil Stoddard
Applications Engineer
National Instruments
0 Kudos
Message 6 of 11
(5,731 Views)

Neil,

OK, I have been having some trouble updating the BIOS.  I have followed all the instructions given by the NI documents, but I cannot get the PXI to boot from my USB key.  Some of the documentation is outdated, and in particular, step 2 of the document "Booting a PXI or VXI Controller from a USB Storage Device Such as a USB Key" is not very clear.  I have tried numerous methods available online to make my USB key bootable and have copied the BIOS files onto it and then followed the intstructions in the Read Me file that came with the BIOS update to boot the PXI from my USB key, and every time it tells me that it cannot boot LabVIEW RT 7.1 from the selected drive.  I think the problem lies somewhere in the process of making the USB key bootable.  Could you please look into this issue and perhaps provide some more clear intstructions on how to flash the BIOS on the PXI controller using a USB key.  Another specific problem I have:  when I format my USB key and make it into a ms-dos bootable disk, it then tells me that there is insufficient space to copy the BIOS files.  It seems to think it has 1.44 MB storage like a floppy disk, and the files are over 2 MB.  If there is an alternative method for flashing the BIOS, perhaps that would work better?  Thanks a lot.

Evan

0 Kudos
Message 7 of 11
(5,677 Views)
I have finally successfully booted the PXI with my USB key.  Like the READ ME file instructed, I followed the onscreen instructions and typed DOSFLASH at the command prompt to flash the BIOS.  I then see the BIOS flashing screen, but immediately receive an error reading: 
 
"Phoenix Phlash 16 Error Cannot Flash if Memory Managers (e.g. HIMEM) present  PRESS ANY KEY TO EXIT." 
 
Thus, I am unable to flash the BIOS.  What do I have to do to fix this?
 
Also, I recommend modifying your instructions on flashing the BIOS with a USB key to include the fact that under the LabVIEW RT tab of the BIOS setup utility, you must have "BOOT" set to "Windows/Other OS" rather than "LabVIEW RT" in order to boot with the USB key.  Also, there are numerous websites that give instructions on making a USB key bootable, and I tried many.  The only that actually works is at:
 
 
and the proper link to the utility you need to create the bootable usb drive is at:
 
 
This might help other people trying to do the same thing.
 
Please get back to me about the error I recieved while attempting to flash the BIOS.  Thank you.
 
Evan
 
 
0 Kudos
Message 8 of 11
(5,665 Views)
Evan,

I am not sure off the top of my head where that error is coming from.  Are you still able to boot into the LabVIEW RT OS.  If not, let me know.  If so, there may be a few more things we could try before flashing the BIOS.  I have been discussing the issue with some of my colleagues and we all agree the issue seems strange.  A few more things you could look into:

1.  If there are many, many files in a single directory I have heard that the disk write speeds can drop off.  Try saving the data into an empty directory.
2.  How much hard disk space do you have left?  As the hard drive fills up it takes much longer to save files
3.  How old is the controller and how much does it get used?  If the controller has been used a lot we may need to look into the possibility of "defragging" the hard drive.  Files can be segmented in several places on the hard drive causing decreased performance.  Defragging the hard drive reconnects these segmented files and can increase performance.

Let me know how it is goes.

Regards,

Neil S.
Applications Engineer
National Instruments


0 Kudos
Message 9 of 11
(5,648 Views)

Neil,

There were quite a few files in the directory I was writing to (about 240), however when I try saving to a new, empty directory I still achieve the same stream-to-disk rate of about 2.5 MB/sec.  My hard disk has a total of 40 GB.  Currently 18.4 GB is being used and there is 21.6 GB of free space.  I will have to get back to you on the exact age of the controller, as I did not purchase it and people used it before me.  I think that it was used more extensively in the past, but right now it is not being used at all.  It is in my office where I am trying to fix this problem.  There are some very large files on the hard disk (<2GB), I do not know if this is of any importance.  Again, I am not familiar with the defragging process, but at this point I am willing to try anything.  Also, let me know if you find anything about the error during the BIOS flash.  Thanks.

Evan

0 Kudos
Message 10 of 11
(5,630 Views)