01-25-2016 05:34 AM
I have the DAQ NI USB-6210 and I need to create a digital trigger. I have a program in c that samples an analog input at the rising edge of digital trigger. But I don't know how to create this trigger and how to send it to my DAQ.
Thank you.
01-26-2016 01:59 AM
Hello Ferz,
for using the digital signal as trigger you have to send it in input to to your device.
Then, in the DAQmx function in which you set the trigger, you specify as source of trigger the channel in which your signal is connected.
I hope my answer helped you.
Kind regards.
01-26-2016 10:14 AM
Thanks!! But I don't know how to create the digital trigger because I use Matlab to create signal, but I don't how to create a digital signal like a rectangular pulse. Which format should I use? Thank you!!
01-26-2016 10:19 AM
Hey Ferz14,
so do you want to create a digital pulse using your board?
You just have to generate a digital pulse using the DAQmx function choosing the time duration.
So once you have generated it you have to send it back using a wire abnd choose it as your trigger source.
Kind regards
01-26-2016 10:24 AM
Sorry, I didn't specify. My work is to sample an analog input at the rising edge of the digital trigger. I send a file audio (a sine wave) and my DAQ samples the signal when receives the trigger. But I don't know how to create this trigger.
01-26-2016 10:43 AM
Do you want to generate an external trigger? If not, you can generate a digital trigger writing in one of the trigger channel of the board (PFI0..3) your digital signal.
Once you generated it, you can create the task of acquisition using as trigger the channel you chose before.
If you want to generate a digital trigger you have to think about how you can do it, there are many ways to do it.
Kind regards.
01-26-2016 10:58 AM
It's correct!! I created the task of acquisition using as trigger the channel PFI0. But I don't know how to write the digital signal. How can do it? Thanks!!
01-26-2016 11:12 AM
Hey Ferz,
please find attached a simple vi which explains you how to generate a digital waveform on a DO of the board.
Kind regards.
01-26-2016 11:45 AM
01-26-2016 01:52 PM
I have to create a digital signal with matlab. The digital signal is my trigger that I send to my DAQ. So the analog input will be sampled. It's right? Thanks for your suggestions