12-10-2012 02:44 PM
Hello All,
I am working on a program in which I can input a nXy array of enumerator which has 3 numeric values of 0,1,2. The values of 0,1,2 correspond to 3 cases of constant boolean values. Numeric and its corresponding boolean values are given below:
Numeric Value : 0, Boolean values : False, False
Numeric Value : 1: Boolean Values: True, False
Numeric Value : 2: Boolean Values : True, True.
Thus my nXy array of numeric values hwould get transformed to nX 2y array of boolean values with 2 boolean values corresponding to each numeric element of the array. The image shows the tranformation which I am trying to do.
To make this work, I took the numeric array and added 2 for loops ( one for row and one for column ) and checked each element of the array for the 3 cases. 0,1,2. In each case I have the boolean contants corresponding to the case. Since the nth element in the numeric array will lead to correspoding boolean values in (2*n),(2*n)+1 elements of the array I have a corresponding program for that too.
However when I output the results, it doesnt seem to come out properly and I am not sure where the logic is going wrong. If anyone can help me with this, it will be great.
Solved! Go to Solution.
12-10-2012 03:01 PM - edited 12-10-2012 03:03 PM
12-10-2012 03:09 PM - edited 12-10-2012 06:32 PM
And here are a few comments about your code:
I would recommend you start with a few introductory tutorials... 😄
12-10-2012 03:30 PM
Hello Altenbach,
This works very well. Thanks a lot. I have a quick question though. The concatenating tunnel mode is present only in LabVIEW 2012 I believe. My main program is actually running in LabVIEW 7.1 which does not have this feature. What would you recommend to do for that?
12-10-2012 04:07 PM - edited 12-10-2012 04:08 PM
@GV8 wrote:
What would you recommend to do for that?
An initialized shift register and a built array (set to concatenate) in the inermost loop. Rest stays the same.
12-10-2012 04:25 PM
Thank you very much. This was very helpful.
And I will take your advise and revise through some fundamentals of LabVIEW...:)