LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving acquired signal data

I'm currently developing a program for data acquisition, analysis, and storage using 64-bit LabVIEW 2017 Student version. The device being utilized to acquire the data is a PicoScope 5444B model and is receiving signals from detector(s) (accelerometers), and a generated function from a function generator. I developed the program thus far by manipulating the PS5000aExampleBlock.vi provided by Pico Tech and downloaded from their GitHub Page (https://github.com/picotech/picosdk-ni-labview-examples).  I have no LabVIEW experience except for what I have learned from NI tutorials, Youtube, and other various resources.

 

I'm running into an issue with saving data using a "Write To Measurement File" function. The data that is currently being saved is in the domain of samples (x-axis) and volts (y-axis). My issue is that I can't think/ find a way to save the data in the domain of time-milliseconds and volts-millivolts. From what I can understand is that I have manipulated the domains within the waveform graphs by using a property node for the x and y scalar multipliers and the data being saved is wired from a pre-manipulated signal instead of from the waveform graph its self. 

 

I'm looking for any advice, ideas, or corrections on how I can save the data in the desired domains. I have attached the vi along with the two subvi (the two subvi is for axis conversions) for completeness. One vi was found within a forum ( to convert adc counts to volts) and the other I created my self to obtain the sample interval (dt) (to convert samples to time).

 

Thank you,

Jessie

0 Kudos
Message 1 of 6
(3,405 Views)

Hi Jessie,

What do you hope to achieve with your data file? I typically use "Write Delimited Spreadsheet" to make a tab (or other) delimited text file with data that is easily read inside or outside of LabVIEW later.

 

To convert sample number to relative time, you just have to multiply by your sample period, dt. If there is 1us between samples, just multiply the whole array by 1e-6. To convert volts to millivolts, you just multiply the array by 1e3. 

 

As far as training goes, you may be able to access NI's online training as a student. I would highly recommend Core 1 and Core 2 classes which will get you off the ground fast.

0 Kudos
Message 2 of 6
(3,353 Views)

Thank you for the response! For the data file I'm trying to save the data into a text file in units of milliseconds (ms) on x-axis and millivolts (mV) on the y-axis . Currently the data is being saved in volts and samples. I understand how to achieve the conversion between samples to time. I actually had made a subvi that would make this conversion for me based on the timebase setting, resolution, and the amount of channels in use as each three of these variables effect the max sampling rate. The issue that I'm having is that the conversion only occurs for the waveform graph and not for the data file because I used an x-scale property node to perform the conversion. The data needs to be saved in the units of ms and mV because these are the units that the data needs to be in so the analysis portion can be done. I need help figuring out a way to manipulate the data before its saved. I also will take look into the "Write Delimited Spreadsheet".

0 Kudos
Message 3 of 6
(3,338 Views)

Perhaps the text description is a little confusing, but I already explained how to convert your data to the units you requested. Here it is in picture form:

 

snippet.png

0 Kudos
Message 4 of 6
(3,328 Views)

The concept is not confusing. There is a difference between the way my data is provided and the example you have given. The picture below shows where my data comes from. It may be to the lack of knowledge, but I am unable to "Unbundle" the data by its x and y values to be able to perform the conversion. In your given example you have both the x and y values separately and then it looks like you bundle them together after the conversion has been made and then save/ graph the data. I don't see a way to accomplish this in my scenario and that is what I need help with.  Ex pic.png

0 Kudos
Message 5 of 6
(3,322 Views)

I see, I think if you create an array of time values, you will be good to go. Look into the "Ramp Pattern.vi" to make it easy 🙂

A couple of tips:

  • You  only need 1 "unbundle by name" per wire, you can expand it by dragging the bottom.
  • I would not use dynamic data, because it obscures the code. In this case, "build array" will work.
  • I would also not use "write to measurement file", because "write delimited spreadsheet" is very easy to swap in.
0 Kudos
Message 6 of 6
(3,315 Views)