LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read relay switching time with scope tds1002

Try this LabVIEW 8 VI. The accuracy of the measurement is also going to depend on the sample rate of the scope.
0 Kudos
Message 11 of 21
(1,321 Views)

Thanks Dennis,

I am working with LV7.1, do you mind to covert this sample to LV 7.1.  Thanks,

Frank

 

 

 

0 Kudos
Message 12 of 21
(1,318 Views)
Sorry, I have no way to save to 7.1 but maybe someone else can do the conversion. In the mean-time, here's an image of the block diagram.
 

Message Edited by Dennis Knutson on 10-08-2007 05:11 PM

0 Kudos
Message 13 of 21
(1,313 Views)

Thanks Again,

Frank

 

0 Kudos
Message 14 of 21
(1,304 Views)

Dennis,

I am having a little bit of trouble or maybe understanding the last approach and I would like to return to the very first approach but I am not sure how to connect your suggested idea:

'I just had a better idea. If you reverse the Y array, you could search for the first point that exceeds some value."  Could you please help me by modifiying the first diagram with above comment.  Thanks,

Frank

 

0 Kudos
Message 15 of 21
(1,299 Views)
I recreated the last VI in 7.1 and included a simulated switch bounce waveform. Basically, you know the overall time of the waveform. If you reverse the array, it's pretty simple to find the last 'bounce'. You then know the time where the waveform was stable. Subtract this from the overall time and you have the time it takes to finish bouncing.
0 Kudos
Message 16 of 21
(1,293 Views)

Dennis,

Please find attached results of above vi.  It looks like there is a problem with the trigger detection section as it gives incorrect data.  Thanks,

Frank

 

0 Kudos
Message 17 of 21
(1,280 Views)

I don't know if you mean the scope trigger or the software trigger but I'm assuming you mean the software trigger. Have you played around with the trigger level setting in the VI? You got around the prohibition of posting bmp files by zipping them up but that doesn't make it any nicer to try and open them. Why don't you just post the VI with the actual data? You go to Operate>Make Current Values default. Save the VI and post that.

I'm a bit confused about the waveform you have captured though. I'm not sure you are triggering the scope correctly or perhaps you are including some pre-trigger data in the capture. Remember, everything assumes that the captured waveform begins at the time the relay is commanded to close. If you include pre-trigger data, then this will have to be subtracted from the waveform. Also, in the test setup I imagined, there was a 5V pullup on one side of the relay and gnd on the other. The scope probe would be on the 5V side. You would have seen a transistion from 5V to gnd and then the bounce. You've got a gnd, then a couple of bounces, then gnd again.

0 Kudos
Message 18 of 21
(1,269 Views)

Dennis,

I am using CH1 only at this moment, as I am waiting for some assistance as to how to write a vi to get data from a second channel (CH2) at this post:

http://forums.ni.com/ni/board/message?board.id=170&message.id=277074&query.id=491325#M277074 (could you please take a look at this post).

Coming back to this vi:  Can I use an external trigger or do I need to have 2 channels (CH1/CH2) to be able to utilize your proposed approach "Calculate bounce time_71.vi."  I am not sure or not quite understand how to use this vi. 

My assumtion is that this vi looks at a complete scope capture (window) then looks back into the data until a certain dc level meets the trigger level.  Is this correct?

Test set-up details:

1.  Only Ch1 is used, trigger at 1 volt, rising edge, and triggered waveform starts at scope's mid screen.  Bouncing waveform is about 5mS long (4 short pulses of ~500uS width).

2.  Scope timebase setting 2.5mS. Then waveform duration is 25mS.

3.  vi trigger level anywhere from 50mV to 2.5V (doe not make a difference).

4.  Per above picture vi indicates a trigger location of -0.012mS.

Please let me know your comments as to correct this vi or test set-up.  Thanks,

Frank

 

0 Kudos
Message 19 of 21
(1,263 Views)
In your initial question, you said you have a detector circuit that senses a relay closure. Is this your trigger source? You could use that or ch1 as the source. Either way, there is no reason to use ch2. If you implement the circuit setup that I suggest, then you would set the external trigger for a negative slope and some voltage a little bit less than 5V. If you did not have an pre-trigger data in the acquire, you would have a waveform similar to what I posted in the example. If you want pre-trigger data or don't know how to set up an acquisition without it, you would add another LabVIEW trigger function to determine the time the waveform first transitions to gnd. Again, your waveform as you've shown it, includes a lot of pre-trigger data and you have to adjust for that. Also, I will repeat my suggestion to post a VI with some real data.
0 Kudos
Message 20 of 21
(1,256 Views)