LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using analog output to trigger analog input.

I'm having some troubles with a project I am working on and appreciate any help anybody can offer.
I am using a PCI-MIO-16E-1 card and I want to send out a short analog output waveform everytime a point is reached in my program loop (the output is not continuous). I want this output to trigger an analog aquisition on the same board. This aquisition also is not continuous and only lasts for the duration of the output (which is a set time, so the AI doesn't have to rely on the AI time.) They will be operating at different speeds and this needs to be done fairly often, but again, only when that part of the program is reached.

All other similar help that I found was either dealing with continuous AI or AO, or
used an outside trigger.

Currently, I have the AO signal going to a different AI channel and I am doing an analog trigger from that. This isn't working out though because it's an odd output signal and is causing mistriggers.

Any help is greatly appreciated.
-Tom S.
0 Kudos
Message 1 of 3
(3,144 Views)
I don't know if it's possible to trigger an acquisition from an output generation but it's possible to do it vice versa (start an output generation with the input acquisition start).

I suggest you to look at the online help for AI Trigger Config and AO Trigger Config (both found in the respective Advanced VIs palette) and at the LLB attached to this message that a NI technician sent to me some time ago (Simul AI AO Buffered SW Trigger.vi).

As a workaround for your actual problem, I could think to a scenario like that:
- Config the AO generation to start when AI starts
- Config AI to start at an external digital trigger. Define the lenght of the acquisition so that fulfills your requirements (given the scan rate, you could calculate buffer lenght to obtai
n an acquisition long exactly how the output generation)
- Use a digital IO to start the acquisition (connecting the DIO output to the correct PFI pin for AI trigger).
That way, when in your program you reach the point in which generate and acquire simply rising the digital line will start the AI and that one will start the AO. Both processes will continue independently and will end when defined in configuration.

I used a similar system (except the digital IO to start the process) to drive a motor in an alternator test bench: the generator i driven with a speed ramp while the card is acquiring AI channels; it works.

Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,144 Views)
It just occurred to me now that both AI and AO can trigger on a PFI pin: this is another way to syncronize the starting of the two processes if you use the same PFI pin.

If you want to avoid the external pin to start the acquisition and generation (and don't need to syncronize that event with a particular external event), simply use AI Start for a software start and config the AO to start on AI start trigger.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 3
(3,144 Views)