I'm using a cDAQ chassis 9178 with a NI9205 AI and a NI9402 Digital module. What I'm trying to do is sync a DO line to trigger a AI channel to start a acquisition on the edge trigger. I have looked at various examples but I'm not finding anything that this can be done. I'm using LabView. Can this be done with the 9178 chassis to sync events between modules? Without using another AI to read the value of the DO line back as feedback?
Ultimately I want to put them both on a waveform graph to capture the response time of a DUT to the switching of the port.
You should be able to synchronize the two tasks by configuring both to share the same clock and start trigger. There's a shipping example that shows one way you might do this in LabVIEW under Help >> Find Examples..., called Hardware Input and Output >> DAQmx >> Synchronization >> Analog Input - Synchronization.vi
This example shows two analog input tasks synchronized, but the basic process should be the same to set a digital channel to share the AI clock and trigger.
You can find more details about DAQmx task synchronization in this tutorial: http://www.ni.com/tutorial/5376/en/ The sections on start trigger and sample clock synchronization will be most relevant.
Still working on this project. I want to start a AI read when a signal is detected on a digital port and then combine the signals so that I can measure the timing between the digital input and the slope received on the AI waveform. I would like use the internal sync of the CDAQ module or monitor the input of the signal to trigger the AI. I'm using the CDAQ 9178, DI 9425 (24V), and NI9205 module. since the 9425 is a 24V input I cant wire it back to the 9205 trigger input directly. This is why I want to do the above. all of the examples show two AI signals not a DI to AI.
I misunderstood. I thought you wanted the two tasks to start at the same time, and take samples at the same rate. If you'd like to use the digital input like a trigger for the AI task, I'm afraid that's not directly possible with a cDAQ chassis. Triggers can only be configured using chassis or module PFI lines, which as you note, have different voltage limits than your DI module.
If you are trying to put the two signals onto a single chart to measure timing between them, the best way may be to configure the two tasks as I suggested in my last post. That is, make the AI task use the start trigger and sample clock of the DI task. That would guarantee that the two tasks start at the same time, and take samples at the same time, allowing you to reasonably compare the two signals. You'd still see a slight skew due to the routing of the trigger and clock through the cDAQ backplane, but depending on your requirements that may be tolerable.
The process will be the same as synchronizing two AI tasks in our examples, just with the DI task swapped for the master AI task.
Which sync type should I use in the example, all are giving errors with the CDAQ module? Also when I change the master task to a digital task it will not allow me to select the NI 9476 output module as a digital output. Cam this be done between a 9476 and a 9205? Little confused on what needs to happen
I have modified it to look like what I think it should do. The task BT_Out_AddAir is a task in Max for controlling the digital output. Not sure if the ai/startTrigger is correct but when I run it I get an error
Error -89131 occurred at DAQmx Start Task.vi:7220002
An attempt has been made to perform a route when the source and the destination are the same terminal.
In many cases, such as when configuring an external clock or a counter source, you must select a PFI, PXI Trigger, or RTSI line as the source terminal.
Source Device: cDAQ1
Source Terminal: ai/StartTrigger
Task Name: _unnamedTask<1A>
The important stuff is hidden inside the subvi that does some config for your DO task. Odds are, you'd need to specify "do/StartTrigger" as the signal you wish to export out from the DO task over to the AI task.
However, your original message makes it sound like you may want to trigger AI *not* from the start of the DO task, but when one of the DO *signals* changes state. I don't know the cDAQ hardware, but perhaps a very-low-current-draw voltage divider would let you bring the DO signal back into an input that lets it be used as a trigger signal for AI?