LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop or Cycle Through Switches

Hi Folks!

 

I have a problem, I need to code in LabVIEW a VI that will allow my 16 switches/Multiplexeres (that are attached to 16 electrodes) to act in the following fashion:

 

- 2 Switches will execute a write (injection of electrical current)

- the 14 remaining swtiches will execute individual reading operation (measure voltage)

 

But the problem is that i need to switch from one electrode to another. For Example:

 

1) First Operation - Switches 1 & 2 will be writting and switches 3-16 will be reading

 

2) Second Operation - then I want Switches 2 & 3 to be writting and switches 4-1 (one and not sixteen because it needs to loop through the electrodes) will be reading - Second Operation

 

3) and so on, until switches 16 & 1 are used to write and switches 2-15 are used to read - Sixteenth Operation

 

Does anyone have any advices how to go about this?

 

Hope It's not too confusing...

 

Cheers,

 

Rui 

 

 

Message Edited by Rsilva on 08-04-2009 11:11 AM
0 Kudos
Message 1 of 4
(2,766 Views)

You could create a boolean array of 16 elements and set elements 0 and 1 to True, the rest False.    True means write, false means read and you use index array and connect them to the Switch VI's in whatever way makes them work.

 

After each cycle, use rotate 1-D array for 1 spot to move the two True's further up the array.  Do this 16 times.

0 Kudos
Message 2 of 4
(2,756 Views)

I am new to LabVIEW....

 

Could someone provide some examples or links to tutorials....

 

 

Thanks in advance.

 

Cheers

0 Kudos
Message 3 of 4
(2,702 Views)
I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
0 Kudos
Message 4 of 4
(2,686 Views)