LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure ramp time from a waveform

Hello,

  I'm relatively new to LabVIEW and need help with (what I think is) a pretty basic operation.

 

  I have a 3rd party DAQ board from Measurement Computing on which I'm reading a single analog channel. My task is to measure the ramping time from off to full scale (~6V) and make sure that it accomplishes this within 75 milliseconds. That's it.

 

  I have looked at the sample VIs that came with the DAQ board, and found one which graphs the channel and produces a waveform - 1 Channel, N samples. I tried using Get Waveform Components to break out T0 and Y, but not sure where to go from there. The Y component seems to be an array, but the T0 is not.

 

  As far as starting the waveform capture, I am programmatically in control of when the "switch" is turned on that powers the device, so I should be able to know when my true T0 is.

Thanks for your help.

0 Kudos
Message 1 of 10
(4,100 Views)
You need to look at the dt component too. Then you can use the threshold vis and calculate the time between the points.
I'm on phone at the moment so I can't give an example. When do we gets LabVIEW for android 🙂
Michael
0 Kudos
Message 2 of 10
(4,093 Views)

Thanks, do you mean use the dt to mark an initial start time waveform, then accumulate dts until my maximum ramp time is reached, and verify that the voltage level is proper at that time?

 

Sorry for being so inept at this.

 

0 Kudos
Message 3 of 10
(4,077 Views)
Yes. Do: final index-start index * dt
0 Kudos
Message 4 of 10
(4,072 Views)

An update - I still have no workable solution to this problem. I have talked to NI; I've tried using "Transition Measurements.vi". My current hardware mockup does NOT allow me to know when the voltage ramp is starting, although in the future I will have program control over that. For now, I was just trying to get a working VI that will do the ramp measurement. The other gotcha in this is that when power is applied, there's a short spike, then the voltage falls off temporarily, then the ramp up occurs.

 

I've attached screenshots of both the whole waveform, and a closeup of the portion I'm interested in measuring. So I do have a valid waveform (DBL). I just can't figure out how to use Transition Measurements properly (or any other method) to get a valid result.

 

Can anyone give me some help on this?

Thank you.

Download All
0 Kudos
Message 5 of 10
(4,047 Views)

Hi bigmaple,

 

Could you post the code where you are currently trying to use the Transition Measurements.vi? This will help us recommend modifications. It looks like you are reading in the data as waveforms, so we should be able to set up the Transition Measurements VI to output the time you are interested in. 

 

Best regards,

Matt J - NI Tools Network
0 Kudos
Message 6 of 10
(4,022 Views)

Hi Matt-J,

  I can't even get Transition Measurement to work. I get Error -20312 - the input waveform is zero. I have the Diagram Disable structure in place so that I can actually run the VI and get the waveform shown in my previous post attachements.

 

Thanks for your help.

John W

0 Kudos
Message 7 of 10
(3,997 Views)

Hi bigmaple,

 

The error you are receiving might be avoided by increasing the timeouts on your trigger and read VIs. I do not have the ULX set, but they appear to be similar to our DAQmx set. Take a look at this Knowledgebase article that discusses this error:

 

http://digital.ni.com/public.nsf/allkb/7081D625F205D4A6862573D30005949A

 

So, I would first try increasing your timeouts and see if this avoids the error. Also, what is the source you are using for your trigger? 

 

Best regards,

Matt J - NI Tools Network
0 Kudos
Message 8 of 10
(3,993 Views)

Hi,

  Thanks for the link. I had great hopes that the timeout would fix it... but I tried wiring a -1 to the timeout pin, and the same error occurs as before. Pretty much instantaneously. Ditto for when I wired 25 seconds into the timeout.

 

  The trigger is on the rising edge of the signal channel I'm interested in - AI11. As stated previously and shown on the total waveform jpg, when voltage is applied we get a "spike" of 1-2V, then a ramping up to the desired 5-6V level. 

 

Thanks,

John W

0 Kudos
Message 9 of 10
(3,979 Views)

Hi bigmaple,

 

Have you taken a look at the Threshold 1D Array or Threshold Detector VIs that were mentioned earlier in this thread?

 

Best regards,

Matt J - NI Tools Network
0 Kudos
Message 10 of 10
(3,959 Views)