LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

This should be a simple solution....

Okay, I need to control an analog mux chip via the USB6008 and read back the analog signal for analysis.  There are currently only 8 muxed channels, so I only need a few of the Digital I/O lines, no problem there.  My trouble is in how to efficiently work down the truth table for each measurement.  My first approach was to frame sequence each measurement, with the both IO's in the same frame.  That got clumsy as you can imagine.  So after thinking I have two other possible solutions.
 
1st is to build an array where I call out the first row to reset the mux (000) then row two for my first measurement on channel 1 (001).  This would be done by incrementing a for loop for the reset and clear and measurements in between.  Problem here is, I do not fully understand how arrays work, and if this is even possible.
 
2nd is more basic digital, I think I can use a series of logic gates which get incremented by a for loop.  Problem here is, it has been years since I did any digital work so I am having trouble forming the logic correctly.
 
Any guidance or previous experience would be very much appreciated.
 
Thanks
0 Kudos
Message 1 of 3
(2,528 Views)

Since the USB 6008 has 8 analog inputs, I don't quite understand why you even need a mux.

I gave a solution here for a 16:1 mux. Below is a slightly different version where the first DAQ Assistant is set for Digital Port output. The second DAQ Assistant is an analog one for channel ai0, The for loop autoindexes the results so you have an array of results - each element corresponds to one channel of the mux. I also am not sure why you would need to have 000 to be a reset or no input. With most muxes, this 000 would correspond to channel 1. The way you are doing your logic with 001 being channel 1, then 111 would be channel 7 and what would be the decode for channel 8?

 

Message Edited by Dennis Knutson on 03-29-2007 08:23 PM

0 Kudos
Message 2 of 3
(2,516 Views)
Dennis

Thanks for the reply, that is simpler than I thought.  We need the mux because the signal on channel 1 has some pre-processing done via hardware before we can bring it into the PC, and we will have between 8 and 16 channels at any given time.  The remaining channels will be collecting the remaining (albeit dissimilar) data.  The clear is necessary to reset the mux back to channel 1 before a rescan for those signals, and yeah after I posted I realized I had not gone high enough on the logic.  I will try this out and let you know how it works.

Nate
0 Kudos
Message 3 of 3
(2,489 Views)