How can I disarm the counter in a specified time?

I am using 6602 counter. I use 2 counters to perform "Buffered Period Measurement ". I use internal time base (20MHz) as the SOURCE, and wire the signal to the Gate. The counters are triggered by a trigger signal.
Now I just want to stop counting the signal in a specified time after the counters triggered. After that time, even the input signal is still running,the counting must be stopped. How can I implement this purpose? I don't know how to disarm the counter when the counter are still running, and how to exactly determinate the stop time.
Thanks for any advise. I have attach my present routine here.
Attachments:
counters.vi ‏192 KB

Just to expand a bit on Justin's answer to outline a few particulars.
You mentioned using 2 counters to capture buffered periods so I'm assuming that you'll enable triggering to guarantee that they both have the same start time. Note that in this scheme, element #0 of your array of buffered periods will represent the time from the Trigger edge until the first Gate edge.
Since your description made it sound acceptable to ignore pulse periods occurring later than the interval of interest, perhaps you can collect data for a little longer than necessary, then reset the counters and trim off the periods that came in "too late" using 'Array Subset.' A quick-and-dirty way is to loop over each array of periods, performing a cumulative sum until it exceeds the specified data collection time interval. That'll tell you the length of the subset you need to keep.
The hard part is that after starting the measurement, you'll need to poll task attributes/properties to determine when the trigger has been received. Only after that's been determined would you start keeping track of approximate time in software.
There are ways to do the timing in hardware if you get more of the 6602's counters involved. Here's one way:
1. First configure your 2 counters for buffered period measurement. However, instead of using the internal timebase for a Source, use another counter's output as a Source. Under DAQmx, the internal routing details are handled for you; under traditional NI-DAQ, you'll need to make explicit routing via RTSI.
Note that in this scheme, these 2 counters don't need to be triggered.
2. Next, generate a finite-duration pulse train at 20 MHz (examples can be readily found under LabVIEW help or this website). This pulse train should last for your data collection time interval, and will act as the Source signal for your period measurements. It is important that the period-measuring counters are started before the finite pulse train.
The finite pulse train uses 2 counters -- one to generate the output pulse train at 20 MHz and a "helper" that produces a single pulse whose duration equals your data collection interval time.
If you need to synchronize to some external trigger signal, you can set the "helper" counter to be triggered, but there'll be one subtle catch. The first period measurement in your buffers will not include the time from the external trigger signal until the beginning of the single "helper" pulse, i.e., the "delay" time spec for the pulse. You can either make this very very short and ignore it, or make it any convenient duration and then add it to the first period measurements. Be careful though: the timebase for this "delay" time isn't necessarily the same as the timebase used to measure periods.
There's quite a bit of complication there, so let me suggest an easier way that assumes no need to synchronize to an external trigger. (I'll use DAQmx terminology, since the traditional NI-DAQ would get complicated again with explicit RTSI signal routing.)
A. As describe in #1 above, configure your period-measuring counters to use a 3rd counter's output as the timing source terminal.
B. After starting your 2 period-measuring counters, start up the 3rd counter to generate a continuous 20 MHz pulse train.
C. After the 3rd counter starts, call the 'Wait (ms)' function from the Time & Dialog palette. Wait for slightly longer than your desired collection time.
D. Read all buffered periods from the counters. You may need to first query each to find out how many are waiting to be read.
E. Reset all 3 counters.
F. Do the cumulative sum work on the two buffered period arrays to determine where each should be truncated.
Note that step "C" above will leave you stuck while data is being collected. A small variation would be to read a reference time ("Tick Count (ms)") right after starting your 20 MHz counter, then set up a loop that allows you to terminate early (logical OR of, say, "abort" button, data acq error cluster error, and time comparison). In that loop, you put a delay of maybe 50-200 msec using "Wait (ms)."
"Wait (ms)" will output a tick count from which you subtract the reference time. When the difference exceeds your data collection time, you can exit the loop and continue with step D above.
-Kevin P.

