Hi all, hoping for some advice on this problem if possible:
Essentially, we have a laser that will excite samples many times in a certain acquisition period, and I built a program that converts the voltage values from a Tektronix MDO34 oscilloscope, to those of Delta(absorbance), for transient absorption analysis. However the problem is that at present, it seems to take 10,000 readings, store them in the appropriate arrays, and then overwrite them continuously until the acquisition time is done.
Ideally, I need to find a way to append these values to the array and average them as it goes. I am fairly new to labVIEW so do excuse any glaring errors; I really appreciate any help!
Use shift registers to store data between iterations. Using Shift Registers in LabVIEW
Use Waveform Chart instead of Waveform Graph. What Is the Difference between Waveform Graphs and Waveform Charts in LabVIEW?
Thank you I tried this, but there is two tunnels entering and one leaving, so that the type of data entering each is a 1d array and the one leaving is 2d. Is there some way to avoid this? Changing to a chart and increasing its chart history did not seem to fix the overwriting problem either.
Could you please post your VI so that we can reproduce the issue on our side?
It doesn't matter if I don't have the actual hardware. I can replace the VISA API with some dummy data generation.
I don't really understand what's going on with the array manipulation.
Anyway, you can use Append Waveform VI. See the attached example.
The support VI is available at C:\Program Files (x86)\National Instruments\LabVIEW 2021\examples\Waveform\Support VIs
You can find more examples on waveform manipulation from that folder as well.
Thank you for that advice, I indeed tried to use shift registers and then append waveform (two create the waveform B entry), and this did increase the number of my iterations by a further 10,000. However, when changing the acquisition time from 5 to 10s, this did not increase the number of iterations at all, so I'm uncertain it is doing what is required.
To try to explain the aim a bit more: for example, if I were to connect a 20hz laser, this would mean it excites once every 0.05s. So therefore an acquisition time of 5s is 100 excitations. Each of these samples I would need to average to find the final one, from which to save data. This is why I must append each of the sets of waveform data to arrays, and then manipulate, however unsuccessfully thus far.
Here are the changes I've made below. Any further advice I am very grateful for!