Single pulse waveform measurement

Hello,
How to measure pulse width of a single pulse waveform (not  a periodic waveform) ?
Pulse measurement VI is not applicable in this case.
Thanks for your help.

Hi,
Generally, there are two counters on DAQ card,
you could use the counter to measure the pulse width of the signal.
====================
●LV Version:LabVIEW7.1
●OS:WindowsXP(SP1)
●Hardware:PCI-7344, PCI-6602, PCMCIA 6024E

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • Measure a single pulse width using usb 5133

    hi im trying to measure the width of a single pulseoutpout from NI SCOPE express
    however pulse measurements.vi seems to expect more than a single pulse.
    any ideas?
    ta

    Hi Slugger,
    Can you first try this with the SCOPE Soft Front Panel (SFP) located in Start >> Programs >> National Instruments >> NI-SCOPE >> NI-SCOPE Soft Front Panel.
    This should give you the screen below:
    Please set the items as seen in the red boxes. Make sure your trigger channel is correct Mode is set to SGL and press the measure button.
    This will give you a Scope measurement screen. Please press the Add button. Select the correct Channel and then in the measurement type choose "Period".
    On the main SFP window press the run button. Does the measurement give you the reading you expect?
    I do not have a Scope card to test this yet, so I have been using a simulated device.
    Regards
    JamesC
    NIUK and Ireland
    It only takes a second to rate an answer

  • DAQmx Counter Input Measure a single pulse's pulse width

    Trying to measure a single pulse's pulse width. It appears that the DAQ only makes the measurement on the read command instead of after starting the task. I just get a timeout error. Is there any way to arm to counter for measurement or am I better off making a seperate thread to trigger my single pulse?
    double measured;
    int numSamp;
    TaskHandle taskHandle;
    DAQmxCreateTask("", &taskHandle);
    DAQmxCreateCIPulseWidthChan(taskHandle, "Dev1/ctr0", "", 0.025, 0.120, DAQmx_Val_Seconds, DAQmx_Val_Rising, "");
    DAQmxSetChanAttribute(taskHandle, "", DAQmx_CI_PulseWidth_Term, "/Dev1/PFI10");
    DAQmxStartTask(taskHandle);
    //Trigger the single pulse here
    DAQmxReadCounterF64(taskHandle, DAQmx_Val_Auto, 10.0, &measured, 1, &numSamp, NULL);
    Thanks,
    Dan

    Which device are you using?
    If you configure implicit timing (DAQmxCfgImplicitTiming) your measurements will be buffered and will begin when the task is started.  The minimum buffer size is usually (always?) 2 samples, but that doesn't mean you have to read two samples back.  
    Best Regards,
    John Passiak

  • I want to measure the width of a single pulse on a line.

    Hi
    I want to measure the pulse width of a single pulse on a single line. the pulse width may be very low like micro seconds. Any answer plz ! kindly write soon....its urgent. I m ussing a 'Measure Pulse widh or Period VI' for this but his is not working for single pulse.
    Regards
    GNS

    You might try using the "Measure Pulse (DAQ-STC).vi" example located in
    ./Program Files/National Instruments/LabVIEW/examples/daq/counter/daq-stc.llb/*.
    Or if you're using a TIO board, try using the "Measure Pulse (NI-TIO).vi" example located in
    ./Program Files/National Instruments/LabVIEW/examples/daq/counter/ni-tio.llb/*.
    gus....

  • 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.

  • Generated Pulse waveform is distorted when I deliver the signal to the output port in the DAQmx

    Problem: Generated Pulse waveform is distorted when I deliver the signal to the output port in the DAQmx.
    Environment: Windows XP sp3 (32bit), Visual Studio 2010 sp1, NI-Measurement Studio 2010
    Device: NI - DAQmx PCI 6251
     Analog Input: 1.00MS/s multi-channel (aggregate)
     Analog Output: 2 Channel 2.00MS/s
    Reference Example: AO_ContGenVoltageWfm_IntClk / AI_ContAcqVoltageSamples_IntClk
    Generated Pulse:
    1) AO0 = Square Waveform /0-5V / 8KHz / 0.5㎲/sample / sample 50% Duty
    2) AO1 = Square Waveform /0-5V / 8KHz / 0.5㎲/sample / (Reverse Image)
    Description: I’d like to deliver the waveform stream satisfied with specified constraints to the 2 channel output port in the DAQmx. To verify accuracy of the generated waveform, I did an electrical wiring from the Analog output channel (2 channels) to the Analog Input channel (2 channels) in DAQmx. As a result of this experiment, I could get a result which has signal distortion. Since the waveform has to satisfy with both high frequency (8KHz) and very short moment interval time (△t = 0.5㎲/sample) between samples, I cannot handle some parameters of the function in the referenced VC++ example. Following formulas shows an approach to deliver the generate pulse waveform to output port satisfied with constraints.
    Analog Output Channel
     Frequency = 8,000 cycles/sec (constraint)
     Sample per Buffer = 2,000,000 = 2*106 samples/buffer
     Cycles per Buffer = 80,000 cycles/buffer
     Sample per Channel = 1,000,000 = 1*106 samples/channel
     Sample Rate  = Frequency * (Sample per Buffer / Cycle per Buffer)
                              = 8,000 * (2*106 / 80,000) = 2*106 samples / sec
     △t  = 1 sec / 2*106 samples / sec
               = 0.5 * 10-6 sec/sample (constraint)
     Buffer Cycle  = Sample Rate / Sample per Channel
                              = (2*106 samples / sec) / (1*106 samples/channel)
                              = 2 channel / sec
    Analog Input Channel
    Sample per Channel = 1,000,000 = 1*106 samples/channel
     Sample Rate  = 1 MS/s * (2 Channel) = 5 * 105 Samples / Sec
    Program Code
    AO_ContGenVoltageWfm_IntClk / AI_ContAcqVoltageSamples_IntClk (VC++ Example)
    Result: The proposed approach was implemented in the experiment environment (VS2010, MStudio2010). As shown in Figure 1, we could get the unsatisfied result. Although I intended to make a ‘square’ pulse wave, the result looks like ‘trapezoid’ pulse wave (Figure.1). However, there is other result which was undertaken with different parameter condition. It looks like the square shape not the trapezoid shape.
    Please let me know what the conditions make the problem of signal distortion. (AO0 = Green line / AO1 = Red line)
    [Figure. 1] Frequency 8000 Hz / Cycle per Buffer = 8000 Result
    [Figure. 2] Frequency 1000 Hz / Cycle per Buffer = 1000 Result
    Questions: Please let me know following questions.
    1) Is it possible to deliver the generated pulse wave satisfied with constraints (f= 8KHz), △t = 0.5㎲/sample) to the output port without distortion using PXI 6251?
    (Is it possible to solve the problem, if I use the LabView or MAX?)
    2) Are there some mistakes in the proposed approach? (H/W or S/W program)
    3) What is the meaning of the Cycle per Buffer?, It could effect to the result?

    Hi Brett Burger,
    Thanks for your reply. For your information, I have set the sampling rate as 10000 as for the sound format, I have set the bits per sample as 16 bit, the rate as 11025 and the sound quality as mono. I tried using your method by changing the sampling rate as 8K but still my program encounter the same problem.
    I wish to also create a button that is able to generate a preformatted report that contains VI documentation, data the VI returns, and report properties, such as the author, company, and number of pages only when I click on the button.  I have created this in my program, but I am not sure why is it not working. Can you help troubleshoot my program. Or do you have any samples to provide me. Hope to hear from you soon.
    Many thanks.
    Regards,
    min
    Attachments:
    Heart Sounds1.vi ‏971 KB

  • PXI-6624 Pulse Frequency measurement

    Hi.  I'm working with a PXI-6624 and am interested in doing pulse frequency measurements to get both frequency and duty cycle on its inputs using DAQmx.  
    Whenever I go to create the virtual channel however, I get error -200431:
    "Selected physical channel does not support the measurement type required by the virtual channel you are creating."
    "Requested Value: Pulse Frequency"
    "You Can Select: Frequency, Period, Pulse Width, Semi Period, Two Edge Seperation, Position:..."
    Is this card really not capable of doing these pulse frequency measurements?  
    Solved!
    Go to Solution.

    Yes, the "Pulse" (not to be confused with "Pulse Width") measurement was introduced with NI's STC3 devices including X Series and CompactDAQ.  
    Pulse Measurement:
    However, you should still be able to measure frequency and duty cycle on your card with a semi-period measurement:
    Semi-Period Measurement:
    Images are from the X Series User Manual.
    The difference between the two modes comes down to how the data is stored and buffered on the card--with the semi-period method the hardware doesn't distinguish between high and low samples and puts everything into a single buffer.  However, if you start the counter off the appropriate edge (see below property node), then you would know in software the order of high and low samples and can pretty easily calculate frequency and duty cycle from this.
    Best Regards,
    John Passiak

  • 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

  • Single Pulse Width with External Clock

    I am trying to setup a 6602 counter for a single (non-buffered) pulse width measurement with an external clock. Under normal testing, the unit under test will provide the pulses, I need to measure the number of pulses during different time periods (1, 60, and 300 seconds). I want to do a pulse width measurement and I'll supply the gate signal pulse to the counter for the specific time needed.
    Under normal operation, the unit under test is wired into the counter's source and the pulse is wired into the gate.  For testing purposes I am using a BNC-2121. I have the counter's source wired to the Adjustable Square Wave Output and the gate wired to the Trigger output.
    Here is my C++ code. I am getting a timeout error on the read and I don't know why. Any help would be appreciated.
       //Create Task
       DAQmxCreateTask( "task1", taskHandle );
       //Create Pulse Width Channel
       DAQmxCreateCIPulseWidthChan( taskHandle,              // TaskHandle
                                                      ​  szCtrName.c_str(),     // Counter Name
                                                      ​  "",                             // Channel Name
                                                      dMin,                          // Min Value
                                                      dMax,                         // Max Value
                                                      DAQmx_Val_Ticks,     // Units
                                                      DAQmx_Val_Rising,    // Gate Edge
                                                      "" );                            // Scale Name
       //Set the Pulse Width Terminal to the gate signal
       DAQmxSetCIPulseWidthTerm( taskHandle,          // TaskHandle
                                                     "",                       // Channel
                                                     "/CTR2/PFI38" );  // Terminal
       //Set the Timebase Src to the counter's source
       DAQmxSetCICtrTimebaseSrc( taskHandle,         // TaskHandle
                                                    "",                       // Channel
                                                    "/CTR2/PFI39" );   // Terminal
       //Start Task
       DAQmxStartTask( taskHandle );
      //***Send pulse to gate counter***
       //Read Counter
       DAQmxReadCounterU32( taskHandle,                      // Task Handle
                                              DAQmx_Val_Auto,           // Num Samps to Read
                                              10,                                  // Timeout
                                              ulBuffer,                           // Read Buffer
                                              1000,                               // Buffer Size
                                              &lSampsRead,                 // Num Samps Read
                                              NULL );                            // Reserved

    I've setup a pulse width task in NI-MAX using the onboard clock and everything worked fine, so I know the hardware is working.
    My unit under test is providing the pulses (from gyros) I need to measure. The pulses indicate the position of the unit so there are X, Y and Z axis gyros. I need to measure these pulses for specific periods of time (1, 60, and 300 seconds). For example during the 1 second measurement, the X and Y gyros should measure zero pulses and the Z axis should measure 515 gyros. During a 300 second measurement the X and Y gyros should measure < 60 and the Z axis should measure 30800.
    So the gyro pulses are wired to the counter input and I am using a DIO channel from NI-6508 to provide the gate pulse. The gate signal will be high for either 1, 60, or 300 seconds depending on the test. The gyro pulses are essentially the external clock to the counter. I want to count the gyro pulses during the pulse of the gate (DIO).
    To simplify the setup, I connected to BNC-2121 directly to the card. I have the adjustable clock output going to the counter input of ctr0 and the trigger signal going to the gate of ctr0. Once the task has been started and before the read ( I had a breakpoint set in the code), I would press the trigger button on the BNC-2121 and hold for approx. 1 second. I then execute the Read statement, and I always get a timeout. From my experience working with NI, I'm guessing I don't have a channel property set correctly, but its not obvious to me and I can't find an example to do exactly what I'm trying to do.
    The CTR2 designation in the code was the object name of the card. I have two 6602 cards in my chassis. I was using ctr0 of the second counter card, so PFI38/39 was correct.
    Again, any help would be appreciated.

  • How to generate an analog biphasic single pulse

    Hi Everyone,
    I am a newbie to LV. I have been just using it for the last 3 weeks for my summer research project in which I am working with a professor on artificial neural networks. For the past week, I have been asigned to code a program in LV that will act as an interface between the user and the MEA via a STIMULATOR BOARD. I have successfully done the binary addressing part of the deal, but am stuck where I have to have a user-interface that will allow a user to generate an analog (AO) output of a single biphasic pulse to stimulate the neural network.
    The user has to have a choice of the pulse width (aka the duration), and the volt (aka height) of the pulse. Also he/she should be able to produce either a mono or biphasic simple SINGLE pulse (not a continuous pulse). I have been digging in examples but my efforts have not gotten me anywhere useful.
    Therefore, to all the LV experts...can anyone help me out with a VI that produces a SINGLE BIPHASIC PULSE for a finite time?
    Any pertinent help will be appreciated.
    Thanks,
    UE

    Ok.Here is the solution to ur problem.
     What u should use is the SQUARE WAVEFORM.VI, where user can specify the peak to peak value,offset & phase as well.
    Now inorder to generate the single square wave,its very simple.Under sampling inforamtion specify the Fs as 100 times the required frequenct Fout & no. of samples #s as 100(i.e.Fs/Fout). This will result in only one square wave.
    Then while writing on to your DAQ card select mode as "FINITE SAMPLE" mode.ith no of sample may be1.
    Let me give u a simple example. Suppose u want to generate the one square wave of 10Hz with +ve magnitude 5V& -ve to be 3V.
    The
    1.Peak to peak is (5+3) = 8.
    2. Offset is (5-3)=2.
    3.Phase is 0 or 180 depending on +ve or -ve pulse o/p first respectively.
    4.Frequency is 10.
    5.Fs is 1000 & #s is 100.
    6.Select the sample mode in "DAQMX timing.vi" as finite mode & no. sample per channel as 1.
    Also disable the REGENERATION PROPERTY od DAQ & try. It should help.

  • Waveform measurements - info needed

    I am fairly new to LabView and am trying to understand some of the vis in the Waveform Measurements and Analyze folders. Help with any of the following questions is appreciated.
    1) What is the phase output of the Spectral Measurements Express vi? I've seen several examples using this function and none of them use the phase output. If I put in a simulated sine wave with no phase offset, the FFT phase output is -90 deg at the input freq.
    2) What is the amplitude output of the Tone Measurements Express vi? It looks like average peak value over the duration of the signal, but I'd like to be sure.
    3) If I get a value of 28.42f at the "detected phase" output of the Extract Single Tone Information vi, what does the "f" mean?
    4) Is there any information about the details of these functions? The information in the Help window is scant, the tutorials provide a lot of theory, the examples don't always cover what I want to know. Is there somewhere that provides a fuller explanation of the inputs and outputs of the functions?
    Thanks in advance,
    Margaret

    Hi Margaret,
    In response to question 1, the Spectral Measurements Express VI is used for FFT-based measurements, and the Tone Measurements VI is used to find the frequency or amplitude of a specific signal. Have you tried viewing the Detailed Help for these commands? These can be viewed by right-clicking on the command, choosing Control-H to bring up the Context Help, and clicking Detailed Help. This will allow you to view Examples and detailed information on the inputs and outputs.
    Here is some detailed information about the Spectral Measurements Express VI from the Help:
    FFT-based spectral computations assume that the finite block of
    signal data represents one period of a periodic signal. The computed spectrum of
    this effective periodically extended signal shows energy spreading into
    frequencies that were not present in the original signal. To reduce this
    spectral leakage, use smoothing windows to taper the sharp transitions in the
    effective signal. You do not typically use windows if you can acquire an integer
    number of cycles of each frequency component measured or if you are analyzing
    noise spectra.
    In response to question 2, the amplitude of the Tone Measurements Express VI returns the amplitude of the detected single tone in Volts peak (Vp).In response to question 3, what is the phase of the signal that you're measuring? I used this VI with a Simulate Signal VI and simulated a sine wave and was able to correctly use the Extract Tone VI for all phases. Have you tried doing this?
    Also, here is the manual for the Spectral Measurements Toolkit. Let me know if you have any more questions.
    Amanda Howard
    Americas Services and Support Recruiting Manager
    National Instruments

Maybe you are looking for

  • Different size text in a shape/view shape/layers...help!

    Hi all, I am trying to work with a heart shape and I am having problems. I know how to write in it to make it the same shape but I am trying to get a heart outline, which I can remove when the text is done, but I want to add words as new layers so I

  • New to JEE5 not running  Sun Java System Application Server Platform  9

    Hi! I've downloaded the JEE5 in Windows XP, the installation was fine, I start the server following this From the Start menu, Programs => Sun Microsystems => Application Server PE=> Start Default Server. and this message appears: Domain domain1 is re

  • Programatically invalidate/validate cache for specific query

    Hi, I am looking to programatically invalidate and re-instantiate the cache for a specific query. I know how to perform this manually via RSRT, RSRT1/2....etc. What I am looking for is a way to schedule this and programatically control caching on spe

  • How to Kill Specific Execute Threads

    Hi. Through our application server, we noticed that there were some memory issues where the memory usage would rapidly increase from ~ 15Mb to the max heap size. Issuing a few thread dumps, we realized that there was a specific thread that was churni

  • Nokia 3120 Classic won't disconnect from internet?

    Hi, I was wondeirng if anyone can help me? I've had my Nokia 3120 Classic for a month or so now, on the 3 network. Whenever I load into Planet 3, to check my usage, read the news headlines, or I receive an MMS, I can connect to their internet fine, b