From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Appending and saving waveforms from analog input?

Hi, I am very new to Labview and am attemping to take in some analog voltage signals from a PSD (position sensitive detector), do some quick math on the signals to convert to an absolute position, and then create an array/waveform with all the positions that were read while I ran the code and scanned across the PSD.  My code works to display the scanning on the XY graph, I just can't figure out how to save all of the positions that are collected during the run... I am trying to add shift registers and 'append waveform' to save all the data, but can't figure out exactly how to initialize/save/display the array that contains the information.  Any ideas for a Labview newbie?  Attached is a PDF of the bottom of my code that deals with the PSD.  Thanks!

0 Kudos
Message 1 of 4
(2,736 Views)

Hi newbie,

 

instead of attaching a "PDF" (which is infact a PNG image) you should attach your VI…

 

- Don't misuse the DDT to apply some "quick math"!

- When you have an array of waveform you need to use IndexArray to index the single waveforms!

- Why do you display scalar "pin"/"coordinate" values from waveforms containing several samples?

- You already discovered the AppendWaveform function, so what's the problem with it?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,732 Views)

Sorry about the PNG, my computer is acting up a little bit and it doesn't want to upload the VI for some reason...

 

- What do you mean by misuse the dynamic data?

- Would it actually be okay to use append array, as opposed to append waveform?  And would I still need to index array?

- I display the 'pin/coordinate' values so I can monitor their values visually while the code runs.  What do you mean by several samples?  Doesn't it just display the current values for the given sample?

- As for the AppendWaveform function, I am not sure where it is writing to (or how to write to something) so that I can analyze the data from it in another environment (such as Matlab).

 

Thanks for all the help!

 

-J

0 Kudos
Message 3 of 4
(2,710 Views)
No, do not use anythinglike appending stays or soft registers. You are using the express xy function and that requires neither. It looks like you have it configured to reset on each call.

You don't have anything In your code that saves data to file so you will have to add some write function.
0 Kudos
Message 4 of 4
(2,697 Views)