Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Multiplexer using DAQ Assistant

Hi Folks,

 

I am currently looking into the possibility of multiple multiplexers to read in analog signals obtained from some sensors. I have about 64 sensors, 4 16-channel multiplexers and an NI-USB 6281. Hardware connection is not a problem but I have some problems with LabVIEW as I am new to it.

 

I want to know how this can be done in LabVIEW using DAQ Assistant. I found a solution that is quite close to what I want in this link:

http://forums.ni.com/ni/board/message?board.id=250&thread.id=31136&view=by_date_ascending&page=1

 

The problem is I do not know how to do this in LabVIEW if more multiplexers are involved, in my case 4 multiplexers. If someone could show me how to do this step-by-step, I would be really glad.

Really appreciate the help. Thanks!

 

 

Valhalla!

0 Kudos
Message 1 of 8
(4,930 Views)

If you wish to read from 1 sensor at a time, the best is to use 2-wire 1-to-64 Multiplexer.

Then, use digital output to change a multiplexer channel, and read from analog input connect to it afterwards.

But if you stick to 726, you must read from 4 sensors at once.

You just connect control lines of 4 726s to the same digital output, and all of them will be change to the same channel.

Then, connect data from each 726 to different analog input.

I attach example vi for your reference.

Message 2 of 8
(4,911 Views)

Hi KateB

 

Thanks for your reply! Appreciate it. You are right to say that I have to read from 4 sensors at a time. The reason I want to use four 726 is that I want to make the system expandable. What happen if I want to increase the number of sensors to, let say, 500?

 

I have taken a look at the VI. It seems like it is quite different from what I expected as I thought for 4 muxes, 4 for-loops are needed instead of just 1 while loop with all the components placed inside. Erm, I think I don't really understand how the VI works though as I am new to LabVIEW, especially for data acquisition. Could you please explain to me how each component and the overall system work?

 

Also, do you know how can I design the overall system if I want to use 4 for-loops with each similar to those that I posted in the previous link?

Thanks in advance for your help!

 

 

Valhalla!

0 Kudos
Message 3 of 8
(4,904 Views)

You must use only one loop, since try accessing single hardware from multiple loops causes resource conflict.

You should learn to use an array function to separate data from each multiplex.

Message 4 of 8
(4,879 Views)

Hi KateB

 

After looking through the VI, I still do not really understand it. Why is there a remainder and quotient block? What is the function of address? Why are there two arrays of true/false constant? 

0 Kudos
Message 5 of 8
(4,858 Views)

Why is there a remainder and quotient block?

- To sequence address 0-15 of ADC.

What is the function of address?

- It's address of each ADC channel.

Why are there two arrays of true/false constant?

- To write out a waveform to each pin of ADC. I cannot remember which pin of DAQ connect to which pin of ADC, but you should learn to write it by yoursefl.

Message 6 of 8
(4,844 Views)

Hi KateB

 

I believe the input to the DAQ assistant is always of a constant array. How do you modify it to the one you showed in the reference (a matrix of digital waveform)? 

 

I still could not really understand about the operations of the true/false array included in the reference. Why are they of the form TTTF and FFFF? Is there any special sequence to this?

 

Then, let's say if I want to increase the number of muxes to 5 and the number of sensors to 32 for each mux. What are the modifications that needed to be done? Then, how will the sequence of true/false in the array become?

 

Thanks!

0 Kudos
Message 7 of 8
(4,814 Views)

Hi KateB

 

There is one problem with the reference VI that I noticed. When I tried to run it, it could only run once and then stop without any iteration and I didn't notice any changes on the front panel. But when I took up the wire that connected the 1d array of digital waveform to the DAQ assistant, I found out that the simulation actually ran with iteration until I put a stop and there were some changes noticed on the front panel.

 

What is going on here? Are there any errors with the original reference VI?

0 Kudos
Message 8 of 8
(4,806 Views)