LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

routing analog input to analog output with digital input control

First of all, I apologize if there's a simple solution to this, but this problem is for someone else's project and I don't really have time to give the forum more than just a quick glance over. Here's what I want to do:

I have 2 analog signals I'd like to route through my PCI-6221 directly to the analog outputs. Should the phase difference between input and output be small enough, then a digital trigger will control whether the inputs are routed or not. Circuit-wise, this would be very easy but we don't have that capability for a few weeks and if there's a simple way to route analog inputs to the analog outputs, then we'll of course try to use the computer.

It seems like there's some powerful VIs to route PFI/RTSI/Analog Start&Trigger lines just about anywhere, but I think all the source and destination lines are all digital and counter lines Please correct me if I'm wrong. I've made measurements using a continuous analog aqcuisition and routed the AITrigger to RTSI0 which I used on another task to make a single period measurement so I could change the trigger level, but I couldn't figure out how to use any of those VIs to map something ai0 somehow to ao0. Maybe I don't really know how PFI/RTSI lines work.)

There was a thread that someone posted a solution to routing analog outputs to inputs to verify correct board funtioning by inputting "_AO0_vs_AOGND" or something like that as the input channel (Rather than ai0 or ai1). Unfortunately, the PCI-6221 isn't an E series device and no longer has that as an internal channel name so that doesn't work. And I'd of course need a solution for the opposite scenario: inputs routing to outputs.

(btw, here's the thread: http://forums.ni.com/ni/board/message?board.id=250&message.id=5971&requireLogin=False)

Any ideas out there?
0 Kudos
Message 1 of 4
(2,712 Views)
There is actually a way to do just what you are trying to do, and it's very simple to do in DAQmx. What it sounds like you are trying to do is to read the value of an analog output.

To do this you need to follow these steps:
  1. Place a DAQmx Physical Channel Constant/Control in your program.
  2. Right click on the Constant and click I/O Name Filtering...
  3. In the window that opens make sure to select Internal Channels and click okay.
  4. Now select the channel "_ao0_vs_aognd" and/or "_ao1_vs_aognd"
You are now able to select any of these internal channels as a voltage that you are able to read.
0 Kudos
Message 2 of 4
(2,697 Views)
I actually read another thread with this example, but my problem isn't that I want to read an analog output, rather I need to do the reverse, write and analog input. Later then, I'll see if I can "interrupt" the writing with an external trigger (high means the signal is routed, low means it's not etc.)
0 Kudos
Message 3 of 4
(2,690 Views)
What you are trying to do would best be done by an external switch that is controlled by one of the digital lines from the board. A switch would simply let your signal work directly as an output (or you could have an Op-Amp connected to it if you might have a bit of a current draw).

The boards you are using though have isolation between the analog output and the analog input lines. As such you won't be able to directly route a signal from an analog input to an output.

Your only alternative would be to programmatically write the most recently read value to your analog output line. While this would work, it would be limited to your loop rate; therefore, probably not the most ideal solution for your case.
0 Kudos
Message 4 of 4
(2,668 Views)