LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Additional array elements created when building array of fixed size

EDIT: I found out the issue, the array itself was initialized as multi-dimensional. Hence the result.

 

 

I have a 6 element array, and I want to reposition the 3rd and 6th elements as the 1st and 3rd elements.

The block diagram code below attempts to do that. The array is initialized for 6 elements but I am not sure those additional zero elements gets appended when I build the array. My final array should also be a 6 element array.

 

w1XzbcU

1.png

NI System Configuration:
- NI PXIe-1071, 4-Slot 3U PXI Express Chassis , 1 GB/Slot throughput, Part Number: 781368-01
- NI PXIe-PCIe8381,x8 Gen2 MXI-Express for PXI Express Interface,3m, Part Number: 782522-01
- PXIe-5160 PXI Oscilloscope, 500 MHz, 10 bits, 2.5 GS/s, 2 Channels, 64 MB, Part Number: 782621-01
- Astronics PXIe-1209 2-Channel, 100 MHz PXI Pulse Generator, Part Number: 785033-01
0 Kudos
Message 1 of 3
(2,240 Views)

"insert into array" Is never the right tool for fixed size arrays. Use replace array subset or the IPE.

 

(Also, please use typical default data for the input array and tell us what result you actually want, not what you currently get.)

Message 2 of 3
(2,221 Views)

I would do it this way:

 

Example.png

Tim
GHSP
0 Kudos
Message 3 of 3
(2,217 Views)