02-24-2023 04:45 PM
I tried used delete from array, but it did not work. Delete from array only lets me delete the last element (See attached code). I don't want to use index display.
Can someone please help?
02-24-2023 05:04 PM
I figured out. All I had to do is keep using "delete from array" with one common index for all of them.
02-24-2023 07:06 PM - edited 02-24-2023 08:06 PM
Changing the index display does NOT change the array size. It is purely cosmetic.
Delete from array has two inputs at the bottom: one for index and one for size. If nothing is wired there, you delete the last element. If you wire both, you can define where the deletion should start and how many elements you want to delete. If you are not interested in the deleted element, "array subset" might be a better option. If you only want to trim from the end, "reshape array" would also work.
It is not interesting to delete from a array diagram constant that is all FALSE because you have no way to tell what part got deleted. To practice, test with an integer array where each element is different so you can see what happens (e.g. [0,1,2,3,4,5,6,7,8,9]
Do you want to delete from the end? Form the beginning?
It would help to attach a VI that actually makes sense and also align the wires with their terminals for clarity. Making the array seems to exit from the bottom terminal can cause confusion and errors.
@GRCK5000 wrote:
I figured out. All I had to do is keep using "delete from array" with one common index for all of them.
That statement makes absolutely no sense! Can you show what you did?
I recommend to take a step back and explain what you are trying to do using simple words.
02-25-2023 12:08 AM
Hi Mr. Altenbach,
This below is what I did
02-25-2023 02:21 AM
@GRCK5000 wrote:This below is what I did