Hello,
It is possible to measure two edge separations on the 6040E, but not with variable voltage thresholds for the input pulses. The analog triggering capability of this card could be used to create a trigger to enable a counter when one of the analog inputs reaches a voltage level, but another analog trigger would need to be used to stop the counter when the other analog input reached its threshold value. This is not possible since the 6040E only supports one analog trigger at a time.
The workaround to this would be to use external circuitry to convert the input signals to TTL voltage levels (with a comparator circuit or something similar). If desired, the comparator threshold values could be software-controlled by using the 2 analog outputs on the 60
40E to output threshold voltages to the comparator circuits.
After these signals are converted to TTL levels the 2 onboard Counters could be used to measure the edge separation between them. Counter 0 should be configured to generate a pulse train, and Counter 1 should be configured to count pulses with a pause trigger on the Gate of this counter. The first signal is sent into the Gate of Counter 0. This begins pulse train generation, which Counter 1 will be counting. When a second signal comes in on the Gate of Counter 1, the counting pauses and the program determines the time between pulses. The second pulse must be long enough for the computer to determine the counting has been paused. Also, the first signal must stay high until the second pulse comes in. The maximum duration between the two pulses is equal to 2^23 / frequency of Counter 0 pulse generation. (After this time, the terminal count of the counter will be reached.)
Please let me know if there is anything I can he
lp with or clarify. Have a great day!
Ken S.
National Instruments