Hello peda,
if array2.vi is your solution, then you will have some problems
🙂Please have a look into my example:
- I changed your "Delete Element"/"Insert element"-pair to "Replace element". This way you don't build up new arrays in every iteration of the loop. This will be handy when you have to work with big arrays. Because of this I also used a shift register.
- I changed the loop stop condition. At the moment you try to check every element. But if your array contains only a small percentage of zeros, then your loop will run much longer than needed. In my example I stopped the loop, when there is no zero in the array.
- Also to mention: to search for zero is ok, because zero has it's own code in double (IEEE) representation. But if you change this (lets say you search for 3.14159...) then there could be problems because of the limited precision of the number format. There are many threads on this...
Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019