Measuring puls width and time of 5 signals

Hello,
I have 5 signal lines that generate different pulses in time. I need to measure the pulse width on every line but also the exact time when the pulse occurs on each line.
I have a PCI-6602 that I can use for this.
Measuring the pulse width is not that difficult. I wanted to use a buffered pulse width measurement using 5 of the counters of my PCI-6602.
But I do not know how I can also get the exact time for these 5 channels ???
Any ideas how I can accomplish this with my PCI-6602?
Note: I do not need to use the maximum source frequency for my counters. Measuring the pulses with a timebase of 1Mhz is enough. (maybe even 100 kHz but I need to do some more experiments to be sure).
Thanks in advance for all your help!

Only have time to outline some suggestions:
1. Choose 1 of your counters to generate your timebase to make it easy to experiment with timebases like 1 MHz that aren't directly available on the board.  The other measurement counters should be configured to use it as their Timebase.Source signal (can be found in the DAQmx Timing property node.)
2. I assume you want the 5 measurements to start at the same time=0 point, right?  You should configure all 5 to use the same signal as a digital "Arm Start" trigger.  In LabVIEW, this can be found in the drop-down menu for the DAQmx Trigger property node.   I would typically use PFI0 as the trigger signal because this maps to the same pin that I can control via software as digital port0/line0.  Thus, no screwdriver work for wiring a signal.
3. If you're buffering 5 measurements, you'll need to configure at least 2 of the tasks to operate in interrupt mode because the board only supports 3 DMA channels.  This is yet another DAQmx property node setting.
4. There, now that the prelims are out of the way, here's how to get both pulse widths and pulse start times.  It's gonna take a bit of work in software though.
   Configure the counters for semi-period measurement.  This will cause the tasks to buffer up arrays with alternating values representing high times and low times of the incoming signals.  You should be careful and always read even #'s of samples from the buffer, never odd #'s.  You'll also need to configure so that you can predict which comes first -- high or low time.
  The high times will be your pulse widths, and the cumulative historical sum of *all* the semi-periods up until that high time will be your timestamp.
5.  Further description for handling 1 such task.  Create a while loop for reading values from the task.  Initialize a shift register to a count of 0 to hold your historical cumulative time.  (Note: depending on your duration and resolution, you may need to make this a double rather than an integer.)   Inside the loop, read an even # of samples from the task, say, 1000.   Pass the 1D array into the Reshape Array function to make it 500 rows x 2 columns.   Pass that 2D array into a For loop using auto-indexing.  Also pass in the value from your outer loop's left-side shift register into an inner loop shift register.  The inner loop will index out 1 row at a time.  The pulse width will be either index 0 or index 1, depending on your config settings.  Index it out and pass it out to the inner loop boundary with auto-indexing.  If your pulse width is index 0, the left-side shift register represents the timestamp for the beginning of that pulse.  Pass it out to the inner loop with auto-indexing as well.  (If pulse width is index 1, you may first want to add the duration of index 0 to the cumulative time.)  Finally, add the sum of indices 0 and 1 to the left-side shift register and pass it out to the right-side shift register.  Pass this shift register out to the outer loop shift register.  Pass the 2 arrays of data (pulse widths and timestamps) out to your main app via queue or something.
That's all the time I've got right now.  I realize the info is packed kinda dense, but if you do some further searching on the terms I've brought up, you can hopefully figure out a good share of it.  Once you've got it pretty close, post back and I can try to suggest some tweaks.
-Kevin P. 

