LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean address loop

Solved!
Go to solution

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!

untitled.pnguntitled1.png

 

0 Kudos
Message 1 of 11
(5,092 Views)
to add to an array you can use the build array.vi
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 2 of 11
(5,083 Views)

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.

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

Use the an array of numbers and rotate array.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 11
(5,071 Views)

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. 

0 Kudos
Message 5 of 11
(5,070 Views)

 

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.  

 

rube.jpg 

PS - The green function is the OpenG Reorder 2D Array.  Don't have it?  Why not? 

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 6 of 11
(5,068 Views)
Solution
Accepted by topic author Rsilva

this is what i did....not sure how memory efficient this is (hmm..)

example of boolean.png

Message 7 of 11
(5,057 Views)

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:

original11.PNG 

 

So I tried to find a solution on my own, and I came up with this very basic code:

 

block diagram1.pngfront panel.PNG 

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? 

Message Edited by Rsilva on 11-03-2009 08:06 AM
0 Kudos
Message 8 of 11
(5,002 Views)
you can give 1 kudo per person and you should mark the person who you feel solved your problem as the solution.
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 9 of 11
(4,984 Views)

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:

original11.PNG 

 

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

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 10 of 11
(4,965 Views)