Highly accurate timing stamping with 6602

Hi,
We recently purchased a 6602 counter/timer board to be used in a quantum key distribution experiment. What I'd like to do with it is some highly accurate (hopefully as fast as the clock 80MHz -> 12.5ns) time stamping. I have a vague idea of what I should do, but it's been a while since I used LabView, so if someone could point me in the right direction with some resources and examples that would be great. What I'm thinking is that I start the experiment with a trigger, then one counter channel gets the 80MHz clock as input, every time a second counter channel gets an event I stamp that event with the clock count and dump the time stamp and event to a file (excel or just a big long txt list). Does that sound about right? Any good examples of how to access the clock on this board with LabView, and any other code or ideas that I might need?
Thanks,
Chris

Hello Chris,
I was looking back at out discussion and I think I might have made things more confusing than they could be and I think there is a simpler way to accomplish what you are trying to do.
1) Buffered Event Counting - For our particular appilcation, buffered event counting will allow us to a) count events at both the source and the gate of the counter (I will explain in a second) and b) let us know the amount of time between consecutive events on the gate or the counter. The count register will always hold the number of active edges that have been input into the source terminal of the counter. In our case, we want to input the 80 MHz clock. Because we know the frequency of the signal (80 MHz) coming into the source terminal of the counter, we can determine the amount of time that has passed since the first active edge input on the source based on the current value in the count register. For example, if the count register has a value of 800,001, that means 800,001 active edges have been input into the source terminal at a frequency of 80 MHz, which means the timestamp for the 800,001st active edge is (800,001-1)/(80*10^6) = 0.01 s relative to the first active edge. In buffered event counting we also have a signal coming into the gate terminal of the counter. This signal is going to latch the data from the count register and store it into a buffer at every active edge. The size of this buffer will let us know how many active edges occured at the gate because for each active edge there should be one count register value in the buffer. Based on the actual values in the buffer, we can now calculate the timestamps for the active edges occuring on the gate. For example, let's say we receive an edge at the gate. We latch the count register and it has the value 2. We receive another active edge on the gate and we latch the count register value 500. That means that between those 2 active edges on the gate, the counter counted 498 edges at the source that were coming in at 80 MHz. The time between the two gate edges is 498/(80 MHz). Below is a timing diagram of buffered event counting.
Also, the LabVIEW example for buffered event counting can be found here:
C:\Program Files\National Instruments\LabVIEW 7.1\examples\DAQmx\Counter\Count Digital Events.llb\Count Digital Events-Buffered-Continuous-Ext Clk.vi
I've modified this example so that the source terminal of the counter uses the 80 MHz timebase. It is attached as "Buffered Event Counting.vi".
2) Large Range - In your most recent post you sounded concerned about reaching the terminal count of the count register when using the 80 MHz timebase. In order to avoid this, you can always route the output of the counter to the input of another counter. The output of a counter outputs a pulse whenever it reaches it's terminal count. We can use another counter to count the number of times we have hit the terminal count on the other counter.
3) Trigger - There is no direct way to trigger a counter measurement. However, you can control when the counter starts counting by determing when the active edges on the source terminal begin to appear. Counters can be used to generate pulse trains. You can use this pulse train instead of the 80 MHz timebase discussed in step 1) (however, you will not be able to generate a 80 MHz signal, the maximum will probably be 40 MHz). Since this pulse train can be triggered, you can effectively control when the counting begins. An example of this can be found here:
C:\Program Files\National Instruments\LabVIEW 7.1\examples\DAQmx\Counter\Generate Pulse.llb\Gen Dig Pulse Train-Continuous-Dig Start.vi
One thing to note is that setting up your event counting for a large range requires extra counters and doing a triggered pulse train generation also requires more counters. If your board only has 2 counters, you will not be able to do both.
I hope this information helps out, let me know if you have any other questions.Message Edited by E.Lee on 06-03-2005 05:04 PM
Message Edited by E.Lee on 06-03-2005 05:05 PM
Eric
DE For Life!
Attachments:
event counting buffered.GIF ‏9 KB
Buffered Event Counting.vi ‏75 KB

