Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Period measurements + Voltage measurements with digital trigger

Hi all,

I'm looking to buy a card (or 2 if 1 is not enough) for a very specific application. 

I have 2 digital inputs and 1 analog input. I need the period measurement of the 2 digital inputs but they will have to be synchronized in time i.e. I need the starting time of the period measurements to be the same for both.
On top of that I want one of the digital signals to trigger a voltage measurement on the analog input (one data point). I attached a scheme of the application.  

I had the pci-6602 in the past and I encountered problems with the period measurement application. This problem has been discussed several times in this forum one such discussion is in the following link:
http://forums.ni.com/ni/board/message?board.id=40&message.id=4734&view=by_date_ascending&page=1

I'm using a random signal which will probably generate a quick burst every once in a while. This is also the signal I want to use as a trigger for the voltage measurement.

The USB-621x bus powered M series card is recommended for the period measurement application.
Has anyone tried the period measurement application with this card?

Lets say I will get this card and use it to detect the period measurements of both digital signals. Is it possible to synchronize them?

That card does not have a digital triggering option which will make it necessary to get another card for the voltage measurement. Does anyone know if it is possible to trigger a voltage measurement with a random signal which will probably arrive at an average frequency of about 100kHz .

Any advice will be very appreciated,
Eyal
0 Kudos
Message 1 of 5
(3,987 Views)
I just realize I can try to trigger an analog measurement with a digital signal as an external clock. However, when I tried testing this method with a pci-6251 I encountered some problems. This is a whole different issue so I posted it in the following link:
http://forums.ni.com/ni/board/message?board.id=40&thread.id=6433
It is just worth mentioning that the USB-621x bus powered M series card has a relatively slow sampling rate so I will probably need a different card for the voltage measurements.


0 Kudos
Message 2 of 5
(3,975 Views)
Hello Eyal S.

Thanks for your post!

I would just like to reiterate that you can use a digital signal to either trigger your tasks or use that as the sample clock. If you want to use this as your sample clock there is an input parameter on the DAQmx Timing.vi that allows you to set an external line as a sample clock. This is usually a PFI line however you can send an internal signal as well such as the 10 MHz clock timebase. There is also the DAQmx Triggering.vi that allows you to set a digital trigger to start your task. Let me know if this helps you even more with what you have found. Have a great day Eyal S.

Cheers!

Corby_B
http://www.ni.com/support
0 Kudos
Message 3 of 5
(3,957 Views)
Thanks Corby_B for your reply.

I tried using a PFI as an external clock but I had some problems with that (I posted a question about that in a different thread listed above).
The only internal clock I can use with my card is the 100kHz clock (10MHz is higher than the sampling rate). I can also generate a clock from a different counter and choose the desired rate but this is not the application I need.
I might be able to use the trigger option... I'm still struggling with that. I need to trigger an one sample measurement when ever I get a pulse from an external device. I'm still trying to figure out how to do that with a trigger. However, I'm not sure about the advantage of doing that over using the pulses from the external device as an external clock.

Thanks again,
Eyal

0 Kudos
Message 4 of 5
(3,953 Views)
Hello Eyal S.

Thanks for your post back!

I wanted to refer you to a link that talks about using triggers in DAQmx. If your question is about programming I feel that this will really help. So what you would do is use the signal source as a trigger to take one reading from the hardware. The only thing is that this would be a start trigger so you would have to stop and then restart the task. Using the DAQmx Control Task to commit your hardware configuration and that will increase your start and stop times. However it will depend again on what your incoming signal speed is. Take a look at the link below that talks about triggering:

Tips and Techniques in Data Acquisition Triggering - NI-DAQmx

Let me know if any of this advice helps you with your application!

Cheers!

Corby_B
http://www.ni.com/support
0 Kudos
Message 5 of 5
(3,938 Views)