Similar Messages

  • How can I change the counter symbols for the slideshow templates in Muse?

    How can I change the counter symbols for the slideshow templates in Muse? Currently they are obviously normal text characters. So, how can I change them to filled circles, for example?

    Hi Aish,
    Thank you very much. This was very helpful. I am still new to Muse and try to find my way through all the features and possibilities. I like it very much so far.
    Does Muse support ‘liquid” design as well?
    Thank you !
    Best regards,
    Fred

  • I am living in Saudi Arabia and I wish to buy iPhone 6 with face time enabled. How can I confirm the new phone is face time enabled or not? In Saudi Arabia face time enabled iPhone 6 is available with some shops.

    Dear Sir,
    I am living in Saudi Arabia and I wish to buy iPhone 6 with face time enabled. How can I confirm the new phone is face time enabled or not? In Saudi Arabia face time enabled iPhone 6 is available with some shops.
    Rahul

    All legitimate iPhones sold in SA have Facetime removed on the order of the SA Government and it cannot be reinstalled
    any iPhone you purchase claiming to have FaceTime will be a grey import and may not function correctly as it will have been destined for another Country

  • I recently purchased a brand new Airport Time Capsule 2TB. I already am using the previous generation time capsule to back up all my computers data. May I ask how can I complement the usage with my new time capsule?

    I recently purchased a brand new Airport Time Capsule 2TB. I already am using the previous generation time capsule to back up all my computers data. May I ask how can I complement the usage with my new time capsule?

    By default your new Time Capsule will broadcast an unsecured wireless network with a network name of something like: Apple Network NNNNNN
    Most likely your iMacs will be connected to the wireless network created by the Virgin Media router. However, both should see the Apple Network under the AirPort icon's drop-down menu as another wireless network that they can connect to. Is this not the case?

  • How can I execute a method on a specified time?

    How can I execute a method on a specified time such as method1() will be executed on 1:00 p.m and the method2() will be executed in 1:00 a.m?

    BilgeTonyukuk99 wrote:
    How can I execute a method on a specified time such as method1() will be executed on 1:00 p.m and the method2() will be executed in 1:00 a.m?As a simple example, take a look at http://www.javapractices.com/topic/TopicAction.do?Id=54.
    As an alternative (and looks like better approach), you could use the ScheduledThreadPoolExecutor.

  • How can I evaluate the count of a query I'd like to execute with a map...

    Hi. I have a problem with a query...
    I hava created a query which a execute with a Map (I use the
    executeWithMap(Map) method). The problem is that sometimes this query
    returns a large resultset. So, I would like to execute an other query
    (called query_count) before executing ther final query with the Map. If
    the query_count returns a count < 200, I execute the final query. How can
    I do ? There is an example I have read this in the documentation :
    Query query = pm.newQuery (Magazine.class, "price < 5");
    query.setResult ("count(this)");
    Long count = (Long) query.execute ();
    The problem in this example is that the query is not execute with a Map.
    So my question is : "How can we do the evalute the count of a query we
    would like to execute with a map ?". Thank you for any response.

    Hi John,
    You should be able to executeWithMap that query, too. Is that giving you
    problems?
    Note that there may be an easier solution. What do you do if there are more
    than 200 results? If, e.g., you just get the first N, then one option is to
    set the FetchBatchSize on the query to N (thus activating large result set
    support), and then call size () on the resulting Collection. This will
    issue a SELECT COUNT(*) to the database to determine the size automatically.
    Thanks,
    Greg
    "John" <[email protected]> wrote in message
    news:ctq9a8$4gr$[email protected]..
    >
    Hi. I have a problem with a query...
    I hava created a query which a execute with a Map (I use the
    executeWithMap(Map) method). The problem is that sometimes this query
    returns a large resultset. So, I would like to execute an other query
    (called query_count) before executing ther final query with the Map. If
    the query_count returns a count < 200, I execute the final query. How can
    I do ? There is an example I have read this in the documentation :
    Query query = pm.newQuery (Magazine.class, "price < 5");
    query.setResult ("count(this)");
    Long count = (Long) query.execute ();
    The problem in this example is that the query is not execute with a Map.
    So my question is : "How can we do the evalute the count of a query we
    would like to execute with a map ?". Thank you for any response.

  • How can we update the last synchronization date and time..on SUP in sccm 2012 R2

    Hi,
        Can you any one please guide me how can i update the last  synchronization date & time in SUP on SCCM2012 r2 , some how its updated as future date and when ever i try to synch the SUP with disconnected WSUS its shows in the wsyncmgr.log 
    "Wakeup for a polling cycle " and  " Wakeupby inbox drop" and "Wakeup by SCF change"  
    Thanks 
    Balaji K

    You'll probably have to call CSS on this one as this not normal by any means. The messages you noted above are completely normal but if that's all you are seeing then there's an issue.
    Have you reviewed wcm.log and wsusctrl.log?
    Jason | http://blog.configmgrftw.com | @jasonsandys

  • How can I enlarge the calendar section for full-time events?

    Hi folks,
    since the update to ios 5 the calendar section at the top of the daily view (with full-time events) is limited in size. If I enter more than two messages I have to scroll to see all events. This is annoying since I typically miss the birthdays I cannot see.
    How can I change the behaviour to the "old" style: show me all full-time events and hide the bar that separates the full-tim events?
    Cheers
    Claus

    I understand that there are a couple of icloud sync apps available for the Galaxy, check its app store or google.

  • How can I download the software for a second time without a backup but with  the serial number?

    Hi guys,
    stupidly my hardware got broken and I've missed to do a backup for the programs. May it's a stupid question but how can I download the Lightroom software for a second time? I've got the serial number for this, but can't find a link without buying it again....
    Thanks a lot for your help!!!!
    Cheers,
    Hannah

    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh

  • How can I check the all schedule CM jobs' time?

    Dear all:
    How can I check the all schedule CM jobs' schedule time?
    my environment is : EBS 11.5.9 | DB:ORACLE 9.2.0.8 | PLATFORM: LINUX redhat 4.0*
    Regards
    Terry
    Edited by: Terry Chen on 2010/4/14 下午 7:12

    Terry,
    Please see (Note: 170107.1 - How to Determine Scheduled Concurrent Requests).
    Regards,
    Hussein

  • How can I use the free space of my Time Capsule as wireless HD ?

    Hi,
    Just set up a 2T Time Capsule and use it as Time Machine for my IMac and my MacBook.
    How can I use the 1 Tb free space to ave data available from all my devices ?
    Tks

    thierry118 wrote:
    Just set up a 2T Time Capsule and use it as Time Machine for my IMac and my MacBook.
    How can I use the 1 Tb free space to ave data available from all my devices ?
    Although it seems like you have a lot of extra space, Time Machine keeps versions, and if you want to take full advantage of the version history you should not worry about "extra space" because it will get used to provide safer coverage for the two Macs. If you had a Time Machine disk that fit your two Macs' hard drives perfectly, you would have no room for the version history, only room for the one most recent copy of each file. This can be a problem if you discover corruption that happened a while ago and cannot go back far enough in time to find an uncorrupted file.
    Therefore it's better to not try and use up the "extra space" and let it be used for a longer, safer version history for your backups.
    But like you, I want to use my Time Machine for additional network storage. So I plugged a cheap, compact hard drive into the Time Capsule USB port, and that shows up in File Sharing too. There is no need to buy anything fancier since it will be limited by both network speed and USB 2.0 anyway.

  • HT3775 how can i download the audio codec for quick time to hear the sound

    hi, everyone i just jumped to mac from  windows so i have couple of problems to sort out first and formost i like to ask that how and where can i download the audio codec for quick time player to hear the sound of the movie because whenever i download something as me for an audio codec after that if i wanted to uninstall anything where should i go to do that and finally just couple of days back i just bought new macbook pro so whenever i made i purchase to app store or itunes ask me for security questions as i am making first time purchase on this new make and the thing is i could remember my security answers so i cannot proceed so please help me out .

    There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html

  • How can i get the count vaule from GPIB?

    I want to get the count waule from GPIB ,but I find that the vaule I get from GPIB now is the trace vaule ,
    so I ask How can i get it.

    The count of what? What kind of instrument are you using?

  • How can i get the every rising edge's time value with usb 6212 counter continues acquisition

    i have a usb 6212,and now i can get every pluse 'period ,frequency。 
    i want to know how to get the every rising edge's time point value by DAQmx Counter.
    thx

    As you already know YouTube doesn't play in the background, that's why I wasted my time trying to give you an alternative.

  • How can I calculate the count of each row and they are grouped in each mth?

    hi, I need help on a database question. How can I count the number of record grouped by the last 12 months? I don't know any way to iterate the month one by one so that it return a table like this:
    table_item
    id item
    1 A
    2 B
    3 C
    4 D
    table_record
    item date
    A 2006-01-01
    A 2006-01-01
    A 2006-01-01
    B 2006-02-01
    A 2006-03-01
    C 2006-04-01
    A 2006-04-01
    D 2006-05-01
    A 2006-05-01
    A 2006-12-01
    and I need a query to output following table:
    item_count_in_2006
    item 06-01 06-02 06-03 06-04 06-05 06-06 06-07 06-08 06-09 06-10 06-11 06-12
    A 3 1 1
    B 1
    C 1
    D 1
    I tried so many way to do it.. I think SQL can't even product a table like that. Please give me some comments.
    Thanks!

    select c1,
           count(decode(to_char(c2,'YYYYMM'),'200601',1)) "200601",
           count(decode(to_char(c2,'YYYYMM'),'200602',1)) "200602",
           count(decode(to_char(c2,'YYYYMM'),'200603',1)) "200603",
           count(decode(to_char(c2,'YYYYMM'),'200604',1)) "200604",
           count(decode(to_char(c2,'YYYYMM'),'200605',1)) "200605",
           count(decode(to_char(c2,'YYYYMM'),'200606',1)) "200606",
           count(decode(to_char(c2,'YYYYMM'),'200607',1)) "200607",
           count(decode(to_char(c2,'YYYYMM'),'200608',1)) "200608",
           count(decode(to_char(c2,'YYYYMM'),'200608',1)) "200609",
           count(decode(to_char(c2,'YYYYMM'),'200610',1)) "200610",
           count(decode(to_char(c2,'YYYYMM'),'200611',1)) "200611",
           count(decode(to_char(c2,'YYYYMM'),'200612',1)) "200612"
    from   tbl
    group by c1
    C     200601     200602     200603     200604     200605     200606     200607     200608     200609     200610 
    D          0          0          0          0          1          0          0          0          0          0          0          0
    A          3          0          1          1          1          0          0          0          0          0          0          1
    B          0          1          0          0          0          0          0          0          0          0          0          0
    C          0          0          0          1          0          0          0          0          0          0          0          0Nicolas.

Maybe you are looking for

  • Cannot get all updates from iTunes software

    Hello. There is a strange problem. Sometimes, when I open iTunes from my computer, a small number will be displayed after "Apps". When I click the "Apps", I can also see that there are some updates available from the bottom link text. But after I cli

  • APP-FND-00500

    Hi All, Am getting this error in order management module.. lpr: error - unable to print file: client-error-not-found APP-FND-00500: AFPPRN received a return code of failure from routine FDUPRN. Program exited with status 1 Cause: AFPPRN received a re

  • CS3 Download Links Dead

    Hi, I need to re-install CS3 on my Mac, and I have the discs and the serial, but I'm on a new Mac without a CD drive, so I need to download the software, but the download link at the link below are dead. PLEASE ASSIST!! http://helpx.adobe.com/creativ

  • Using a gray card

    If you use a gray card in your image to determine your white balance, how do you apply the correct white balance/color balance to other images that don't have the gray card in the shot? thanks. russ altadena, ca

  • My phone keep locking and unlocking several times

    Device info Your carrier: T-Mobile Model info and OS version: Curve 8900 and Blackberry OS v4.6.1.231 Apps and free space Did a battery pull fix your issue? Temporarily Apps installed and their version if possible: No apps because I do not have inter