Non-periodic pulse width measurement

I came across a post with example code recently that showed how to measuure pulse width of a non-periodic signal using Transition Measurements.vi.  Now I can't find it.  Can anyone help me locate?
Thanks.

Hello Joe,
I did a quick search and didn't find a post that exactly fit your description.  Do you remember anything else about the post?  Any other key words?  Any specific people that posted?
Michael B.
Applications Engineer

Similar Messages

  • Wiring hardware for pulse width measurement

    I am in difficulty.even with so simple pulse width measurement.
    I am using labview 7.1, DAQmx, MAX, PCI - 6220.
    I cannot find help document as to how to measure PW measurement and I find no connection diagram in MAX for using pulse width measurement.
    I connect to PFI 9 (Gate) to 5V via switch. What about timebase counter as source? Ok I wanted to use internal clock from PCI-6220. But I cannot get to measure PW.
    I want to MAX to measure. Once it is ok, then I will build a simple vi to understand its working better.
    Pls help.

    Hello,
    LabVIEW has examples that are located in the Example Finder under the Help menu inside of LabVIEW.  The examples specific to pulse width measurement are organized and located under the Browse tab of the Example Finder under the folders <Hardware Input & Output> <DAQmx> <Counter Measurements> <Period & Pulse Width>.  The Example Finder has an information section that has information on the Description, Instructions for Running, Block Diagram Steps, and I/O Connections Overview.  The last section will help with the connections.  The input for the example titled Meas Pulse Width – Buffered –Cont.vi will be the gate of the counter specified in the “Counter(s)” control on the front panel … such as Dev1/Ctr0.  So on your device the 6220, counter 0 gate is PFI 9 as you mentioned.
    I understand that you are interested in getting started with the Test Panel in MAX first.  The Test Panels are limited to Pulse Train Generation for counter output and Count Edges for counter input.  Please use the Count Edges if you are interested in testing the device with a counter input task.  However, the Count Edges will just be counting edges of the signal specified in “Edge Source”. 
    I also understand you are interested in using the internal clock from the 6220.  The example I previously suggested uses a DAQmx Timing.vi to configure the duration of the task … for example finite or continuous.  The Timing is set to implicit, since the signal wired into the gate of the counter is in fact controlling the timing.  The source of the counter task for pulse width is the internal timebase when using DAQmx Timing (Implicit). 
    “Create a Counter Input channel to Pulse Width.  It is important to set the Maximum and Minimum Values of your unknown pulse width as accurately as possible so the best internal timebase can be chosen to minimize measurement error.  The default values specify a range that can be measured by the counter using the 20MhzTimebase.” - from the description of the Block Diagram notes on the example.  I also link helpful KnowledgeBase below.
    AE KB 2X6CMDDS: What Does Implicit Mean in the DAQmx Timing VI?
    http://digital.ni.com/public.nsf/allkb/2B6477E3A9B7C07386256D1F0066FBDD?OpenDocument
    Samantha
    National Instruments
    Applications Engineer

  • When exactly do pulse width measurements start?

    I am using a PCI-6601 to measure pulse width and period of a PWM signal in LabView (DAQmx).
    I use ctr0 for the period and ctr1 for the pulse width. The period is measured between falling edges. As I am interested in the high pulses, the pulse width measurement is configured to start with a rising edge.
    I do a buffered measurement with continuous samples.
    I use a common start trigger (ArmStart) for both tasks.
    Everything works just fine, but one thing puzzles me:
    My start trigger can occur at any phase of the PWM signal, so I expected the first measurements to be invalid. This is true for the period measurement, but the pulse width is always correct. It doesn't matter in what phase my trigger occurs, the first reading of the pulse width is always correct.
    Can someone tell me why?

    This is speculation, but it's probably just that NI decided to follow slightly different rules for pulse width measurement than for some of the other counter measurements.
    I've done triggered period and semi-period measurements before, but don't know that I've done triggered pulse width or frequency measurements.
    For the two former cases, I know that the counter will start counting time immediately after the trigger edge.  The first measurement represents the time from the trigger to the first active edge period (or semi-period) edge.  It is often meaningless as you anticipated.  For pulse widths, I suppose NI simply decided that the trigger will arm the counter but you also need the pulse's leading edge before you start counting to measure pulse width.  So the first measurement is a true measure of pulse width and is never meaningless.
    If this is true, then it may be tricky to sync / correlate the data in simultaneous measurements.  For your particular app, you could get away with performing a single semi-period measurement and then calculating the periods and pulse widths.  In other apps, it could get more difficult.
    -Kevin P.

  • External sample clock with pulse width measurement

    Dear all,
    I am using a NI 6220 board (programming with ANSI C) and would like to perform a "single pulse-width measurement" using an external gate signal and an external signal as source.
    Using the  "DAQmxCreateCIPulseWidthChan" command the program and card works only partly as intended. Namely, the external gate did work, but the card uses the internal 80 MHz time base signal instead of the external source connected to the default source pin (PFI 8).
    I tried to route another PFI pin to the default source pin using the "DAQmxConnectTerms" command but this did not help either.
    Obviously, I am missing something...
    Best, Uli
    Solved!
    Go to Solution.

    Hi Uli,
    I posted to your thread here.
    Best Regards,
    John Passiak

  • NI6602 pulse width measurement: Do I have to use an external sample clock?

    Hi
    In the .NET 4 example 'MeasPulseWidthBuf_SmplClk_Cont' it is stated in the comments that:
    An external sample clock must be used. 
    Counters do not have an internal sample clock available.  You can use
    the Gen Dig Pulse Train-Continuous example to generate a pulse train on
    another counter and connect it to the Sample Clock Source you are using
    in this example.
    I have an application running without specifying an external clock. The applications is running, but I'm not sure I can trust the recorded data. Here is the channel creation code:
                    task.CIChannels.CreatePulseWidthChannel(readTaskCounter,
                                                            "ReadPulswidthTask", 25e-9, 20e-6,
                                                            CIPulseWidthStartingEdge.Rising,
    CIPulseWidthUnits.Seconds);
    task.CIChannels.All.DataTransferMechanism = CIDataTransferMechanism.Dma;
                    task.Stream.Timeout = callbackTimeoutInMilliSeconds;
    task.Stream.Buffer.InputBufferSize = 50000;
                    task.SynchronizeCallbacks = true;
                    task.Timing.ConfigureImplicit(SampleQuantityMode.ContinuousSamples);
                    task.Control(TaskAction.Verify);
    Note that I'm not specifying any external clock.
    1) Which clock is the daq using? -It is obviously using some clock since I can collect data via this task.
    2) Do I need to change the configuration to use an external clock to achieve reliable readings - as mentioned in the 'MeasPulseWidthBuf_SmplClk_Cont' example?
    /mola
    Solved!
    Go to Solution.

    Hi mola,
    That specific example is for sample-clocked pulse width measurements.  This type of measurement is only supported on newer hardware such as X Series boards and will not run on the 6602.
    Your application that you linked uses Implicit timing, meaning that the signal itself serves as the sample clock.  That is, at the end of each pulse width that you measure, the sample is deterministically latched in.  So, you end up with a buffered array of every pulse width that is seen by the counter.
    Best Regards,
    John Passiak

  • Pulse width measurements

    Hello,
    I am trying to measure the pulse witdth of a signal that has a pulse width of 800 micro seconds.  I am using the pulse width measurement VI with an indicator on the pulse duration output.  The sample rate I am using to sample the signal is 10000 samples/sec.  The pulse width measurement VI is returning a value of 8.  I'm assuming that it is taking the pulse width of the signal and dividing it by (1/10000) which is the time between each sample.  Is this correct? 
    Thanks

    Hi Jimmy,
    You said that you were using the Pulse Width Measurement VI.  Are you using the Express VI (LabVIEW 7 or higher), the regular VI, or are you trying to use a counter to measure do your PWM?
    Perhaps you could post a snippet of your code.  It sounds like you've got the right answer, but knowing which method you are using could definitely help.
    Regards,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • Triggered single pulse width measurement

    I am trying to measure the width of a single pulse, but would like to use the pulse itself as the trigger for a counter input pulse width read using a PXI-6608.  I would like to do this since the pulse can come at any time (much longer than any practical timeout)  and I would like to avoid having to place a DAQmx read in a while loop waiting for the pulse to appear.  Also, while the pulse is high, I would like to produce front panel feedback (light a boolean indicator).  I seem to be able to achieve that by using a digital input line, but again requires a DAQmx read in a while loop.  I haven't had much experience with triggers and my attempts so far appear to seem like triggers are not compatible with counter input pulse width measurement.  Is it possible to set up a trigger for a pulse width measurement?

    Hello kayotik,
    I think the best thing to do here is to use separate while loops. You can put most of your code in a main while loop, and then put your DAQmx read in a separate while loop. Both loops can run in parallel (just don't wire any outputs of one while loop to the other while loop, because then one will become dependant on the other). In order to pass data between the two loops, you will need to use a local variable. The DAQmx read can write to a local variable, and the main loop can read from that local variable. 
    You will also need to stop both loops with a single stop button. This article shows how (and also demonstrates the use of local variables to pass data between independent while loops):
    http://digital.ni.com/public.nsf/allkb/267704CDE91156D186256F6D00711AAE
    Colden

  • [cRIO] Pulse width measurement

    Hello,  I am working with cRIO-9074 with digial I/O module 9403. I was wondering where I could find examples or a list of function relevant to measuring the pulse width of a digital input (with resolution of about 10 usec).
    - Thank you 

    I've implemented something similar using the example given above, however due to hardware limitations I'm unable to use the SCTL, this isn't too much of a problem as I simply use a while loop with a 4-tick loop timer, however when driven with a constant digital signal I get the pulse width measurements 'bouncing' between two values, it's not out by 1 or 2 ticks, it jumps around 1000 ticks, it also 'sticks' when I slowly ramp up the frequency, suddenly jumping to other values
    any suggestions? I'm currently using the FPGA open function and accessing the FPGA in (I believe) scan mode, could this be the culprit? I've not undertaken the RT training course yet so I'd be poking in the dark a little
    this is for a proof of concept demo in a few weeks time!

  • Pulse Width Measurement

    Hello Friends,
    I am new to Labview. And now I am working on a project where I have to measure the pulse width.
    I have attached a pulse waveform and would like to measure the pulse width of the first rising the falling edge and log it , rest of the signal I am not interesed in.
    I will have this signal 6 times on my digital/analog input. 
    Can someone help me with the pulse width measurements.
    Thank you.
    Kind Regards,
    Attachments:
    Pulse width.PNG ‏60 KB

    I get this pulse ( as in picture attached), I want to get it on analog or digital pins in such a way in get the pulse width of only 1st edge.
    And this 1st edge lenght is different then the rest that follows. I would like to have the pulse width for only the 1st edge and log the width.
    And similarly this signal will come from 5 more different sources. So each signal is different.
    For now i connected it to AI0 and I can see the signal.
    1) next step measure only the first edge.
    2) 6X input channel 
    2) log it.
    Attachments:
    Pulse width.PNG ‏60 KB

  • NI 9401 pulse width measurement.

    Hello,
    I'm not sure I fully understand the pin-out diagram. At present I have a NI9401 in a NI 9172 chassis. 
    DIO0 and DIO1 are connected to light gates. I have an opto switch and I want to measure the pulse width when an object blocks passes through the slot. Can I use any of the other free input to do this?
    Free inputs are, DIO2, DIO4 and DIO5.
    The other I/O pins are being used as triggers. 
    Cheers

    Solved!
    Go to Solution.

    Hi Daisy,
    If you open your DAQ Assistant properties, and read the Measuring Pulse Width help on the side, you'll see that "You can use the counters on your measurement device to measure pulse width. Pulse-width measurements measure the time between either a rising and a falling edge, or a falling and a rising edge." If you change the Pulse Width Setup Starting Edge setting to Falling edge and look at the picture above, you'll see that the pulse width it's measuring the width from a falling edge to a rising edge (the pulse width while the signal is low). So this measurement will go from the falling edge of your first measurement to the rising edge of your second measurement. If you want to measure the width of the first pulse (while the signal is high) you need to set your Starting Edge to Rising. 
    Do you know whether the width that you want to be measuring is while the pulse is high or while it's low? Starting Edge Rising and Starting Edge Falling should give you different measurements, because they're measuring different things. You should verify which result it is you want, and what it is you're trying to measure. 
    Hope this helps!
    Emily C
    Applications Engineer
    National Instruments

  • Pulse width measurement with FieldPoint CTR-502

    I would like to measure the pulse width of a signal (ranging from 10 ms to
    400 ms out of a signal with period width of about 1 second). I would like to
    use a fieldpoint counter module FP-CTR-502. I could find examples on how to
    measure frequency but I did not know how to alter it in order to obtain the
    pulse width.
    Thanks,
    Martien

    To measure pulse width of a fixed-period signal, you only need to use one counter, so the configuration and program would be different than the frequency measurement example. Set the count source for counter 0 to "32kHz Reference" and the gate source (and wire your signal) to "Gate Input 0." You'll also need to create a control channel to reset counter 0 (as described in the frequency example).
    Your LabVIEW program should run as follows:
    - When Gate Input 0 becomes true, do nothing
    - When Gate Input 0 becomes false again, read then reset counter 0
    - repeat
    You can use FP Advise to wait for the gate to change (just like the frequency example).
    Once you have the number of counts, you can divide that by the frequency (32 kHz) to calculate the "on tim
    e" (pulse width) of your signal.
    Regards,
    Michael Shasteen
    Applications Engineering
    National Instruments
    www.ni.com/ask
    1-866-ASK-MY-NI

  • Single pulse width measurement

    Hello,
    I am trying to measure the time of a single pulse using ctr0 on a PXIe-6361.
    The input signal seen in attachment Capture7.jpg, is going to PFI 9, the gate of ctr0.
    The problem is that the counter see' s the rising edge and stops. The pulse width is not given as can be seen in the output (Capture8.jpg).
    I get the same results using Meas_Pulse_Width.vi example.
    Is something wrong with my PXIe-6361?
    Solved!
    Go to Solution.
    Attachments:
    Capture7.JPG ‏107 KB
    Capture8.JPG ‏145 KB
    Striker velocity blk_dia.JPG ‏35 KB

    Hi,
    I did pretty much the same and ran the example as well and they do work. You can try to explicitly specify the PFI line using a DAQmx Channel Property Node with a Counter Input Pulse Time Terminal property to verify if the problem is only with PFI 9 (if you use the property, you can use any PFI line even if is not the default gate for the specified counter), and even try with the other counters.
    The VI is on the 2014 version, so I included a screenshot in case you have a previous one. If you need the VI in a specific version let me know and I'll downconvert it for you.
    Camilo V.
    Applications Engineer
    National Instruments
    www.ni.com/support
    Attachments:
    Counter - Read Pulse Time (On Demand).vi ‏39 KB
    Screenshot.jpg ‏208 KB

  • Pulse width measurement with MultiQ

    I am trying to measure the pulse width of a signal with my PC, and I
    just have Quanser multiQ PCI board that can do A/D,D/A,timer, encoder,
    can any one tell me how can I do it? do I need to use the labview ?
    thanks,
    Clark

    I looked at Quanser's web site and couldn't find any specs on the board so I hope you have the information to answer the question. If the board has counter timer circuitry, then you could use that depending on the width of the pulse, the accuracy of the daq board's clock, and the resolution that you need for the measurement. If you just have the A/D to use, then it might be possible to acquire a signal with the pulse in it and then use software to analyze the acquired waveform data and calculate a pulse width. Again, it would depend on the acquistion rate of the board and the pulse you're measuring. A narrow pulse with a slow acquisition rate is not a good combination. What software you use is optional. If Quanser provides a software utility that can do it a
    ll, use it. If Quanser has a LabVIEW driver, than that would work too. If my answer seems a little vague, it's because you need to provide a bit more information. If no else chimes in with experience with Quanser boards, the best for a detailed answer would be Quanser.

  • Analog pulse width measurement

    Hi, I have a signal that is a number of single pulses which i am capturing using a Digitizer and then fetching integer values to make the pulsewidth measurements faster.
    My signal is AC coupled therefore i have quite a lot of noise, i want to measure the pulsewidths but i need some hysterisis to reject any of the noise. I am a C programmer and this would be a simple case of looking forward a number of elements in the array after the initial threshold has been satisified but i do not know how to do this in LabView.
    Can anybod help me out?
    Thanks.
    Wayne 

    There are many ways to detect the pulse width of a signal with noise and without knowing your setup how the signal looks it, we will be totally guessing.  That being said I would first try the "Measure Pulse" function under the Waveform Measurement palette (does your C have that?).  If the signal for some reason won't work with this canned function then by all means write your own.  Set up a comparision to say is my analog value greater then 0.5V?  (or what ever) then find the times from going from FALSE to TRUE to find the rising edge, and from TRUE to FALSE for a falling edge.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Pulse duration measurement of a single, non-periodic pulse

    New to Labview. I'm trying to measure pulse duration of a single, Power- On-Reset, pulse using waveform data. The Pulse measurements VI requires two consecutive mid ref level crossings in the same direction. I have only one positive going mid ref level crossings & one negative in the waveform data. Am I missing something easy in the Waveform Measurements palette or do I need to use counters to accomplish this task? I would like to use waveform data. 
    Labview 8.6 Professional. 

    You could use the Transition measurement.vi twice, as shown on the attachment.
    Message Edité par chilly charly le 09-01-2008 07:04 PM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Pulse duration.vi.zip ‏16 KB
    Pulse duration_BD.png ‏11 KB

Maybe you are looking for

  • Bank details -vendor master

    The bank details given in Payment transactions in Vendor master data is it of the vendor or the bank details through which we want payment to be made.

  • Java Maping and ABAP Mapping

    Hello, Pls let me know about Java Maping and ABAP Mapping Also pls provide good simple scenario blogs for Java Maping and ABAP Mapping. Regards

  • [SOLVED] Conky Not Displaying Unicode Characters Correctly

    I have some music that requires unicode characters in order to be displayed properly. The artist name is Röyksopp, but it is displayed like this: http://i.imgur.com/rRBDxZn.png Does anyone know how to either make it display correctly (Röyksopp), or a

  • Call a Web Service from within an e-Sourcing script

    Hi Guys I would like to know wether anyone has successfully been able to call a Web Service from within an e-Sourcing script? If you have, can you please share your experience and code? Thank You

  • JDBC or FILE???

    Hi,   We have a scenario in which an oracle in Unix needs to be interfaced with a DB2 system. Since both are database systems is it right to use JDBC adapters and communicate?? I am a little confused on how FILE adapters would be used... -Krishnan