Discussion:
Digital TIming
(too old to reply)
Brian F.
2007-04-17 20:10:15 UTC
Permalink
Hello Adam. 
 
Thank you for contacting National Instruments. 
 
The capability that you are describing is called two signal edge separation.  This process requires either 2 counters on a non M-series DAQ card or 1 counter on an M-series DAQ card.  Please refer to the example in NI Example Finder named "Meas Two Edge Separation".  This shows the functionality that you are looking for with an M-series DAQ device.  The M-series devices use the gate and aux inputs on one counter to do the two edge separation measurement.  Also, you could choose to simulate an M-series device using MAX and then place a DAQ Assistant on the block diagram to do a two edge separation measurement in a matter of seconds.
Unfortunately, the 6009 that you have cannot do 2 edge separation calculations because it only has one counter onboard.  I would recommend upgrading to an M-series device in order to do this type of measurement accurately. 
 
Brian FApplications Engineer
National Instruments
 
 
Brian F.
2007-04-19 03:10:07 UTC
Permalink
Hello Adam. 
There is a way that we could try to accomplish this task using a bit of a workaround.  However, I would like to stress that most of our other hardware can do this much easier. 
If instead of focusing on a counter solution, we focused on an analog input solution, we could get fairly accurate measurements.  What we could do is set up a DAQmx task to sample off of 2 analog inputs quickly (the 2 analog inputs correspond to the 2 digital signals of interest).  After a few seconds of acquisition, we could post process the data to determine when each signal experienced a rising edge.  Then, via the timestamps that correspond to the time when the input signal went high, we could determine the time between the rising edge of both of our signals.  This would give us a fairly accurate measurement of the edge separation, but the results would not be real time.  Thus, if you want to use this measurement to control some other process in your application and this measurement must be returned immediately after the second signal goes high, this solution will not be completely valid. 
You could also do something comperable with 2 digital input lines and continuously monitor their states.  However, this will be much slower since the digital lines sample at a slower rate than the analog channels. 
Let me know if this helps!
Brian FApplications EngineerNational Instruments

Loading...