LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

demultiplexing multiple signals from single channel of myDAQ

Hi guys!

 

I am currently working on a certain project.

 

I am using an NI myDAQ device to accept multiple inputs from one single channel. The scenario is like this:

4 microphones -> Multiplexer (Hardware) -> Analog Input of myDAQ -> Computer -> Labview

I wanted to demultiplex those four inputs from the microphones. I can vary and control the switching speed of the Multiplexer and I can also control what microphone is entering the myDAQ. However, I can't seem to find a way how I can demultiplex the signal in LabVIEW. I understand that I need to time or sync properly the switching inside the labview so that I can get the correct Signal.

 

Is there any way to implement this? Remember that I can control the multiplexer and i can determine what microphone is currently entering the DAQ. I just need to put the input signals into different places (demultiplexing) let's say getting each of the signals to a different algorithm, or to a different VI. Bottome line is i need to separate and save those four signals inside the labview.

 

THANKS MUCH!

0 Kudos
Message 1 of 7
(3,419 Views)
Sounds pretty trivial to me. You asked the exact same question at http://forums.ni.com/t5/LabVIEW/How-to-control-or-know-the-iteration-speed-of-While-Loops/td-p/31784... and marked your question as solved. If you still have problems, attach your code.
0 Kudos
Message 2 of 7
(3,408 Views)

Well yes. Before, I thought using bit counters will solve my problem.

 

During that thread, I was able to create a bit counter to create "ON-OFF" behaviour. The ON OFF produces 4 different outputs:
1 0 0 0

0 1 0 0
0 0 1 0
0 0 0 1

which I used to ON-OFF Relay VI and thus separate the signals at certain time.

however, It malfunctions and is very dependent on the switching of the Bit counter. I can post the VI here if you wanted to see how I implemented it.

But after demultiplexing, I need to analyze those signals separately. The signals I separated doesn't save. It returns to zero after the Relay is switched OFF.

 

I am going nuts about that and I intend to find a different way to do this demultiplexing without depending on a separate VI (bit counter) + another switch VI (relays). 

Thanks Much!

>>>>I'll send the VI a bit later, I left it at the computer laboratory at school. I'm on the way there.

0 Kudos
Message 3 of 7
(3,400 Views)
No, you cannot use a counter output. You must use individual digital lines. There is no easy to that I know of to synchronize a counter output with aDAQmx read. Using digital lines is going to be slower but it's simple to implement. Otherwise, upgrade to more capable hardware.
0 Kudos
Message 4 of 7
(3,383 Views)
Yes, that is why i am considering other methods and will disregard the use of bit counters.
0 Kudos
Message 5 of 7
(3,378 Views)

Sir, this is my code that I previously used using 2 Bit counter.

 

My problem there is that the individual channel outputs doesn't save and returns to zero. I used RelayVI for this and the 2bit counter ON-OFF behaviour to alter each channels. 

Any suggestions on how I can improve this? I am thinking of sampling, but I do not know any means how I can do sampling in here.

 

Thanks in advance!

Download All
0 Kudos
Message 6 of 7
(3,332 Views)
Can you attach an image of the block diagram? I'm posting from my phone. There is no need for that silly express VI and as I've said, the counter output is just inappropriate. A DAQmx Write set for digital output inside a for loop with the iteration terminal connected to the value to be written is all that you need. Do you understand you only need to count from 0 to 3? That is exactly what the iteration terminal does.
0 Kudos
Message 7 of 7
(3,316 Views)