From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create array with for loop

Is it ok ?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 21 of 34
(847 Views)

This is not what i need. How can i make array of 7 axis X values?

0 Kudos
Message 22 of 34
(835 Views)

This takes the 6 string bytes and creates 3 U16 values of X, Y, and Z.  Then it bundles them into a cluster.  Send the cluster to the loop tunnel and set for auto-indexing.  Or if you want a separate X array, Y array, and Z array, send the 3 U16 values to an auto-indexing tunnel without bundling into a cluster.

 

0 Kudos
Message 23 of 34
(827 Views)

>>Send the cluster to the loop tunnel and set for auto-indexing.  Or if you want a separate X array, Y array, and Z array, send the 3 U16 values to an auto-indexing tunnel without bundling into a cluster.

 

When i send U16 value to the loop tunnel, it makes me array with all the same elements, like in my VI. What is wrong?

0 Kudos
Message 24 of 34
(818 Views)

If you need each scalar inside the loop, do what I told you. You can use a lossy queue to fix the array size.

0 Kudos
Message 25 of 34
(814 Views)
0 Kudos
Message 26 of 34
(807 Views)

No. That does not even use the shift register and build array that I mentioned. Here is a very much undebugged and basic example

Message 27 of 34
(802 Views)

Thank you for help me with so simple things but i have one more question.

What if i want to have 5 values 1D array of axis X, 15 values 1D array Y and 20 values axis Z?

0 Kudos
Message 28 of 34
(798 Views)

Use a different lossy queue for each.

Message 29 of 34
(795 Views)

Since it sounds like you get 1 point for each axis per loop, you will have to loop the 20 times.  Go ahead and autoindex all of the values out.  You can use Array Subset to reduce the number of samples to work with.


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 30 of 34
(790 Views)