From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW, VI Logger data acq sampling and logging discrepancy

 I am an undergrad student working on a project to log and display physiological signals in realtime. I am digitizing 3 analog ECG input channels using a USB-9215 series device. The USB DAQ device came with the VI Logger Lite software, which allowed me to generate an example VI in LabVIEW. This example VI allowed me to graph the inputs as they were acquired. I modified the VI to log the data in a spreadsheet file. The sampling rate for each channel is 1000 Hz.

The VI currently works as folows: (this process is repeated in a while loop until user ends session)
  • VI Logger Read Data.vi (sub-VI that came with VI Logger) outputs an array of waveforms from the 3 USB DAQ inputs (this portion was defined as a task using VI Logger Lite)
  • Waveform Chart displays data
  • Simultaneously, the waveform array is indexed, built into a double arrayand then saved
  • An indicator keeps track of the while loop iterations
The problem is that the number of data points logged (saved in the spreadsheet data file) do not correspond with the number of while loop iterations (logging cycles) in the program. Sometimes there are substantially more iterations than data points logged and sometimes there are substantially more data points logged than iterations.
I am pretty new to LabVIEW so any advice or suggestions on what might be causing this discrepancy would be much appreciated.
Note: The VI uses a couple sub-VIs that came with the VI Logger Lite package (library files located at C:\Program Files\National Instruments\LabVIEW 7.1\vi.lib\addons\VI Logger)

Thanks.

Karl

0 Kudos
Message 1 of 2
(2,161 Views)

Without knowing how you've configured your logger task, I can't say exactly but I think you're confused about how a scan works and mistaking number of scans saved with number of points saved. In your task, how many samples do you tell it to read. If it's more than 1, with each iteration, you'll get that number for each channel. With your Delete From Array, you are deleting only a single element, not reducing the array to a single element unless you've set number of samples to two. Provide the details on your task please.

Also, the whole indexing of the waveform returned, getting the Y array, transposing the 2D, is probably necessary. You can just use Export Waveforms to Spreadsheet File or a Write LabVIEW Measurement File.

0 Kudos
Message 2 of 2
(2,153 Views)