LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data into 1D array

Hello!

I am having difficulty unfortunately in properly displaying the data obtained from the sensor. I know this is pretty basic knowledge, but I can't seem to get a handle on it.
The idea is that successive data received from the sensor should be placed in successive rows of the array. There are 14 values and all I get is either they are all displayed sequentially in the first cell, or the same value in all 14 cells. What am I doing wrong or what am I not doing?


VI.png

0 Kudos
Message 1 of 11
(3,911 Views)

If I am understanding what you are asking for this should work.

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

Can you save in an earlier version of LV than 19?

0 Kudos
Message 3 of 11
(3,884 Views)

Version 14

Tim
GHSP
0 Kudos
Message 4 of 11
(3,879 Views)

Unfortunately, it doesn't yet work as it should. At the moment, these values are rather randomly placed in my opinion. More rows are added, and I would like there to be 14 of them and only refreshed values. So that I could read data from row e.g. 3 and give it to the chart. Each row is data from a different measurement channel.

 

VI2.png

0 Kudos
Message 5 of 11
(3,869 Views)

OK this one will do that.

Tim
GHSP
0 Kudos
Message 6 of 11
(3,861 Views)

Unfortunately, still none of that. The way it currently works is that there are 14 rows but the data isn't in specific places, it just keeps changing places. They are moving in a loop.

0 Kudos
Message 7 of 11
(3,856 Views)

Ok You need to be very specific as to what is it you are looking for. I get this data and it needs to go here. Please take some time and detail out what your expectations are for what you need and stop making me guess at what you need.

Tim
GHSP
0 Kudos
Message 8 of 11
(3,848 Views)

@spalinowy wrote:


The idea is that successive data received from the sensor should be placed in successive rows of the array. There are 14 values and all I get is either they are all displayed sequentially in the first cell, or the same value in all 14 cells. What am I doing wrong or what am I not doing?

 


You really need to go back to the training resources, because your code makes absolutely no sense. Also define your terms, e.g. what is the meaning of "cell".

 

Let's have a look at one small section:

 

altenbach_0-1625066866242.png

 

You have an array constant of 14 I32 integers that are all zero (no way to tell from a picture alone!), then you insert an array of new U8 values (we don't know the size of this array!) based on [i], pushing the existing zeroes to higher indices while coercing to I32, i.e. create a I32 array that is larger, then wire that to a U8 array indicator. That is all pure Rube Goldberg code!

 

We cannot help unless you exactly explain many things:

 

  1. how big is the array coming out of the read function? Is it always the same size?
  2. What do you want to see in the array indicator (last 14 values? all received values?)
  3. If "last 14 values", why is there a scrollbar?
  4. etc.
  5. etc.
Message 9 of 11
(3,834 Views)

Thank you for your time and I appreciate it. I try to explain as best I can what I mean, which is not that easy....

Maybe I'll start like this.
The original code looked like this:

LV3.png

However, the problem was that it was executing too slowly due to the fact that in each loop, register settings were sent to the MPU9255 module. So I moved that part before the loop. However, I no longer know how to receive the data properly.

The outgoing array is size 14. It always has the same size and the data has the same position. This code is for the I2C protocol. In array pointer I want to see the current values that the sensor is registering. The scroll bar showed automatically and is not needed for anything.

0 Kudos
Message 10 of 11
(3,797 Views)