12-11-2007 07:44 PM
12-13-2007 08:23 AM - edited 12-13-2007 08:25 AM
Hi NickyNews,
A great way to get started with LabVIEW programming is to look at the example programs and then modify these to fit your needs. Since you are interested in samples being read from your USB-6218’s on-board memory, I would suggest looking at the Continuous Voltage Acquisition Examples. Each of these examples has some form of the polymorphic read VI that can be seen in the attached screenshot from LabVIEW Help. If you have an idea of how fast you are acquiring samples, you can then set the number of samples that LabVIEW reads from the buffer with each iteration of the while loop around the read function.
These examples can be found by navigating to the Help Menu>> Find Examples>> expanding the Hardware Input and Output folder>>expanding the DAQmx folder>> expanding the Analog Measurements Folder>> and then looking in the Voltage file. When you click on an example VI, a brief description will appear in the Information box to the right of the Example Finder.
A useful way to ensure that any example program you select is supported by your NI device is to Limit the results to Hardware. This option can be found in the lower left side of the Example Finder. In the Hardware drop down menu, you can select "Add Device…" and then highlight your hardware. This will cause yellow arrows to appear in the center column to the left of all the examples that support your hardware. If you check the box next to “Limit results to hardware” under the drop down menu, the Example Finder will take a second to reset and show you only examples that support your hardware.
You had mentioned that you are concerned about data being lost. Any time this occurs when using DAQmx in LabVIEW, an overflow or overwrite error will be returned. If you experience one of these errors, the Knowledge Base ID 4D3AI5Q7: Understanding and Avoiding Overwrite and Overflow Errors with NI-DAQmx has a good explanation of what is occurring and steps to avoid this.
I hope this helps. Good Luck, Mallori M.
12-17-2007 02:26 PM
Thank you very much!
Nick