Sum low pulse width over fixed time period

Hello,
I'm using a NI cDAQ-9178 with the NI 9411 DI module.  I'm looking to read a (not very clean) ~100kHz square wave
signal and sum the low pulse width (1-3us each) over a 5ms period.  The falling transition is relatively clean, but
the rising transition is a bit slow (0.5-1us).
Any advice on how to code this?  I've looked at the counter examples for measuring pulse width and semi-periods,
but the values I get with those examples do not match what I measure with an oscilloscope.
Thanks,
Anna Liao

Hi Anna
It does not sound like you are receiving any errors, but maybe the suggestion provided in the document I Get Error -10920 When Counting Square Waves without an Adequate Rise Time can help in your application. It sounds like it could explain why your values do not appear correct.
Milan

Similar Messages

  • I want to create a TTL pulse. The stepper motor I'm trying to control responds to a high to low edge, when the low pulse width is greater than 0.5 microsecon​ds. What is the best way to go about creating a pulse like this?

    I'm using the NI PCI-6025E card connected to an SCB-100 wiring peripheral. I'm programming the DAQ card using LabVIEW 6.0.2 on a win95 box.
    My first attempt has yielded some surprising results.
    I created a vi with a single while loop set to true. Within that while loop is a two frame sequence. Both frames use the "Write to Digital Line.vi".
    The first frame sets the line in wire to false.
    The second frame sets the line in wire to true.
    The device channel on both frames has been set to my user defined channel nam
    e -> clock.
    clock --> sets the DIO0 channel to be digital write out.
    Using an oscilloscope and some wires I hook ground to the SCB-100's digital ground and I hook the probe to the DIO0 channel. What I see are two different pulses alternating between one another. One has a pulse width of 5ms and the other has a pulse width of about 50ms. You seem to get a grouping of one type of pulse followed by a grouping of the other type of pulse.
    Obviously this is very strange and not what I want. It is also far too slow. So I'd like to know if anyone knows how to do this properly. Remember I only need a low pulse width of 0.5 microseconds.
    Thanks,
    Any help or guidance would be much appreciated.
    Scott

    Scott,
    You don't need to use a digital line to create a TTL pulse. The PCI-6025E has two onboard general purpose counters. You can use one of these counters to create a single pulse of the desired pulse width. For an example of how to program the counters on your board, refer to LabVIEW's Search Examples>>I/O Interfaces>>Counters>>Pulse Generation>>DAQ-STC based.
    The advantage of using a counter over the digital line is that it allows you to control the timing of the pulse through hardware and not software. Thus, it is inherently faster, and the timing resolution is more accurate. The counter will count down an internal 20 MHz timebase to create the pulse delay and the pulse width.
    For more information on the hardware capabilities of your board, you can refe
    r to the User Manual online at www.ni.com/manuals.
    Hope this helps.
    Regards,
    Erin

  • Read no. of pulse count with fixed time interval

    Hi,
    I am try to read no of pulse count ( Pulse period = 500ms, On time = 100msec and Off time = 400msec). Between pulses there is a fixed time interval of 2seconds. I am using NI USB DAQ 6341. Can anybody help me regarding this? 

    Thanks for replying. I have gone through  that example, the given example are only increment count when pulese are detected.
    In my case, i want to count the no. of pulses between the time interval of 2sec. e.g. Suppose my device generate 5 no. of pulses and after every 5 pulses their is 2sec time interval, here i need to read only 5 pulses not the continuous count. And no. of pulses are generated by device can be vary but the time interval between those pulses are fixed. Could you give me suggession regarding this?

  • Digital Inputs do not record over long time periods

    I am running Signals Express 2009 with a USB-6009.  I have a project that needs to record the states of 8 digital inputs over a 24 hour period.  The inputs typically do not change state for long periods of time.  When I run the project it does record and gather data if I stop it "soon"(I have gone as long as 30 min.)  When I leave it running overnight it does not appear to record anything.

    If you have not already, you should try turning off display updates in the "Operate »Update Signal Views While Running" menu item.  Set this to Update None.  Also, turn off "Prepare log data for viewing" under the Logging part in the Tools » Options dialog.  
    When I ran your project overnight, it ran out of memory.  The first error it threw was "Not enough memory to complete this operation."  The problem was that SignalExpress saved a great deal of data in memory for easy displaying while it's running, but this grows too big when it runs overnight.  The second error was as follows:
    Logging Stopped:
    Logging was stopped because an error occurred with a Step in the Project. 
    If this error is because of a device buffer overflow, you can improve performance by turning off display updates using the "Operate »Update Signal Views While Running" menu item.
    You can also change the way signals are logged by changing the Logging Options in the Tools»Options dialog.  
    Turning off  the "Prepare log data for viewing" will greatly improve performance. 
    Mark E.
    National Instruments
    Schedule a Free 1-Hour online LabVIEW Tutorial with an NI Applications Engineer

  • 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

  • How does Pulse Params Vi determine pulse width

    I need to know how the PulseParams vi calculate pulse width, rise/fall time? Is it based on the standard 10/90 method or something else? How does it determine what is a "valid" pulse? What is the "Delay" parameter and how do you use it?

    Hello Lancer,
    The following is taken from LabVIEW Help under Pulse Parameters:
    X is the input sequence. X must meet the following conditions:
    � The number of samples in X must be greater than or equal to 3.
    � X should have a rising edge, a plateau, and a falling edge.
    � The expected peak noise amplitude must be less than 50% of the expected amplitude.
    If the number of samples in X is less than 3, the VI sets all the pulse parameters to NaN and returns an error. If X does not contain a rising edge, plateau, and falling edge, the VI analyzes the data, assigns values to as many pulse parameters as it can identify, and sets parameters it cannot identify to NaN. The VI does not report this condition as an error.
    Note X can be a positive- or negative-going pulse. A histogram is used to determine top and base. If the difference between top and base is negative, the pulse is considered negative-going with a negative amplitude.
    If the data in X is noisy beyond the expected 50% amplitude, the VI does not have enough information to differentiate between glitches and pulse data and may assign incorrect values to the pulse parameters. Because it cannot be detected, the VI does not report this condition as an error.
    Note If the data is noisy, you can apply a median filter to the data before passing it to the Pulse Parameters VI. Refer to Noisy Pulse Analyzed with a Median Filter for more information about analysis with a median filter.
    Note When the X data is a constant value c, the VI sets the pulse parameters to the following values.
    amplitude = overshoot = undershoot = delay = duration = 0.
    top = base = c.
    risetime = falltime = slew rate = NaN.
    slew rate is the ratio between (90% amplitude - 10% amplitude) and the risetime.
    overshoot is the difference between the maximum value in the pulse and the topline.
    risetime is the time required to rise from 10% amplitude to 90% amplitude on the rising edge of the pulse.
    top is the line that best represents the values when the pulse is active, high, or on. For a negative-going pulse, top is less than base and results in a negative amplitude. For a positive-going pulse, top is larger than base and results in a positive amplitude.
    amplitude is the difference between top and base.
    base is the line that best represents the values when the pulse is inactive, low, or off and is the level closest to zero. For a negative-going pulse, base is larger than top and results in a negative amplitude. For a positive-going pulse, base is less than top and results in a positive amplitude.
    undershoot is the difference between the baseline and the minimum value in the pulse.
    error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.
    falltime is the time required to fall from 90% amplitude to 10% amplitude on the falling edge of the pulse.
    duration is the difference between the falling edge time and the rising edge time at which 50% amplitude occurs.
    delay is the difference between the time origin and the time at which 50% amplitude occurs on the rising edge of the pulse.
    Pulse Parameters Details
    Note The Cycle Average and RMS, Transition Measurements, Pulse Measurements, and Amplitude and Levels VIs provide more measurements than the Pulse Parameters VI, and you can configure each of those VIs.
    The waveform-related parameters are slew rate, overshoot, topline (top), amplitude, baseline (base), and undershoot. If y-axis units are volts, then slew rate has units of volts per sample. The time-related parameters are risetime, falltime, duration (width), and delay and are expressed in units of samples.
    Note The VI assumes the input pulse or pulse train has a bimodal, or two-state, distribution. Any input other than a bimodal input can lead to inconsistent results.
    The Pulse Parameters VI uses the following steps to calculate the output parameters.
    1. Find the maximum and minimum values in the input sequence X.
    2. Generate the histogram of the pulse with 1% range resolution.
    3. Determine the upper and lower modes to establish the top and base values.
    4. Find the overshoot, amplitude, and undershoot from top, base, maximum, and minimum values.
    5. Scans X and determines the slew rate, risetime, falltime, duration, and delay.
    The Pulse Parameters VI interpolates duration and delay to obtain a more accurate result not only of duration and delay but also of slew rate, risetime, and falltime.
    If X contains a train of pulses, the Pulse Parameters VI uses the train to determine overshoot, top, amplitude, base, and undershoot but uses only the first pulse in the train to establish slew rate, risetime, falltime, duration, and delay.
    Note Because pulses commonly occur in the negative direction, the Pulse Parameters VI can discriminate between positive and negative pulses and can analyze the X sequence correctly. You do not need to preprocess the sequence before analyzing it.
    If none of these suggestions help, or if I�m not correctly understanding your issue, please post the software and versions you are using, the applicable portions of your code, and any other information that may help, and I�ll be happy to look further into it.
    Have a nice day!
    Robert M
    Applications Engineer
    National Instruments
    Robert Mortensen
    Software Engineer
    National Instruments

  • Change pulse width in a continuous generation using an array of High/Low Times using NI-DAQmx

    Hi,
    I'm using a PCI 6259 (M-Series) Multifunction DAQ, and I want to use a counter to output a pulse train with changing low times. I want to use this output signal as an update clock, where values of Digital Output Channel, and the Analog Output channels updates to new values sequentially in the order specified in their repective 1D arrays in the front panel. I want the updates to happen at every rising edge of the clock pulse. The times when I want this update to happen are also user-specified by an 1D array of times in the front panel. So I'm trying to configure one couter to output this changing width pulse train.
    I'm new to Labview/Ni DAQ. I'm using NI DAQmx, so far its been really nice and readable, and easy to understand. Even though I have never used NI-DAQ, I can clearly see that NI DAQmx is certainly much more programming friendly than NI-DAQ. I looked at the VI's available in the example, and also through many simlar posts in these Forums, and some web documents for my problem. Most of the solutions have focussed on changing times on the fly while the application is running. I want to specify the different times before a "DAQmx Start Task" is called. I'm wondering wether this is possible.
    I was hoping I could store the pulse width values in a buffer, and the counter could keep outputing pulses with different widths in one continuous operation. The M-Series help file says that it is possible to do that "seamlessly", but I dont see yet how I can use the NI DAQmx to do that. Attatched is the part of the Help file where it says that.
    Any help will be greatly appreciated.
    Attachments:
    Counter_Change_Frequency_Help.pdf ‏21 KB

    Hi Kevin,
    Thanks for your message. Well, I would like to point you to the 'DAQmx Timing' vi, which has an instance for change detection applications with digital input. I'm new to LAbview, but I'm wondering wether you can use that for your applications. Yes, I have seen the Viewpoint boards and their programs.. I have actually also looked into their Vi you are talking about, Kevin, for ideas to use with my board, but the core of the program is in C, which is something I would use as a last option, specially since I bought Labview to make life easier.
    To get back to the subject of my post, their is a vi 'DAQmx Write", and one of its instance is 'Write Counter Single Channe SINGLE Sample', and there is no 'Multiple Sample" option available for writing counters, as is for the Digital Ports and Analog Outs. That seems to be a bit surprising. To refer the following example
    http://zone.ni.com/devzone/conceptd.nsf/webmain/90DFE241E571056C86256FA4004ABB63
    (pulse width modulation with NI-DAQmx)
    If one can change values of pulse widths on the fly, I would assume thats it should also be possible to pre-define a sequence of pulse width values in a buffer from which the counter 'banks' can access the next pulse width from. ('Banks' are the 2 load register pairs for the counters and is described in the part of the M-series help file attatched in my earlier post).
    Hopefully somebody from NI can address our problem. And yes Kevin, currently I have 2 options,... 1. to create a digital waveform before hand, which will use a large buffer ( I want an experiment to run for 1s, with 0.1us timebase, or
    2. To use the example in the above web document and modify it a bit. Here frequency is changed on the fly, and a while loop checks if the frequency is changed in the at regular intervals. I could instead use a for loop to keep changing the frequency values, but I tend to think that the speed will be limited by software. I'm not sure .. I haven't tries that out yet.
    Hopefully someone can send me a nice elegant solution.
    Thanks.
    Shomu

  • Measure Pulse Width and Period Statistics

    Hello,
    I'm trying to solve what should be a very simple problem. I would like to measure common characteristics of a binary analog voltage input, pulse width and period. The canned pulse width/duty cycle/period VIs and express VIs use a histogram or peak to peak method on a set buffer size of data and produce one output. I would like to measure these signal characteristics over a long period of time and collect statistics on pulse width and period data (max, min, median, mean, standard deviation, etc.) to indirectly measure the eccentricity of a system. Although I am relatively inexperienced in LabView scraping off a considerable bit of rust, I did not think this task would present a challenge, but I have been stumbling around for a couple of days trying to create an array of output parameters such as pulse width so that I may calculate the statistics on all measurements.
    If anyone can step me through some of the thought process to a solution or show me how to format data collection so that this can be done, I would very much appreciate the help.
    Thanks,
    Evan
    Attachments:
    Example.jpg ‏194 KB

    Hi Gena,
    I am assuming you are using the DAQmx drivers in LabVIEW for your
    PCI-6014.  Avoiding a While loop may be difficult if you need to
    perform this measurement many times and you might not know when the
    signal is going to begin.  Without a While loop, you'll have to
    set up your timeout period long enough so the pulses will begin before
    your VI stops.
    With this in mind, you may want to look at some of the shipping
    examples with the DAQmx driver.  You can find these in LabVIEW's
    Help menu by going to Find Examples.  For measuring the pulse
    width, browse the folders in the Example finder by going to Hardware
    Input and Output>>DAQmx>>Counter Measurements>>Period
    or Pulse Width.  In this folder, there is the Meas Pulse Width.vi,
    which measures the pulse width once and stops.  You should be able
    to take the pulse width measurement you get from here and check to see
    if it's in your range, then output a pulse on the other counter if it
    is in the range.  The pulse output examples can be found in
    Hardware Input and Output>>DAQmx>>Generating Digital
    Pulses>>Gen Dig Pulse.vi.
    Thaison V
    Applications Engineer
    National Instruments

  • Display Data on waveform chart or XY graph over a long period of time

    Display Data on waveform chart or XY graph over a long period of time
    Can anyone help?
    I am acquiring data from an Ni DAQ card with the following parameters - sample rate = 12800, number of samples = 4096. I want to extract order information so as to track changes in the amplitudes of certain frequency harmonics. So I use the sound and vibration toolkit to extract this information as shown in the attached Vi.  I will like to plot the resulting amplitudes against real-time starting at the time the Vi was run.  I really want the display to show these changes over long periods (eg. days, months and even years).
    Problem.
    I have tried to plot the Y component of the resulting magnitude for a given order on a waveform chart. My choice of the waveform chart is because I also want to display  alarm limits (using the mask and limit vi) (I can't have these lines displayed on an XY graph plot).  I tried adjusting the scale offset using the property node and setting the offset to current time. However, the display on the X-axis can only show a span of  2 minutes as will be seen when you run the attached vi. I want the time display on the x-axis to be over a period of  days, months  and even years.  Is there a way to set the maximum scale on the x-axis to be say a year or so in future.
    I really want the display to be like the one in in the second attachment.
    Attached is a sample VI created using an Ni USB 9234 DAQ card. Any card will do but I am only getting the signal from one channel for this example
    I will appreciate any help that can be given to me.
    Thanks
    Attachments:
    Real-Time Graph Display.vi ‏170 KB
    Sampe screen1.doc ‏37 KB

    Long term testing can be tricky- and we'l get into that later.  Lets start with the basics that you have wrong.
    The vi as you have constructed it has only one memory element, the chart history length (default is 1024.)
    You can change the number of points the Chart will remember by Right-clicking the chart an select Chart History Length from the menu.
    But for a long term test - and one where you want to REMEMBER the first value you need a memeory element that is independant of the application.  Your PC WILL loose power or need to be rebooted eventually.  Heck it might even need to be replaced! you really need to store your data in a file. Preferablly in a file that is backed-up on a regular basis so you don't lose every point of data if the PC dies.  It realy hurts when you have to restart a 2yr test because you've lost the 18months of data you collected.
    For an application like this I would seperate my "collection" and "Evaluation" operations. 
    Have one vi that takes the reading and writes it to a file at a configurable rate  You may want 1reading  per minute for seveal days then 1 per hour for a few weeks- then maybe only once or twice a week for the next couple of years since you are looking for LONG TERM stability.  having too much data to evaluate can take a lot of digging to find the few things that interest you (but always take more that you think you need)
    Have another utility that COPIES the files, reads them and displays the data you are interested in that day.  The data you want to look at won't change over time HOWEVER, you WILL want to analize it in different ways depending on what the data trends look like.  Having seperate routines for collection and display allows you to update the display style and analisys without even stopping the collection vi (much less editing the vi)
    Jeff

  • Information on the reports that have run over a certain period of time

    Hi everybody,
    do you know any report (programme, table or other object) that provides with the information on what reports have been called by the users over a certain period of time in the past? I am especially interested in the reports in the customer name space (z-reports). Once there was a programme called RBE (Reverse Business Engineer) that could give this information, but it doesn't function in ECC 5.0 & ECC 6.0 anymore and no longer supported by SAP.
    I would be grateful for any information. Thank you! Nat

    Transaction ST03N will give you all the information you seek and then some!

  • Use of MS Project Management 2010 to Manage Multiple projects over a given time period

    Is there some information (article/s) I can research about using MS Project Management 2010 for managing multiple projects over a given time period? I'm being asked by a potential client to take a job as a Program Manager to manage five projects all
    at once. Each of the projects has it's own MS Project Management software, project leader, and project team. An overall project plan has to be put together to manage this large project. There are some dependencies with these projects inorder to complete
    on a specific date.
    Thanks

    SSCDML --
    In order to manage this program of five projects using Microsoft Project 2010, I would recommend you do the following:
    Create a shared resource pool file containing the resources in all five projects.
    Connect each of the five projects as sharing files with the shared resource pool file to share the resources.
    Create a master project for the program containing each of the five projects as subprojects.
    In the master project, set cross-project links as needed to show dependencies between projects.
    Hope this helps.
    Dale A. Howard [MVP]

  • Samples Not Acquired on NI 660x or NI 6624 Devices When using pulse width, semi-period or two-edge separation buffered measurements with the NI 660x and NI 6624 on counters 0 and 1, some samples may not be acquired under certain circumstances.

    In the DAQmx 9.4 Readme the following is stated:
    Samples Not Acquired on NI 660x or NI 6624 Devices When using pulse width, semi-period or two-edge separation buffered measurements with the NI 660x and NI 6624 on counters 0 and 1, some samples may not be acquired under certain circumstances.
    Could anyone elaborate on this? I am particularly interested in knowing under what circumstances this problem arises for the 6602 PCI devices.
    How should I understand 'NI 660x and NI 6624 on counters 0 and 1'. Is it only a problem on counter 0 and 1 for the 660x or does this only apply for the 6624 devices.
    /mola 

    Are there any NI Product Support Engineers out there who has an answer to this question and who are willing to share it with me?

  • [svn:osmf:] 15299: Fixing build: unit tests expect the seek to complete over a timer.

    Revision: 15299
    Revision: 15299
    Author:   [email protected]
    Date:     2010-04-09 03:04:45 -0700 (Fri, 09 Apr 2010)
    Log Message:
    Fixing build: unit tests expect the seek to complete over a timer. Adding this behavior on signaling the seek completion event from the newly added path.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamSeekTrait.as

    In general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
    That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
    Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
    Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
    While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
    Hunt

  • I am having data i want to measure pulse width without using hardware and tell me how to start and stop soft timer using labview

    soft pulse width measurement

    If you are creating a pulse in software somehow, then you can use Pulse Measurements.vi that's on the Analyze>Waveform Measurements palette. This will require that the input is of the waveform data type with signal and timing information. There's several timing functions on the time & Dialog palette that you could probably use. Check out Tick Count and Elapsed Time. If you could provide more details on what exactly you need to do, we could provide more help.

  • Time period over which finger taps are grouped together as one touch event

    Is this a value we can set ourselves? eg. making it longer so that two taps that are further apart are recognized as a part of a single touch event. Thanks.

    I just was hoping to try the "little guns" for such a little task.
    Maybe you should have used an even simpler application like MPEG Streamclip. If file names (either originals copied to your HD or those imported by iMovie '08) are in their proper sequence order, then simply drag and drop all of the files to the MPEG Streamclip work area (or use the "Open files" option to select the entire sequence via the Finder browser), fix time code breaks (Command-F), and then save the files in their current compression format (MPEG2/AC3 multiplexed file or MOV with I-framed MPEG2 video and AIFF audio) using the "Save As..." option or (if you have the QT MPEG-2 Playback Component installed) export as DV, AIC, or other target format as preferred for further editing, DVD burning, Internet uploading, etc.

Maybe you are looking for

  • Purchase order and IDOC

    Hi gurus, can anyone send all the configuration steps involved when i save an Purchase Order then an idoc has to be generated and send to PRD . Pls help me. Thanks and regards, Rajeshwar.

  • How can I watch 1920x1080 60p video in the iPad?

    Background - I recently purchased a Sony Camcorder.  It records in AVCHD format 1920x1080 60p.  I have converted the AVCHD format to .mov using clip wrap but I cannot sync the file to my iPad 3 with iTunes probably because the iPad can only play up t

  • Pictures in my Photo Stream disappeared?

    I was checking my photo stream for some pictures I took a while ago. I had about 750 photos on my Photo Stream, which I know is under the "1000 photos before they start deleting from your device" rule. Suddenly, just yesterday (after recently upgradi

  • Convert from version 5 to version 8.5

    I am trying to convert a V5 vi to V8.5 vi. Need help. Thanks. Rut

  • Authorization restirction at VL01N

    Dear Experts We have 2 dist channels as exports and civil.At VL01N delivery creation level the User should not be able to process the deliveries that belong to Exports Dist channel but can process for civils. Is it possible ? If yes then how?