I am wondering if I can set pause trigger on the connected terminal? I am using "DAQmxConnectTerms" to connect two PFI lines, and getting reversed pulses by feeding in an external pulse source. The question is can I have the reversed pulses being modulated by another PFI line using pause trigger? The idea is to have the reversed pulses only available when the modulation is high. Of course, the modulation signal will be slower than pulses. Thanks in advance for responses.
Hi skuo1008 - What hardware are you using for these different PFI lines? I have attached a document below that shows how to use pause triggers but how you will depend on where these different PFI lines are coming from.
NI-DAQmx Data Acquisition Triggering Techniques Using LabVIEW
I am using PCI-e 6321 and ANSI-C of DAQmx. When I connect terminals by "DAQmxConnectTerms", no need to specify a task handle. However, a task handle is required when I want to set start pause trigger. What I am trying to achieve is to connect PFI0 and PFI1, and feed PFI0 with external pulses. Then modulate PFI1 by using PFI2 as a reference pause trigger. I would expect to have periodic external pulses when PFI2 is high. Is it possible to achieve?
It might be simplest to just use the output of an AND gate fed by PFI0 and PFI2.
One would normally approach this kind of thing with a counter task, but that's gonna end up as a dead end for this situation. Repeating PFI0 over toward PFI1 would require setting up a retriggerable single pulse task. But then you couldn't also use PFI2 as a pause trigger. (Only 1 type of trigger at a time)
My next idea is to make a dummy DO or DI task. Configure PFI0 as the Sample Clock Source and PFI1 as the Sample Clock Terminal. Then you should be able to also configure PFI2 as a pause trigger.
Both approaches would mirror the freq of PFI0 pulses onto PFI1. Neither would mirror the duty cycle. Only the external AND circuit would do both.
Is there AND gate capability by using NI DAQmx? Like you mentioned, apply AND gate fed by PFI0 and PFI2.
Can I apply start pause trigger on counter output task? If I have a counter output task which generate continuous 100 KHz pulses, can I have it to be modulated by another PFI line with pulse frequency of 1Hz for example? If yes, it might solve my problem here.
No pure AND gate capability within DAQmx nor on any of the common DAQ devices I know about. It would need to be an external circuit.
You can definitely generate your own 100 kHz pulse train with one counter and configure it to be pause triggered by another PFI line. You could have another task running another counter that outputs 1 kHz (or whatever) to that PFI line. Keep in mind that the 100 kHz pulses you generate onto PFI1 would not be synced with whatever signal is coming in at PFI0.