LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reinitialize Arrays to Default Values

Solved!
Go to solution

Hello everybody,

 

I am working with a progam that can perform two different tess in sequence. After that, the program saves the values into arrays to be saved in a spreadsheet. Sometimes though, I only need to perform one test. However, my program includes in the spreadsheet the values of the one test I choose not to run by taking the values from the previous run. Is there a way to reinitialize arrays to empty?

 

Thank you.

0 Kudos
Message 1 of 7
(3,031 Views)

It is difficult to say without having a good understanding of what your code currently does. A picture says a thousand words; please post what you have so that you can get better davice.

0 Kudos
Message 2 of 7
(3,029 Views)

Thank you. Here is the code. The arrays I would like to reinitialize are the ones called DC Test Values and Pulse Test Values.

 

0 Kudos
Message 3 of 7
(3,024 Views)
Solution
Accepted by topic author christianwos

I didn't see the arrays you mentioned in the submitted code, but creating an empty array is simple -- put an Array constant on the block diagram and fill it with an element of the appropriate type.  For example, here is an empty array of Dbl:

Empty Array.png

Wire this wherever you need an Empty Array to appear.

 

BS

Message 4 of 7
(3,006 Views)

The simple solution is just to write an empty array to all of your test results when you start a test sequence.  Maybe add another state for sequence initialization.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 7
(3,003 Views)

Thank you.

0 Kudos
Message 6 of 7
(2,984 Views)

Thank you.

0 Kudos
Message 7 of 7
(2,983 Views)