05-09-2017 02:31 PM
Hey there,
I am currently working on an Arduino based Oscilloscope. The project is divided in two main parts:
1.) Measuring
For this I use an Arduino Uno and the "analogRead" command to read the values.Then I store the measured data and send it via "seriellPrint" via USB to my Computer.
2.) Data processing
In LabView I use the VISA-Interface to Read it. However, I have a problem: I have tried to store the received data in an array and convert it to an analog Signal. For storing the data in an 1D array I use a for-loop and it's iteration counter. But when I look into this array I see that only the last two slots of the array were used for data storing. The rest of the array is always empty.
Please can you tell me where my mistake is?
Solved! Go to Solution.
05-11-2017 04:29 AM
Hello,
The function “Replace Array Subset” will replace elements of the array at the point that you specify it.
(Picture attached)
if you want to store the data in an array, you can use the function "Insert into Array".
And add Shift Registers in the for loop to store the inserted values
05-11-2017 06:23 AM - edited 05-11-2017 06:23 AM
Hi James and surknival,
ReplaceArrayElements is perfectly fine - once the array is defined before the loop and kept in a shift register!
(Right now the array is initialized inside the loop in each iteration…)
Instead of InsertIntoArray you should also use BuildArray to append/prepend elements to an array!
05-15-2017 06:46 AM
Hello Surknival,
can you flag the questions as answered in case your problem was solved?
This helps other users to easier find questions with a useful reply and we can close the associated ticket.
Good luck with your developments!
Best,
Daniel