Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create and send digital trigger?

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.

0 Kudos
Message 1 of 15
(4,752 Views)

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.

0 Kudos
Message 2 of 15
(4,732 Views)

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!!

0 Kudos
Message 3 of 15
(4,714 Views)

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 

 

0 Kudos
Message 4 of 15
(4,710 Views)

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. 

0 Kudos
Message 5 of 15
(4,705 Views)

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.

0 Kudos
Message 6 of 15
(4,701 Views)

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!!

0 Kudos
Message 7 of 15
(4,699 Views)

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.

0 Kudos
Message 8 of 15
(4,695 Views)
Generating a trigger with the same board that you are using to acquire seems silly. It sounds like you need an external trigger. If whatever is generating the analog signal does not have a pulse output that can be used for a trigger, then you can use external circuitry on the analog signal to generate the digital pulse. For example, a comparator can be used to generate a trigger when the amplitude of the analog signal exceeds some value.

Do you really understand the purpose of a trigger? What is the purpose of the trigger as supposed to just doing a continuous acquisition without a trigger?
0 Kudos
Message 9 of 15
(4,685 Views)

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 

0 Kudos
Message 10 of 15
(4,680 Views)