06-16-2022 01:38 PM
Hello,
Using a data acquisition device in one tab I have an indicator proving the data. In the next tab I am attempting to create an array that tabulates all data collected in the previous indicator.
This is how I attempted to build the array. It collects the first number, and just replaces the previous in the first slot.
Thanks for any assistance.
Solved! Go to Solution.
06-16-2022 02:02 PM
I have no idea what you are trying to do; your post makes no sense. My guess is that English is not your primary language. Perhaps you can get someone to help you rewrite the post.
06-16-2022 02:16 PM
Nope, just don't entirely know how to explain my situation.
I am attempting to make an array that collects all data from an indicator.
The indicator and Array are in different tabs.
When ran, the data transfers into the array. Data collects and places it in the first slot every time, overwriting the previous recorded data.
06-16-2022 02:43 PM
First, I wouldn't use local variables. Look at some examples for a state machine. Use shift registers to hold the data. For your array, use Build Array, not Insert Into Array. Beyond that, I too struggle to understand what you are trying to accomplish. You would probably be much better for attaching your VI, not the over simply picture that you did post./ Also, give us a better description of the task you are trying to accomplish.
06-16-2022 03:19 PM
I am trying to make an array with data I am getting through data acquisition. The Front panel is set up with tabs.
One tab I collect the data, and another is to put that data into an array. I am struggling to get this to work through the tab system that was made.
We have a test, runs string in another program, collects and reports current force and max force of the test. That max force we want compiled into array after each test.
My bad, thought I posted the VI.
06-16-2022 03:55 PM
Hi jwells,
@Jwells93 wrote:
I am trying to make an array with data I am getting through data acquisition. The Front panel is set up with tabs.
One tab I collect the data, and another is to put that data into an array. I am struggling to get this to work through the tab system that was made.
Tabs on your front panel (usually) have no importance for the block diagram, they are just containers to hold other fp elements. So it makes no sense to speak of tabs when discussing block diagram problems... (That's why all answers so far are about asking for better descriptions of your problem!)
You should do as already suggested: use a shift register to hold your array and use BuildArray to build that array...
06-16-2022 04:20 PM
Thank you,
The previous person how gave me the VI had things set-up, and had me under the impression that each tab was set into an event or case structure, that makes things easier to figure, but now I probably need to redo the entirety of the VI.
Now this is a basic question, my Array still only takes in the data into the first slot of the Array.
I made a quick simplified version that does the same using a random number generator, and hope that uploads.
06-16-2022 04:27 PM
My apologies I know that didn't make entire sense,
The previous person had multiple events, each event was a different tab within the VI. That's were my confusion began.
I know the loop control doesn't make sense in the context of this VI. I'm unsure if I am explaining this correct, but In the original, he uses the loop control as a "timer," the loop control runs out and the test concludes, At that time the final data is compiled for that run, and wanted to be transferred into the Array.
I hope this helps explain where I am at.
Thanks again for anybody's help.
06-16-2022 04:58 PM
Ignoring the other blaring mistakes and issues in your code..
@Jwells93 wrote:
a basic question, my Array still only takes in the data into the first slot of the Array.
Well, that is *not* how you build an array.
The simplest way to build an array is to auto index your numbers like this.
06-16-2022 05:12 PM
Great thank you,
From, what I have understood, from there use build array into the Array.
How do I keep it from filling the entire array and taking only one slot.
Thank you, and I apologize for the very noobish questions, and misunderstandings.