07-19-2024 02:33 PM
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
07-19-2024 02:55 PM
Please share the VI in LV2020 or older.
07-21-2024 06:06 AM
I created this sample turn on and off LED in LV2020.
07-21-2024 07:50 AM
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
07-21-2024 07:13 PM
Do you plan to hook them up like this?
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.
07-21-2024 07:29 PM - edited 07-21-2024 07:30 PM
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
07-21-2024 09:22 PM
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.
07-21-2024 10:38 PM
This 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.
07-21-2024 11:18 PM
@Henry_M wrote:
This 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.
07-22-2024 08:29 AM
@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.