01-15-2013 10:36 AM
I am trying to perform a simultaneous analog output and input on a PCI 6251 board. I would like the both the input and the output tasks to be triggered by a digital signal. The analog output involves two channels, while the input task involves one channel. I trigger the output task from a digital signal wired to PFI6 as follows (ExposeBeamTaskHandle is the ao output task handle):
status:=DAQmxCfgDigEdgeStartTrig(ExposeBeamTaskHandle, 'PFI6', Trigger_Edge);
This works fine by itself, and triggers as expected.
The question I have is if I start the analog task (ExposeAlignTaskHandle), can I trigger on the same PFI6 input, or do I need another input instead of "PFI6" in the line below?
status:=DAQmxCreateAIVoltageChan(ExposeAlignTaskHandle, PChar(AIChannel), '',
DAQmx_Val_InputTermCfg_Diff, -Image_input_voltage, Image_input_voltage,
DAQmx_Val_VoltageUnits2_Volts, nil);
status:=DAQmxCfgDigEdgeStartTrig(ExposeAlignTaskHandle, 'PFI6', Trigger_Edge);
Thanks in advance for your help!
01-16-2013 04:20 PM
Hi Shiva,
This sounds right to me. A PFI line is a digital line that can be used to trigger any task you choose. If you choose to start the AI task manually, you can use the PFI6 line as the trigger to start AO.
Post back if this doesn't work for you.
01-16-2013 09:44 PM
Thanks for your reply. I am not sure you answered my question, which was: can I use the same trigger input (PFI6) to trigger both the ao and ai tasks at the same time? I would like to start the ai and ao tasks at the same time with a single digital trigger.
01-17-2013 12:19 PM
Yes, you should be fine sharing the same digital trigger to start multiple tasks. Post back if you have any issues.
This forum discussed a similar issue, and reported no problem off of the same digital signal, with a caveat for triggering off the same analog signal.