LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time between CH1 and CH2's waveforms

Hi Everyone,
 
As per attached picture, I need to measure the time between the STARTING time of CH1 (rising) and END of CH2 waveform (rising).  Could anyone provide some sugestions as to how to accomplish this?  Thanks very much,
 
Frank
 
0 Kudos
Message 1 of 22
(4,010 Views)
I am using LV 8.5 and the scope is Tek TDS1012B.  Thanks,
 
Frank
 
0 Kudos
Message 2 of 22
(3,995 Views)
If you are asking how to do this with an internal measurement of the scope, then you should read the manual and see if this is possible. You haven't provided the model number of the scope so it would be impossible for anyone here to tell you that information. If you transfer the waveforms to the pc, then it's simple with a couple of Basic Trigger Level Detection functions (one for each trace). The function can be set to return the trigger location as time and then you would just subtract the tw results. The trace data would have to be converted to a waveform datatype with the Build Waveform function.
0 Kudos
Message 3 of 22
(3,994 Views)

Thanks Dennis,

The scope model is TDS1012B (Tek). 

I am looking to do this thru labview and do you mind to post some code that will point to the right direction?  Thanks again,

Frank

0 Kudos
Message 4 of 22
(3,990 Views)
Here's the skeleton of the basics. I only put in the multiple waveform read from the driver.
Message 5 of 22
(3,982 Views)

Thanks Dennis!  It works great Smiley Very Happy

One more request:  There is a little bit of bouncing time (2-5ms) at the end of CH2's waveform (rising edge). Is it possible to detect this?  In other words, how could I modify this vi so that total time includes this additional bouncing time.  The present vi measures total time up to the first rise of the bouncing waveform.  Thanks again,

Frank

 

0 Kudos
Message 6 of 22
(3,974 Views)
Yes you can. One way is to modify the trigger detection function so that it returns an array of points that meet the trigger condition. On the block diagram, you'll see a control called 'Max number of trigger points'. This control is hiddent so you'll first want this to be visible. You can then set this to some high number. The call library function node is already set to return an array of locations. Instead of indexing out element 0, just convert the entire array to relative times.
0 Kudos
Message 7 of 22
(3,970 Views)

Dennis,

When I open this vi it appears as a "clone copy" and I can not change this control to visible.  Also, if a change this control (trigger detection function ) on my program and make your suggested changes, then save it, could these changes affect future copies of this vi library?

Thanks,

Frank

0 Kudos
Message 8 of 22
(3,957 Views)
Dennis,
 
I did a repeatability test on above proposed solution (10 times) and 2 out of 10 times I got a wrong reading (~2ms) when in reality scope's waveform and labview's chart showed about 19 or 20ms.  Is there anything that I need to add to this code to prevent these false readings?  It appears that the false reading are about 1/10 of the actual reading.  Thanks,
 
Frank
 
0 Kudos
Message 9 of 22
(3,941 Views)

Dennis,

As I mentioned before it looks like there is a problem or bug with the Basic_Level_Trigger_Detect function.  Everytime that I open this vi it appears as a "clone" copy and I can not change any of the invisible controls.

After I replaced these vis with new vi's from the palette, I can change this control from invisible to visible.  Then after running my program the Basic_Level_Trigger_Detect function will revert back to "clone" again.  I changed the number of trigger setting to 10 and also reverted back to 1, even though a new copy from the palette will have 10 times on this setting.  Please see attached code for more info.  The text file contains the failure data.  Again it seems that the Basic_Level_Trigger_Detect function is not very dependable or releable.  Thanks,

Frank

 

0 Kudos
Message 10 of 22
(3,910 Views)