12-11-2014 03:53 PM
Hi,
I have a 16 to 1 multiplexer which feeds its analog output to a PCI acquistion card connected to labview. My Question is:
How to demultiplex the analog output of the external 16 to 1 multiplexer?
I can control the external multiplexer by 4 digital outputs from the PCI card using labview. But I do not know how to implement an analog "demultiplexer" in labview which should be synchronized with the external 16 to 1 multiplexer using the 4 digial output.
Any ideas are greatly appreciated,
Best,
mdaghrah
12-12-2014
06:51 AM
- last edited on
06-04-2024
04:59 PM
by
Content Cleaner
Personally, I would just go with something like the PCI-6010. It has 16 Analog Inputs that you can read with a single DAQmx task.
But if you insist on going the complicated route, you need to sample your MUX select lines as well with analog inputs. By looking at the state of the measured MUX select lines, you know which channel to put that voltage reading.
12-12-2014 10:12 AM
Thanks Crossrulz, I already have my hardware so I cannot change. is there a way to implement something like a 1 to 16 analog demultiplexer? Could you be kind to decribe the long possible way?
Perhaps this is easier done on MATLAB?
Best,
Muhammad
12-12-2014 10:51 AM
12-12-2014 11:28 AM
@mdaghrah wrote:
Thanks Crossrulz, I already have my hardware so I cannot change.
That is never a good excuse. Let me put it this way. If you get paid $25/hour, you have 13 hours of your time to get this difficult way to work in order to be cheaper than just buying the card that does the job for you. And if you are doing this for a company, they are probably charging more around $100/hour to the customer. That gives you 4 hours. And I'm pretty sure you have already burned that just asking how to do this here on the forum.
Yes, my charge numbers are quite low. So those hours are actually more than you probably will actually have.
@mdaghrah wrote:
Could you be kind to decribe the long possible way?
You have to sample the MUX address lines along with the mux output voltage. For each sample, you then have to decode the MUX address lines to figure out which location in your array to put the analog data. Use shift registers to keep you data in.
12-12-2014 11:45 AM
12-12-2014 11:54 AM
@Dennis_Knutson wrote:
If you have the low level digital write and analog read inside a for loop, the the auto-indexing feature will automatically create a 16 element 1D array.
Good idea. The sampling rate would be horribly slow (which you are probably stuck with anyways due to the nature of the digital IO). You also need to add a small delay to allow the mux to actually switch before reading the voltage.