Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

using NI9201 in DAQ9712 for input a trigger signal

Hi all,

 

I want to run a VI able to receive a trigger signal through an NI9201 a once the trigger is detected to generate a voltage output by a NI9263. I’m using a cDAQ9172. For that I made the .VI attached. It works well when the pulse duration of the trigger signal is large enough (seconds) but when it goes to milliseconds it is not able to detect the trigger and therefore there is no output. Is there any way to speed up the process and make it able to deal with short pulses?

 

Thanks,

 

David

0 Kudos
Message 1 of 8
(4,626 Views)

dsmh, 

 

Have you considered breaking up your code into parallel loops?  Please see the following application design pattern:

 

https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labvie...

 

 

0 Kudos
Message 2 of 8
(4,600 Views)

Hi Devon,

 

Thank you for your reply. I see what you mean. So I should put the analog input in the first while loop and the output in the second one, is that right? Do you think it will increase the sampling rate of the NI9201? I made a tryal removing the analog output from the loop and only leaving the analog input + the trigger detector, and the problem still persists. I don't know if replacing the DAQ assistant by the DAQmx elements should improve it.

 

Thanks again,

 

David

 

 

 

 

0 Kudos
Message 3 of 8
(4,598 Views)

Breaking your code up into producer/consumer loops should help optimize your code, i.e. create a loop that acquires the data and puts your data in a queue, and then create another loop that dequeues your data.  Can you please provide screenshots of your modified code?

0 Kudos
Message 4 of 8
(4,575 Views)

Hi Devon,

 

Here is what I made till now. I separated the original loop into two: one with the adquisition and trigger and a second one with the output. Seems that run faster but still not too much. Is that what you were telling?

 

Thanks,

 

David

0 Kudos
Message 5 of 8
(4,572 Views)

Could you please clarify what you mean when you say "Pulse Width" when you are using an "analog" edge trigger?

 

Also, please review this article, it may help you:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YIV5CAO&l=en-US

0 Kudos
Message 6 of 8
(4,532 Views)

Basically what I want is to detect when a pulse (digital, 5V) enters trhough the 9201. Then, when that pulse is detected I want to release a second pulse through the 9263. That two modules are the only ones I have. The output pulse should be a single pulse, modulated in amplitude and width. I hope is more clear now.

 

Thanks again,

 

David

0 Kudos
Message 7 of 8
(4,530 Views)

Hi David, 

 

The devices that you are using are not capable of hardware triggers; therefore, you will have to use a software trigger.  I have attached an example VI that depicts this functionality.  Please let me know if you have any questions. Hope this help.

 

-Devon

Download All
0 Kudos
Message 8 of 8
(4,498 Views)