LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creating dynamic sized arrays and filling them automatically on speedy 33

hi all,
I am trying to create dynamic sized arrays on Speedy-33. Specifically, depending on the user input, I want to be able to create arrays with 128 or 256 elements and fill them automatically. However, array constant element is fixed for Speedy 33; thus I have to manually set the size of the array with the mouse and enter the values in to the array by myself. I want to make this tedious process automatic. Would this be possible? thanks so much for comments!

~casiopea

0 Kudos
Message 1 of 2
(4,981 Views)
Casiopea,
 
There is a really great article on using arrays with LabVIEW DSC which can be found here:
 
 
One of the biggest things that should be noted about DSP is that there is no dynamic memory allocation.  Your array size must be fixed, and thus, your array needs to be initialized by using a constant. 
 
An easy way to initialize an array constant that has many elements that are all the same is to simply create a numeric constant that has the value that you want.  Then, create a new blank array constant and drag the numeric into it.  In the index input for the array constant, type in the index of the last element that you want to be initialized.  Then type in the value in the element that is displayed and all of the elements before it will be initialized to the default value of the numeric constant that you dropped into the array constant.  I hope this helps.  I would really recommend reading through that article, as it has a lot of great information about using arrays with DSC.
Brian Coalson

Software Engineer
National Instruments
0 Kudos
Message 2 of 2
(4,967 Views)