11-02-2009 11:54 AM
Hi ppl!
I have this boolean address table, and I wonder if it is possible to have
a loop so that every address line goes down one.
Ad I want to do this 16 times (because I have 16 multiplexeres, and each needs to have different
address bits in every loop). For example in the first image Multiplexer 1 gets the address bits "0000" and Multiplexer 2 gets "0001" and so on....
In the next loop Multiplexer 1 needs to be "1111" and Multiplexer 2 needs to be "0000", and so on...till all 16 addresses have loopes through
every multiplexer.
Hope it is clear enough in the pictures.
Cheers!
Solved! Go to Solution.
11-02-2009 12:10 PM
11-02-2009 12:12 PM
Where are you having problems? You have a 2-D boolean array. Use an autoindexing For Loop, or use a while Loop with Index array and a counter (or the iteration terminal i) to index out each row in turn.
You could also create an array of integers and use Number to Array in the boolean palette to convert the number to its boolean equivalent.
11-02-2009 12:17 PM
Use the an array of numbers and rotate array.
Ton
11-02-2009 12:18 PM
I am somewhat nee to LabVIEW and although I have worked with loops,
I am not familiar with auto-indexing.
Could you provide and example?
Cheers!
P.S.: Those are two different pictures, showing before and after. And then I send all the data in a 1D array, and split
to conveniance.
11-02-2009 12:18 PM
This works. The Wait in the second loop is just to make a pretty display on the FP. You can take the 3D array from the auto-indexing tunnel that I haven't wired.
PS - The green function is the OpenG Reorder 2D Array. Don't have it? Why not?
11-02-2009 12:28 PM
this is what i did....not sure how memory efficient this is (hmm..)
11-03-2009 08:04 AM - edited 11-03-2009 08:06 AM
Thanks everyone for their input.
jcarmody and Nickerbocker offered possible solutions to what I want, except for the following:
-jcarmody: the idea was to use only native code to LabVIEW so it could run in every PC in the lab without having to install third-party
vi's, however I have placed a bookmark in the page and will probably use it in the near future if necessary.
Thanks again.
-Nickerbocker: your solution was very much what I wanted, however I am using LabVIEW 8.5 in my Mac and 8.6 in the Department. As I was working at home with 8.5 I could not find a particular vi in your code (I am new to LabVIEW so it's probably why). See picture below:
So I tried to find a solution on my own, and I came up with this very basic code:
And I placed the Front panel so it's simpler to observe what I intended all along (I probably didn't explain myself very clearly)
I use 17 in the loop so it goes to the beggining, showing it is usable and it works (see attached vi).
Again, thank you to everyone and I apologize if I wasn't clear in my previous explanations.
Cheers!
P.S.: Who should I mark as the solution? And can I give kudos to more than one user?
11-03-2009 10:08 AM
11-03-2009 11:48 AM
Rsilva wrote:Thanks everyone for their input.
jcarmody and Nickerbocker offered possible solutions to what I want, except for the following:
-jcarmody: the idea was to use only native code to LabVIEW so it could run in every PC in the lab without having to install third-party
vi's, however I have placed a bookmark in the page and will probably use it in the near future if necessary.
Thanks again.
-Nickerbocker: your solution was very much what I wanted, however I am using LabVIEW 8.5 in my Mac and 8.6 in the Department. As I was working at home with 8.5 I could not find a particular vi in your code (I am new to LabVIEW so it's probably why). See picture below:
![]()
So I tried to find a solution on my own, and I came up with this very basic code:
Message Edited by Rsilva on 11-03-2009 08:06 AM
I think that is 'Matrix Size' it works on non numeric 2D arrays as well, you could use an array size an index out the first element (or second).
You made yourself quite clear.
<plug>
I advice you to use the Code Capture Tool to create images of a part of code you could use the code.
To download
</plug>
Ton