Similar Messages

  • Data acquisition with highly accurate GPS time stamping (hh:mm:ss:sss UT)

    A research group has developed a data acquisition system dedicated to daily observations of solar phenomena at radio waves using high time resolution (5-100 ms).
    First, the analog signal from the antenna (1000-2500 MHz) is sent to a spectrum analyzer (HP8559-A). After that, the analog signal is digitized during 5 minutes in a NI USB-6009 device connected to the PC, before to be stored in a file. By that time, other acquisition data cycle is restarted and so on up to the end of day.
    However, we need timestamp (UTC) the solar data at the beginning and end of each sample of 5 milliseconds, during all acquisition process, in order to have the UTC time information of recorded solar events. So, a time resolution of at least 1 ms is required.
    A software permit us to read recorded data and visualize corresponding spectra during last 5 minutes. However, we need UTC time information in the format hh:mm:ss.sss UT. Then, UTC millisecond is important for us, but not available yet.
    To solve this problem, we are searching for a high accuracy timing GPS receiver (on the order of microseconds or nanoseconds), with at least three significant digits of precision (UT time in milliseconds) and which give us the UTC signal at least each 5 milliseconds or even better (1 ms). However, most GPS receivers only outputs 1 PPS (Pulse Per Second = 1000 millisecond).
    Then, we are open to a better addressing on how to solve this problem !!
    We know that GPS time synchronization with PXI-6608 can be used to precisely timestamp data acquisition, but we have to solve this problem with a lower cost. Also, we require a PCI interfacing instead of PXI.
    Do we have to use a timer card? How do we use a timer, GPS and USB-6009 to timestamp data acquisition? Does the NI PCI-6602 solve the problem?
    Obs:
    The data acquisition software was developed in C++ Builder to run on a PC (Pentium III 2 GHz) under Windows XP environment. We used the NI-DAQmxBase driver to sample the signal from the NI USB-6009.
    We are sure your expertise can help us on this matter.
    Regards,

    I better explain my problem in the thread How to timestamp continuous analog data acquisition using USB-6009 and GPS timing board?
    We are considering to use the PCI-1588 or a GPS timing board (low-profile slot too), but I´m not sure that the USB-6009 can be used to solve the problem.
    How to syncronize the data acquisition and timestamps using USB-6009 and PCI-1588 with external GPS?
    In other thread I would appreciate any suggestions for GPS timing board and PCI-1588 too.
    Regards,
    Lilian

  • NI PCI-1588 Windows XP Accurate Timing Device

    Hi, I see this product has been discussed on this forum here before so I hope you can help me! (Maybe Tom)
    I need to log socket messages to and from an electronic trading platform with microsecond accurate timestamps and would also like to be able to schedule events with 0.5ms accuracy. Getting the messages to match exactly to real time with a GPS is nice but not so vital.
    Currently I log the data with a Windows System Time (normally accurate to about 10ms) and add a high performance timer tick count so I can check approximate relative timings. Just having a single accurate timestamp would be much nicer. By messing with the multimedia timers I can get sleeps accurate to 1 or 2 ms but I would also like more precision.
    It looks like I could buy this NI PCI-1588 Interface http://sine.ni.com/nips/cds/view/p/lang/en/nid/202345 and use the enclosed C DLL software NI-Sync to get all this (The C DLL should work fine with C# and C++). Can I add an external GPS for accurate timing? Could I also just use the card as is allowing it to sync with the internet?
    Is there another product I should consider? I don't really need to sync multiple machines to one time source... just have very accurate times and callbacks on one machine. I also looked at a Windows RTX addon but it was much more expensive than this card.
    Many Thanks

    What a strange forum. It took me fifteen minutes to find the reply button. I am have been waiting for a reply for so long but this answer looks very strange. 
    Are you sure of this? Anyone else?
    Whats the point in having an accurate sychronised clock card in your machine if you can't read the time from it? Are you sure I can't use the C DLL to read the time in the device? I am talking about abandoning the Windows Clock and using the clock on this board via the C DLL. I looked at your article but I am not really sure what Lab View is. I just want to use the C DLL to read the clock. I have no other hardware etc that links to this and I am not really in a lab. I am just trying to get accurate timestamps in my code. I want to use NI-Sync and I don't know about Lab View.
    Message Edited by willyhoops on 05-07-2008 01:59 AM
    Message Edited by willyhoops on 05-07-2008 02:01 AM

  • Dv video time stamp with analog input

    Hi,
    I have a dv video which I want to time stamp with a analog input.  For the video, which is dv brought into the computer with ieee1394, LabView calls up a C++ program which then stores the video.  Simultaneously, in the program which calls up the C++, an analog signal is also stored (seperately).  I know it sounds tricky as well as messy but this is the best we've been able to work out, given the uncorroperative nature of LabView with dv camera.  Does anyone have suggections for time stamping these two signals so that I know exactly where in the video the analog signal occurs?  The PCI board we use is the NI 6014, which I know is timestamp capable, but I dont know if it can stamp the video feed since it doesnt come in through the NI card.
    All thanks in advance for any help!
    Daniel

    Daniel,
    Does your DV camera have any sort of timing or triggering signals? Without these, it will be virtually impossible to correlate measurements. It is cetainly possible to accurately time an analog input with your DAQ card, but correlating these to the digital video would be extremely difficult. Is this video streaming in real time? Or are you reading it off of an already-recorded tape? If this video is streaming in real time, with an acquisition started in software, I would suggest attempting to start the software DV reading at the same time as your DAQ task. If you do have an external signal that can trigger the video acquisition, then I would suggest using that same signal to start your analog acquisition.
    Hope this helps,
    Ryan Verret
    Product Marketing Engineer
    Signal Generators
    National Instruments

  • Dynamic stamps with Acrobat Pro X

    Help needed!
    How to create own dynamic stamps with Acrobat Pro X, without any knowledge of programming.
    It was very easy with the program used before (Nuance); unfortunally it's not possible to export from Nuance to Acrobat.
    Thanks in advance
    vtosi

    It can't be done without using a script, and not a very simple one, either.
    There are detailed tutorials about how to do it, for example here:
    http://acrobatusers.com/tutorials
    If you're interested in someone to create the stamp (and all the required
    scripts) for you, feel free to contact me by PM or at [email protected] .

  • Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

    Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

    Upgraded to IO6, seems like the amount of system memory to run is higher, this causes issues with some Apps. I can't get SIRI to work because the amount of free system memory is not enough. how can I tell what is eating the system memory?

  • Request for info on fatal error handling and High-Precision Timing in J2SE

    Hi
    Could anyone please provide me some information or some useful links on fatal error handling and High-Precision Timing Support in J2SE 5.0.
    Thanks

    Look at System.nanoTime

  • How do I get a time stamp with EACH text message?

    How do I get a time stamp with EACH text message?

    Wow finally! It's nice to see Apple finally provided something as simple as a time stamp.
    Now if they would only put in an Auto Retry for text messaging I would be all set
    Does anyone use the current Android OS? Does it have an auto retry function?

  • Calculate accurate datagrid height with variableRowHeight and without any empty row

    hi ,
    how can i calculate accurate datagrid height with variableRowHeight="true" and without getting any empty row.
    Currently i am calculating datagrid height on updateComplete event of datagrid as follows:
    public function onUpdateComplete() : void
    this.datagrid.headerHeight=50;
    datagrid.height= datagrid.measureHeightOfItems(0, this.datagrid.dataprovider.length)+this.datagrid.headerHeight;
    with following datagrid properties:
    <mx:DataGrid 
    dataProvider="{dataArrayCollection}" width="100%" rowCount="{dataArrayCollection.length}"
    id="datagrid" updateComplete="onUpdateComplete()" paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"
    fontSize="12" wordWrap="true" variableRowHeight="true" verticalScrollPolicy="off" >
    With this approach the issue is, i am getting scrollbar on datagrid's container. I want scrollbar for datagrid instead of its container so that i can have only rows to be scrollable and not the header. Also, if i set verticalScrollPolicy of datagrid as "auto", i get empty rows.
    So,is there any way to have datagrid with following properties:
    variable row height
    no empty rows
    word wrap for headers as well as for rows
    Scrollbar for grid i.e. header should remain fix ,only rows should be scrollable
    no horizontal scrollbar
    TIA

    http://blogs.adobe.com/aharui/2010/10/mx-datagrid-list-and-variablerowheight
    .html

  • Importing High Res. JPG with RAW?

    Is there any reason to import JPG images with RAW images? I sometimes shoot high res. JPG with RAW just so I have some high res. JPGs for temporary use immediately after a shoot and for archival purposes, but I can't think of a reason to import JPGs into Lightroom when there is a RAW. Thanks for any clarification.
    Dilip

    with one option it let's you know the jpg exists, but you can do absolutely nothing with it, even delete it easily from within lr. The other treats them both seperately, and all controls can work on either file. To each their own I suppose but I see no compelling reason NOT to import them as seperate files, it only adds confusion to the managing of digital assets for me, as lr provides no means of seperating the combo designation after import.
    Many times I leave camera on raw+jpg mode even for snapshots, and decide the jpg is good enough and I don't desire to do any processing on the Raw. Other times the raw is easily superior, and the jpg is garbage. Treating them seperate puts me back in control of what I use and how. But, as I said different ways of working call for different ways of handling it; I'm glad we at least get an option to do it either way.

  • Can only get the "Draft" stamp when insert customer stamp with C#+JS

    I am trying to insert customer stamp in batch files with C#+JS.
    My JS works well in Acrobat. However, it doesn't work when use C#+JS. I always get the Acrobat's "Draft" stamp other than my own ones (the AP value is confirmed correct).
    In c#, it runs as this ( with the objectype.InvokeMember())
    1. initial an annotation with addAnnot first and get the properties object with method of getProp().
    2. Set the type entry of the properties object as "Stamp"
    3. With setProp(), modify the annotation to a Stamp annotation, and then get the properties object of the Stamp annotation.
    4. Set the entries (rect, page, AP ) of the properties object. Then use setProp() again to modify the properties of the Stamp annotation.
    The program runs without any error message. But I can only get the default stamp "Draft".
    One thing I found so far, in JS console in Acrobat, if I set the AP properties AFTER set the annotation type to "Stamp", it also get the "Draft" stamp only. as this,
         annot = this.addAnnot();
         prop = annot.getProps();
         prop.type = "Stamp";
         annot.setProps(prop);
         prop = annot.getProps();
         prop.page = 0;
         prop.rect = [0, 0, 100, 100];
         prop.AP = "#xxxxxxxx";
         annot.setProps(prop);
    If I set the prop.Ap before the forth line in above para, I can get the right stamp.
         annot = this.addAnnot();
         prop = annot.getProps();
         prop.type = "Stamp";
         prop.AP = "#xxxxxxxx";
         annot.setProps(prop);
         prop = annot.getProps();
         prop.page = 0;
         prop.rect = [0, 0, 100, 100];
         annot.setProps(prop);
    Or, if I set the props in the typcial JS format like below, I also get the right one
    annot = this.addAnnot({
    type: stamp,
    page: 0,
    rect: [0,0,100,100]
    AP: #xxxxxxxx)});
    But, the problem is, in C#, the AP properties can only be set after set the annotation type as Stamp (step 4). I think this might be the reason, but I don't know how to get over this.
    Please help. Thanks!

    No, it can't – but you could do that yourself as part of the watermarking process (ie. Two watermarks or fields)
    From: santa-satan <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Mon, 6 Feb 2012 18:35:19 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Can only get the "Draft" stamp when insert customer stamp with C#+JS
    Re: Can only get the "Draft" stamp when insert customer stamp with C#+JS
    created by santa-satan<http://forums.adobe.com/people/santa-satan> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4190155#4190155

  • T61 - No sound - Audio Device on High Definition Audio Bus with yellow exclamation mark

    Hi,
     I am not sure when it started but suddenly my T61 has no audio/sound. I checked the Device Manager and did see the Audio Device on High Definition Audio Bus with yellow (big) question mark with yellow exclamation mark superimposed on it. I downloaded, from Lenovo Support site, the 7ka114ww.exe , hoping to fix it by un-install that device, reboot it,  and re-install using the download exe file, but to no avail.
     Any suggestion or help is really appreciated. Many thanks in advance
    PS. I also see the Base System Device pop up after a reboot and ask to be installed ?!? That pop-up had been there for a while before the audio/sound was lost.
    Solved!
    Go to Solution.

    Hi Maliha,
     I followed your instruction to execute the exe file under C:\Drivers. After that, I rebooted the system and no more error pop up for the missing audio device. I checked the Device Manager and the Audio Device on High Definition Audion Bus disappeared and the SoundMax was shown. But again, still no sound. I clicked on TroubleShooting on that SoundMax and followed that instruction. I found out the default Sound device was erroneously pointed to BlueTooth. I made the change to SoundMax and voila ... the sweet ding sound came back.
     That was a wonderful feeling to be able to fix  this nagging problem that my company HelpDesk could not help me. All thank to this forum and particular Maliha. Again, my appreciation to the valuable help.

  • Create stamp with empty textfield

    I want to create a dynamic stamp with an empty textfield.
    After placing the stamp on a drawing I want to be able to type a random text in the textfield.
    Can anyone help me?

    That's not possible, I'm afraid.
    Once a stamp has been applied it is flattened and can't be edited anymore, including any form fields in it.
    What you can do, however, is prompt the user to enter the text into a response box, and then populate the text field into the stamp just before it is applied.
    Have a look at this tutorial to see how it's done: http://acrobatusers.com/tutorials/2007/02/dynamic_stamp_secrets

  • Hello, I would like to know what is your policy for higher educational institutes or with whom should I be in touch with? Thanks

    I would like to know what is your policy for higher educational institutes or with whom should I be in touch with?
    Thanks a lot for your help,

    Apple HED has no published email addresses, and since Apple does not sell their products directly in Israel, you will probably need to work through local distributors or dealers in any case. I would suggest contacting Apple's authorized distributor, iConGroup:
    http://www.icongroup.co.il
    Regards.

  • Reading simulated encoder with 6602

    Hello!
    I'm trying to read quadrature encoder (to be more specific this is an output of the pulse train generator that simulates the encoder).
    In the attached picture you can see how the signal that i'm trying to read.
    I need an advise about the correct filter settings.
    Please also see the attached vi.
    Usefull data:
    Labview 8.2.1
    Capturing device PXI-6602.
    The Encoder is 16384 pulses. (If the reading is x4, i should get 2^16 - 65536 ticks).
    The Encoder has differential outputs, but i've connected only A,B and Z.
    The rotating speed is up to 5000 rpm. You can see in on the picture. (16384*(5000/60)=1,365,333MHz).
    There is no problem to read the encoder with another devices, i have a motion analyzer from Control&Robotics solution and it works great.
    Thank you.
    Elman Izia.
    001.jpg (78 kb)
    Position capture.vi (171 kb)

    Hi Elman,
    The filter clock is used to make sure that your signal has
    integrity and eliminates glitches.  In
    order for signal to be counted, it must remain high for two consecutive periods
    of your filter clock.  There are five
    time bases (5us, 1us, 500ns, 100ns and programmed) that can be used as your
    filter clock.  The programmed clock can
    be created by another counter and this setting will let a signal be counted if
    it is at least twice times the filter period.
    This is a great method to help eliminate errors that can be
    introduced by noise, crosstalk or transmission line effects.
    The TimebaseSrc property is going to select a clock to be
    used as the source.  In your example that
    property is correct, you would want to use the 80MHz clock.  The TimebaseRate property is going to be used
    to divide the clock down to specific frequency. 
    It will divide the master clock down by an integer value and round it to
    get a rate that is as close to the value entered.  I would recommend leaving this number as
    80MHz. 
    The MinPulseWidth property is going to determine the clock
    of the filter clock.  This property is
    going to use the TimebaseRate property to create the predefined filter clock
    settings.  If your signal stays high for
    two consecutive periods of the minimum pulse width, then it will be counted. 
    You need to determine the minimum pulse width that is
    acceptable for your application.  Since
    your signal has a pulse width of about 360ns, you might want to use the
    predefined filter clock of 100ns.
    In short, you are creating a digital filter that will only allow
    a signal to be recognized if it remains high for two consecutive pulses.
    For further explanation, refer to the PCI/PXI–6602 User
    Manual page 3-20.
    http://www.ni.com/pdf/manuals/322137a.pdf
    Respectfully,
    Rob F
    Test Engineer
    Condition Measurements
    National Instruments

Maybe you are looking for

  • IMac keeps losing network connection

    My iMac keeps losing the connection to my AirPort very sporadically, but very often. I keep having to open Network Assistant, choose the AirPort and the network, and re-enter the password. I then get a message that my network connection appears to be

  • How to implement Disaster Recovery in TimesTen?

    hello, chris: we have a requirement to implement disaster recovery from remote when the master and standby nodes are failover in local. how to implement it in timesten? Can master standby pairs with subscribers mode caryy out it? when the master and

  • Using standard node functions

    Hi all, i am newbie i want to knwo how can i convert following source message to target message using standard node functions? Source Message <devices>     <device>         <sn>123</sn>         <city>Berlin</city>     </device>     <device>         <

  • Using TS 2.0 and LV 8.6 with Runtime Engine

    Hi All, I just got a project to use an old version of TS and a new version of LV. Can I use LV 8.6 VIs that are not built in TS 2.0 using only the 8.6 RT Engine? I have installed all of TS 2.0 and the LV 8.6 RTE, but it does not run and it generates

  • I've got the Ghost Music bug/disappearing songs/vanishing content - every time I sync.

    Yeah, I've got this bug. https://discussions.apple.com/thread/3909940 Everytime I stupidly plug my phone in, (it's happened three straight times in the past two weeks, you'd think I'd learn by now), it seems to sync fine, until it gets to step 6 - Wa