LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control dual 16 (32) channel multiplexers with Labview?

I need to control 3 of the 32:1 analog multiplexers (ADG726/ADG732) to make 120 channels. The multiplexer has 5 bit binary address lines A0, A1,A2, A3, and A4 to control( set each to high or low) at the same time I need to read data from 1 analog input.  Then I need to format data from analog to csv / excel file. I attached a sample turn on and off LED. I really help to control these binary lines.

Thank you

Download All
0 Kudos
Message 1 of 11
(472 Views)

Please share the VI in LV2020 or older.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 11
(463 Views)

I created this sample turn on and off LED in LV2020. 

0 Kudos
Message 3 of 11
(403 Views)

Thank you for attaching your code.  To do this efficiently, you need to learn DAQmx, and not use the Dreaded DAQ Assistant (DDA).

 

You say you are using 3 32-channel multiplexers to handle 120 channel.  3x32 = 96 -- how were you planning to handle the 120-96=24 additional channels?

 

Each multiplexer needs a minimum of 5 digital inputs, for a total of (at least) 15 digital signals.  How are you generating these?

 

You seem to have a single A/D converter.  Are you planning to "synthesize" a 120-channel A/D converter from your 3 32-channel multiplexers and your single A/D converter?  To achieve a (single-channel) sampling rate of 1 kHz will require the A/D converter to run at 120 kHz, ideally sampling slightly after the multiplexer "attaches" the analog signal from one of the 120 inputs to the A/D input.  This sounds very tricky, to me.

 

We did something considerably less ambitious than this, running (up to) 16 channels of 2 analog signals, using 16 multiplexers, 16 A/D converters, and a myRIO (could have used a single-board RIO) to acquire bursts of data at 10 kHz in a LabVIEW Real-Time application.  This project took a team of engineers and experienced LabVIEW developers a few years of work (we had other projects going at the same time).

 

Do you have a team supporting this effort?

 

Bob Schor

0 Kudos
Message 4 of 11
(395 Views)

Do you plan to hook them up like this?

santo_13_0-1721607035885.png

 

If so, you need 9 lines to select a channel out of 128 possible channels. To make it hardware impossible to accidently select more than one channel and there by shorting signals, use another 1x4 mux to select the EN of the MUXs.

So, roughly, you will need 7 digital lines to select the channel, now in the software layer you need to implement the logic to map the user selected channel to respective combination of digital signals to instruct these set of MUXs to work.

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 5 of 11
(382 Views)

I'll confess, I'm not an electrical engineer  -- I'm inclined to believe @santo_13 saying you can use 9 digital lines to select a specific channel out of 128 (128 = 2^9),  I'm uncertain how to interpret the wiring diagram, but  I trust you know what you are doing ...

 

Bob Schor

0 Kudos
Message 6 of 11
(379 Views)

Basically, it is possible but it is tightly coupled with actual hardware and connections. If you share the exact hardware connection and the DAQ, more useful guidance can be shared.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 7 of 11
(368 Views)

santo_13_0-1721607035885_Edited.pngThis is how I wire it. I am going to use NI USB 6009. The USB-6009 doesn't have enough digital out channels, but I can modify this wring based on how I program it in LabView. Right now I am focusing on controlling each digital out channels. I read and tried some example with NI LabVIEW provided and forum. I have an idea, but I don't know if it is going to work or not and I need helps to start. In additional, I am new to LabVIEW. My idea is to use shift register to get the program starts execute (from 1 to 32 values) then each value has its own case structure that control which channels are low and high.  For example, set A0 =0 , A1 =0, A2 =0, A3=0, A4 = 1 to select pin 1 of ADG732. In each iteration I read signal (analog input) to USB 6009.  

0 Kudos
Message 8 of 11
(361 Views)

@Henry_M wrote:

santo_13_0-1721607035885_Edited.pngThis is how I wire it. I am going to use NI USB 6009. The USB-6009 doesn't have enough digital out channels, but I can modify this wring based on how I program it in LabView. Right now I am focusing on controlling each digital out channels. I read and tried some example with NI LabVIEW provided and forum. I have an idea, but I don't know if it is going to work or not and I need helps to start. In additional, I am new to LabVIEW. My idea is to use shift register to get the program starts execute (from 1 to 32 values) then each value has its own case structure that control which channels are low and high.  For example, set A0 =0 , A1 =0, A2 =0, A3=0, A4 = 1 to select pin 1 of ADG732. In each iteration I read signal (analog input) to USB 6009.  


If you adopt my connections, you will need only 8 DO lines whereas USB-6009 has 13 DO lines.

 

Now, create a VI whose input is a numeric value of the channel to select and the output is an U8 or array of booleans that represent the A0:4 and EN0:2 states to select that channel.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 9 of 11
(356 Views)

@Bob_Schor wrote:

I'll confess, I'm not an electrical engineer  -- I'm inclined to believe @santo_13 saying you can use 9 digital lines to select a specific channel out of 128 (128 = 2^9),  I'm uncertain how to interpret the wiring diagram, but  I trust you know what you are doing ...


The address lines (A0-A4) go to every MUX chip.  You then have an individual Enable line for each MUX chip.  This ends up with 5 address signals and 4 enable signals, adding up to 9 digital signals required.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 10 of 11
(346 Views)