LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save iterated data to an output array

Solved!
Go to solution

I want to save modified data (individual strings of data) to an array and/or to an indicator which shows all the iterated strings. As you can see from my code attached each value is being overwritten by the next one. I want to save all the iterations and not just the last one. Need help please

0 Kudos
Message 1 of 3
(5,935 Views)
Solution
Accepted by topic author lolasue

You are missing some basic understanding of how LabVIEW works. The wires control the flow of data, but don't store that data. Every time you write a value to your array, you are overwriting what was previously shown on that array. You need to use shift registers to store info from loop iteration to iteration, or you need to output the array from the array using auto-indexing.

 

Here is how you can do it with a conditional terminal output from the loop.

Auto-index Conditional.png

Also see below free training.

 

 

"Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  - Abraham Lincoln

 

Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 3
(5,932 Views)
Solution
Accepted by topic author lolasue

Do you actually want to use a case structure? My understanding was that you have an input array, want to manipulate each element in the array and output three new elements into  three arrays? The screenshot below seems to do the trick (if that was your intention). As James.Morris said, you can take advantage of auto indexing. No need to wire anything to the count (N) terminal.

 

temp.png

Message 3 of 3
(5,916 Views)