01-31-2019 09:01 AM
Hello,
I have managed to read the data from the 2 channels of the oscilloscope. The aim of my program is to store the data of each waveform in an array, zero pad the waveforms (add zeros at the end of the waveforms) and then multiply the elements of the first array (i.e. waveform) with the elements of the second one (or if the data is stored in one array then multiply the first column with the second one). Could you please provide me with any ideas. I am providing below the block diagrams and my code.
Thanks in advance!
01-31-2019 09:32 AM
Your capture is giving you an array of waveforms. Each waveform should be a different channel. So use Index Array to get your two waveforms. You can then multiply them. You can add the additional 0s afterwards if you really need to by using an In Place Element Structure to get the Y array, append the 0s, and write back into the Y array.
01-31-2019 02:20 PM
I really understand how the index array stores the data. Will the data of the 2 channels be stored in a an array with 1 column, 2 columns or there will be created 2 separate arrays? Moreover, as I see that the index array has only one output how am I going to perform the multiplication of the elements. One last thing, as the index array has only one input how am I going to combine the data from the channels with the zero pad array? If you have the time to edit my block diagram or even refer to it in your reply it would be really helpful.
Thank you in advance!
01-31-2019 05:14 PM
1. The data is a 1D Array of waveforms. Waveforms are a fancy cluster that contain T0 (timestamp of first data point), dt (sample rate as seconds between samples), and Y(1D Array containing the sampled data).
2. The Index Array can be expanded to have more outputs.
3. Reread my previous post for how to add the zero padding.