High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Time between falling and rising two channels

I'm using a PCI-5112 scope and I'm looking to find the time between the falling edge of the ch1 to the rising edge of the ch2.  I have been looking at the time delay measurement for 2 channels.  Can this time delay measurement be used from falling to rising edge?  I saw something about inverting the signal.  Can I just invert the signal on ch1?  I am programming in CVI and I don't know how do take this measurement through the program.  An example in CVI would be helpful.
0 Kudos
Message 1 of 2
(6,184 Views)

Hi Laura,

The help manual for High Speed Digitizers has some information on using the Time Delay Scalar Measurements.  It is definitely possible to read the time measurement from the falling edge of one channel to the rising edge of the next channel.  You are correct in saying that you would have to invert one of the signals before you read from the two channel measurement.  There is a CVI example that does multiple scalar measurements.  You can access this example on your computer through the following path:

C:\Program Files\National Instruments\CVI81\samples\niScope\AdvancedMeasurementLibrary

You can then add the following two lines of code:

niScope_AddWaveformProcessing (ViSession vi, ViConstString channelList, ViInt32 measFunction);

niScope_ReadMeasurement (ViSession vi, ViConstString channelList, ViReal64 timeout, ViInt32 scalarMeasFunction, ViReal64* result);

The first function will add waveform processing.  You can specify one channel name under the channelList input. The input measFunction is the array measurement you want to add.  In your case, this would be the inverse of the signal and the value to use is NISCOPE_VAL_INVERSE .  The second function then reads the time delay measurement from the two channels. This would be specified in the input scalarMeasFunction as NISCOPE_VAL_TIME_DELAY.

All of this information is located in the High Speed Digitizers Help file at Start>>All Programs>> National Instruments>>NI-Scope>>Documentation on your computer.  You can then expand the Programming section and then Reference under that.   There is a section called NI-SCOPE Function Reference Help that will give documentation on the syntax of the functions that I mentioned above.  Hopefully this information will be helpful!

Regards,
Vanessa L.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(6,162 Views)