Similar Messages

  • 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

  • Measure pulse width and generate pulse depends on the width

    Hi,
    i have a serias of pulses ... 600 micro,30 micro,30 micro (around 10 times) ........ nothing for 1 mili second ..
    so i need to generate a pulse after the first pulse arrives ... (its width around 600microSecond)
    1. use the first counter to measure the pulses ...
    2. if arrived pulse ... 500microSecond<the pulse width<700microSeconds .... then generate pulse with second timer ....
    the problem is that i dont want to use the while loop inside the labview ...
    can i programm the counters to make the width calculation and if the width is bigger to generate trigger to the second counter .... ?
    the hardware is 6014 sample card ....
    thanks
    gena
    (see attached)
    Attachments:
    F0087TEK.JPG ‏27 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

  • Measure ai (current) and ci (puls width) with NI6023 and DAQMX

    Hi I need to measure ai (current) and ci (puls width) with NI6023 and DAQMX.
    My problem is that I can measure the two by them selves.
    But I need to measure both at the same time!
    Is it possible?
    How does the code look?
    J;-)

    Hello
    DAQmx support multitasking operations and you are therefore able to execute multiple tasks at the same time.
    I do not know what software you are writing your code in, but if you are using LabVIEW you should just place the two tasks in parrallel loops and execute them or have both VI's runninng at the same time that are performing the tasks!
    Regards
    Mohadjer

  • Can counter measure pulse width difference between two signals

    I am interested in determining the high pulse width time that two signals have when they are in various phases between eachother.

    Why don't you try one of the pulse width examples. I don't know what ADE you are using, but you can search for examples (http://www.ni.com/devzone/dev_exchange/ex_search.htm) with the key words "+pulse +width" and find several examples in different languages. This will measure the pulse width of one signal, but you can program most of the counters to do multiple tasks at the same time. Just copy the code twice and change the counter number to program counter 2 as well. If you want the ORed pulse width time, I would recommend adding a OR gate to your circuit and then feeding that into a counter.
    I hope this helps.
    Joshua

  • Measure pulse width of signals generated by DAQ

    Eventually, I would like to:
        Start a counter pulse width measurement and analog out at the same instant.
        Stop the pulse width measurement with an external digital signal.
    My current plan is to use a digital out on the DAQ to go to a digital input and the counter start input.  The digital input will be a start trigger for the analog output.  This works, except for the counter.
    While trying to implement this, I tried a simpler test of just generating a digital pulse with the DAQ and wiring that to the counter inputs.  That doesn't work, even though it looks fine on an oscilloscope.  Then, without changing the software at all, I connect a function generator to my  counter inputs, and it measures pulse widths flawlessly.
    I'm actually implementing this with a Python wrapper around the DAQmx C API, but I recreated it in LabVIEW, and it behaves the same.  VI attached.  I have the latest DAQmx drivers.
    Attachments:
    meas_pulse_width_simple.vi ‏32 KB
    screenshot.png ‏99 KB

    ColeTrain wrote:
    apaulsen,
    Just a
    friendly heads up, but this is more of a DAQ post and you will
    generally get more replies to these types of questions by posting in
    the proper forum.
    That being said, try taking a look at
    the Example Finder and look under the DAQmx examples at
    synchronization/multifunction as this would be a good place to start
    working on what you're trying to wind up doing down the road. 
    I am actually the OP.  apaulson is my coworker, and he was logged in to the forums on the workstation from which I posted.
    I
    realized that it ended up in the LabVIEW forum, so I reposted on the
    DAQ forum:
    http://forums.ni.com/ni/board/message?board.id=40&thread.id=7185. 
    I understand why there is a search-to-post policy, but it's rather
    unintuitive and clunky, and I got confused.  IMHO, ubuntuforums.com
    does this the right way and automatically searches before you submit
    your post.
     Anyway, I figured it out.  See the other post for solution.

  • I m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me. thanks ravi

    i m using apple mac pc, when we start windows 7 , apple mouse doesn't work properly it take to much time to gain signals from the pc and many times it not work but when we use mac it moves fastly and works properly. please suggest me.
    thanks
    ravi
    <Email removed by Host>                                                                                                                                                                                                                                       

    sounds more like Bluetooth rather than moue, but w/o knowing w/o posting mac model type/year we... will... not... know... what you have
    All computers are personal computers, a PC though is also "non-Apple" in common usage.
    Mac also is platform and OS.
    Very confused reading what you are trying to tell us.

  • How is width measured for shapes and strokes converted?

    How is width and height calculated in the transform panel for an object? Does it use an average? An example can be seen in the first image. The lines are not a uniformed width.
    Also, how are strokes converted from pts to pxls? For instance, if I make a stroke that is 2.3 pt, when I expand the object the width in the transform panel will say 2.3px ; however, I thought the point to pixel conversion (even for a 72 dpi screen resolution) was different. An example can be seen in the last two images, where a line was made with a specified stroke width and then expanded.

    Hmm, I'm a bit confused. If I have a 1 pt stroke and Preview Bounds is unchecked in preferences, I recieve a width of 2.56px as seen in Figure 1. With preview checked I get the width of the bounding box at 3.56 px. However, I still put down a 1 pt stroke. Also when I change the angle of that stroke the widths change as seen in Figure 3 (same thing when expanded or Preview Bounds is checked or unchecked.)
    I'm really looking at trying to find the width of an object (such as the engraved lines below) and the width of distance between each; however, if I measure from point to point the angle should not matter, which is not the case as seen in Figure 3. Also, the width changes between various points of the jagged lines. Is an average used which is then displayed in the Transform or info panel?
    Thanks!
    FIGURE 1
    FIGURE 2
    FIGURE 3

  • My two months old IPhone5(AT n T) not receiving calls (quite a few times) even though signals are good,Because sometimes people are calling my landline and asking Is your phone switched off ? In fact network also good at that time.Any fix ?

    My two months old IPhone5(AT n T) not receiving calls ( quite a few times - Till now it happened around 15-16 times) even though signals are good,Because sometimes people are calling my landline and asking me that  Is your phone switched off ? Infact network also good at that time.Not sure about the problem.
    I contacted AT n T also and explained about the problem, They suggested to monitor few more days...whether it is real network issue or not. But I am very sure it is NOT network issue because one day I was waiting for my brother at my office open parking space, And i called my brother whether he is ready at his place so that i can go and pick him, but he told it takes sometime...and he told, he will call in 15 mins, So i was at the same location (NOT even moved 1 inch also ), just sitting and listening music and after 30 mins, I called him back and asked Still not ready, then he replied he was trying me from last 15 mins and it is going to voice mail , I got similar complaint from others as well. Today also my cousin called my landline and asked Is your phone switched off ? because i was trying to reach you but it is going to voice message, I saw the signals at that time, Signal strength is very good. I think there is some problem in Iphone5 may be LTE or something.
    Taking phone to next levels is good, But it should NOT hamper it's basic phone functionality ( Make calls, receiving calls, Voice mail etc ). Please let me know if any fix for this.

    You say it started on yours after upgrading to iOS 8.  I've been on iOS 8.0 for quite some time and only recently did this issue spring up. 
    The one thing I haven't tried is downgrading it back to iOS 7 (which would be a shame, but if it's the only answer...)
    I'll get back to you once I've tried that. 

  • Hi, i have purchased iPhone 5 about 15 days ago, its working well but only one problem that it has is that some time its losting signal and appear as no serves. would you please help me in this reqard. thanks

    Hi, i have purchased iPhone 5 about 15 days ago, its working well but only one problem that it has is that some time its losting signal and appear as no serves. would you please help me in this reqard. thanks

    Well, it could be that your carrier doesn't have a signal when it looses its signal.  You could try resetting network settings which might help - Settings/General/Reset/Reset Network Settings.  You'll need to set up any wi-fi networks you connect too again. If you're still having issues, contact your carrier.
    Good luck!

  • Can I receive and send a wifi signal at the same time on my MBP?

    Okay, so here's the deal. I recently moved across from where I was living. My old place is still using my internet and wifi. It is strong enough for me to pick it up on my MBP, but not strong enough for my iPhone 5. I know the Mac only has one wifi channel, so it can only send a signal if it is hooked up by ethernet.
    Is there a way for my MBP to connect via wifi and then send a signal out for my phone?
    Would a dongle work? If so, how could I set that up?
    Thanks.

    no you cant.
    your mac have one Wireless network card ,so you can connect to a lan or share a lan
    but not in a time use one card.
    if you have two cards , i think it will be. i mean , you can buy a usb wireless card and try it

  • Time capsule wifi signal and possible extension by airport extreme

    Hi all,
    I recently got a TC to replace my speed touch dsl modem/router as I thought the TC is much better. Unfortunately to my surprise, the wifi signal of the TC seems to be less powerful + Internet is more slow. I wonder if I have some settings that are not quite correct. I wrecked my brain over the net looking for settings and everything seems correct. Any ideas on this issue?
    Anyway, I am now considering either an airport extreme or airport express to extend the coverage. My questions are:
    1. Is the wifi signal of airport extreme, airport express and time capsule the same or one is more powerful than others?
    2. I'm thinking of getting an airport extreme to be the main wifi hub (ie the adsl modem would be connected to it) and putnthe TC downstairs to extend the signal. With this in mind I would connect it to a western digital tv live and stream videos.
    Any feedback would be appreciated.
    Kind regards
    Aldo

    Apple needs to create a configuration tool that configures all the Apple devices one owns by creating a network diagram using drag and drop symbols...
    Sounds like a cool suggestion. If you want Apple to hear it, go to www.apple.com/feedback/timecapsule.html

  • Why doesn't mini iPad have such a hard time keeping and getting a wireless signal?

    Why doesn't mini iPad have such a hard time keeping and getting a wireless signal? It's model PD531LL/A  Version 6.1.3

    Hi there,
    You may find the troubleshooting steps found in the article below helpful.
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    -Griff W.

  • TS3367 I was trying to contact my wife in another country on a trip as I have several times since she has been away. Today we connected and then lost the signal and when I tried her again I got connected to someone in CA. How does that happen??

    I was trying to contact my wife in another country on a trip as I have several times since she has been away. Today we connected and then lost the signal and when I tried her again I got connected to someone in CA. How does that happen??

    Edge has very clear restrictions, one being that you must have 6 months of clean payment history which you don't. Either wait until April 14, or good luck at Sprint.
    I am unsure how it can be determined the payment mix up was the fault of CS, but regardless, the mix up was done. There can be any number of reasons why a payment could be missed without any fault on your part, however you are still the responsible party for the account and must live with the repercussions.

  • I presently have a linksys wifi router, can i connect a time capsule through cat 5 cable for my apple products and to boost my signal ?

    I presently have a linksys wifi router, can i connect a time capsule through cat 5 cable for my apple products and to boost my signal .i live in a three story home and my linksys is in the basement. I have one cable on the top floor where most of my computers/ipads are.

    can i connect a time capsule through cat 5 cable for my apple products and to boost my signal
    Yes, configure the Time Capsule to create a wireless network using the exact same wireless network name and password as the Linksys wireless network.

Maybe you are looking for

  • GL Open Item does not appear in F-03

    Hi Friends, I am trying to clear the GL open items thru F-03, while I see all the open items that appear in Line item display through FBL3N (total 25), out of them only 24 appear in F-03, I can not see the 25th item. I have checked the document in BS

  • Where's Quick Time Pro?

    I thought Quick Time Pro came with Logic Studio 8? Where would I find the icon to launch it? The only thing I have been able to find is the Quick Time player... Thanks, Greg

  • TB 500: use VGA or DVI w/adapter?

    I need to add an ext. LCD to an original TiBook 500. Does it make any difference in PQ if I get a PCMCIA/DVI card instead of using the VGA port? Thanks.

  • Unlock screen not responsive after pressing Home button

    Usually when I lock my phone, I can press the Home button to turn the screen on so it can be swiped and unlocked. But recently I have had to hit the Home button multiple times for the screen to appear, sometimes it does not appear at all (I have to p

  • N97 application problem on homescreeen

    Hi, First, i'm french, so it's possible that i've done mistakes in my mesages I've got a N97, and on the home screen, i put some applications like ACCUWEATHER... But on the screeen, there is only this message ( "loading content" ) I'm looking for any