Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx: Analog Input Directly to Analog Output on Hardware Level

Solved!
Go to solution

Hi All,

 

I searched around for a while, but I found no suitable implementation for what I'm trying to do.  Someone where I work has presented me with an interesting challenge.  Is there a way to set up a DAQmx task (or otherwise configure an MIO board) to route an analog input directly to an analog output on the hardware level?  You may be thinking, "why on earth would you want to do that?!"  To reduce electrical complexity, a colleague would like to simultaneously read from an analog input while "duplicating" its signal on an analog output.  I know that I can easily accomplish this while buffering through the PC, but they're interested in ensuring that the output signal is as similar to the input signal on the KHz level, while introducing a minimal difference in phase (lag from the PC's buffering).

 

For the record, we have mostly older E series boards around here like the PCI-6070E (PCI-MIO-16E-1).  I was first asked if it could be done via SCXI, but I thought I'd start by asking regarding the MIO boards. 

It sounds like a long shot and I've never heard of anyone ever doing this, but I thought I'd ask to be sure!

 

 

Thanks,

 

 

Jim
0 Kudos
Message 1 of 8
(4,512 Views)

Hi Jim,

 

This is possible, when selecting the physical channel of your DAQmx create channel vi, right-click and select I/O Name Filter  to open the following window. Ensure you select Internal Channel as an option when selecting channels. 

 

IO Name Filter.PNG

 

_ao0_vs_aognd.png

 

.../_ao0_vs_aognd should now be a selectable option as an input.


Regards,
Glenn
0 Kudos
Message 2 of 8
(4,477 Views)

Hi Glen,

 

Thanks very much for getting back to me.  I was aware of this trick for reading analog outputs from an input task, but that's not what I'm trying to do.  (Am I not understanding your solution correctly?)

 

What I'd like to be able to do is configure an analog output to duplicate the voltage on an analog input. The easiest way that I can explain it is that I'd like to accomplish the equivalant of what's happening in this snippet, except without buffering through software (and at a higher sampling rate).

 

As I'm writing this, I'm feeling rather sheepish - maybe this is a downright silly thing to be trying to do.  Smiley Very Happy

 

Can it be done as described?

 

Thanks again,

 

Jim

 

AI_AO.png

 

0 Kudos
Message 3 of 8
(4,466 Views)
Oops... Glenn, pardon me. I misspelled your name.
0 Kudos
Message 4 of 8
(4,457 Views)
Solution
Accepted by topic author Mr._Jim

Hi Jim,

 

Using our driver there is not a way to generate data directly from the AI FIFO, it has to first pass through software.  You can try the following code to output a duplicate AI on the AO line to see what kind of delay you might expect.  It's similar to your original code with a few necessary tweaks:

 

Use AO to Output Delayed Version of AI in DAQmx

 

 

From what it sounds like you need to do, you might instead consider looking into using a voltage follower to isolate Vin from Vout.

 

 

Best Regards,

John

John Passiak
Message 5 of 8
(4,443 Views)
Hi John,

That's exactly what I needed to know. I didn't think that there was a way using the driver in this manner, but I was urged to ask anyway. Also, a big thanks for the hint on the voltage follower circuit. This seems like a good fit for what we're trying to do, certainly not contributing nearly as much to the "jury rigging" factor! I'll see if I can nudge things in that direction over here.

Thanks again to both of you - I'm always grateful for the excellent support.

Regards,

Jim



0 Kudos
Message 6 of 8
(4,430 Views)
You can have another benefit by using a voltage follower: as long as you stay within the op-amp's slew rate, you will more closely copy the AI waveform since you won't generate the glitch energy that the AO subsystem has on the 621x devices. [1]

[1] USB-6211 output anomilies
http://forums.ni.com/ni/board/message?board.id=250&message.id=39666&requireLogin=False
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
Message 7 of 8
(4,426 Views)
Wow, thanks for the heads up. I was already sold on the voltage follower, but I'm definitely going to file this information away in the back of my mind. Applications that would be sensitive to that sort of glitching are rare around here, but it's bound to come up at some point.
0 Kudos
Message 8 of 8
(4,421 Views)