06-01-2012 04:03 PM
I am trying to create a state machine using a 2X13 matrix and for loop to transfer one row of binary data to the output lines of the DAQ assistant (see attachments)
Tutorials, context help, Labview help are getting me there.
The For loop N variable is a 1D array. How do I convert it the 32 bit integer element for input to the "Array Subset Function". How do I change the Array Subset Function" output array to 1D expected as input by the DAQ Assistant? Why is the N variable of the For loop a 1D array?
Solved! Go to Solution.
06-01-2012 04:18 PM
What looks like a 2-D array of Booleans is really a 14-D array! Did you intend that? Looks like you nested a 2-D array inside another array container 12 more times! Hard to peel that onion.
If you really had a 2-D array with 13 rows of 5 columns, you could easily access each row one-at-a-time by simply wiring the array itself into the side of the For Loop, leaving the "N" input unwired. LabVIEW will "unpack one level" for you, that is, it will run the For loop 13 times (one for each row), and what comes out of the "array tunnel" will be the 1-D array corresponding to that row. You should be able to wire this (1-D) array (inside the loop) to your DAQ Assistant. Note that this calls the Assistant 13 times, one for each row.
06-01-2012 04:29 PM - edited 06-01-2012 04:30 PM
Nothing you have there is correct. First, you don't have a matrix. A matrix is special type in LabVIEW. You don't have 2x13 array either. You have a 14D array. I really have no idea how you created that. What you want is a 5x13 array - 5 columns for each of your digital lines and 13 for the number of patterns you want to run. The For loop you have is outputing the values of the i terminal - not the n terminal. When you exit a for loop, the default is to autoindex the output and create an array.
To make it simple, create a correct Boolean array and simply wire it into a for loop with the DAQ Assistant inside.

06-01-2012 10:04 PM
I don't know whwther it is the right place to ask this question:
Suppose we have a 1D array with continuously changing array elements.Is it possible to make one of the array element as fixed?while the others are changing?
06-01-2012 10:54 PM
@jkuttu wrote:
I don't know whwther it is the right place to ask this question:
Suppose we have a 1D array with continuously changing array elements.Is it possible to make one of the array element as fixed?while the others are changing?
You could have started a seperate thread. Alright how is it changing?. Yes you can hold a constant value in the array but you cannot avoid changing but you can replace that index with a constant element after you get the updated array in a loop. It would be better if you can post a code where you find the changing elements and which element you don't want to change.
06-02-2012 12:38 PM
jkuttu wrote:Suppose we have a 1D array with continuously changing array elements.Is it possible to make one of the array element as fixed?while the others are changing?
Nothing changes by itself, there is always code that makes the change. In all cases, the code can be modified such that certain elements don't change.
For more detailed help, we need to see some code. The question is too vague out of context.
06-02-2012 01:32 PM
Please can anyone tell me the name of this function? I will be thankful to you..
06-02-2012 02:06 PM
06-03-2012 01:03 AM
Sorry..
06-04-2012 12:01 AM
Here is my VI.I want my array's first element should be always 23.while the others are constantly changing.Is it possible to do it?How can we make one of the array element always constant?
Thamks in advance.