Counter/timer rate

Hi,
I am using the counter/timer input on a 6040E card for event counting.
I am using CTR0 and have specified the 20MHz clock as my source and connected my event to the gate (PFI9). I am counting a finite number of pulses and I am configuring the buffer using the DAmx Timing vi (sample clock instance).
My question is regarding the 'rate' input. As the counter source is set to the 20MHz is this not the rate? Can anyone advise as to how I choose a sensible rate value and what effect it has.
I normally use the rate for analogue IO buffers in order to set the buffer rate - I just can't quite see it's use in this instance.
Thanks
David
www.controlsoftwaresolutions.com
Solved!
Go to Solution.

Usually you have 2 types of things you want to do with counters, Count edges or count a clock between edges.
For edge counting you are incrementing (or decrementing) the count for each specified edge on a pfi line (you can select this) you can read this value periodically to see the current count.  For counter measurment you are counting the number of clock cycles (this is where the source is probably the 20MHz onboard clock) between specified edges at the at gate.  This is useful for frewuency or pulse duration measurments.  each measurment is buffered and you can read the buffer periodically.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA

Similar Messages

  • Counter/Timer Waveform

    I would like to convert period measurements (RPM data) received from my counter/timer board into waveform data type so that I would be able to conduct frequency analysis on the data (e.g. FFT). Have tried with limited success interpolation & decimation techniques. Would be grateful for any suggestions.

    Malfesto,
    I had a look and can offer up a few comments:
    1. I don't understand your comment about "truncation error" in the slow speed pulses case. Perhaps your are remarking about the "glitches" in the slow data embedded in the block diagram array? More on this a bit later...
    2. At least at a quick glance, the interpolation seems a little funky. I didn't spend a ton of time wrapping my head around it so maybe it's actually ok, but I saw a finite difference that would act like a derivative of the period, and a scaling factor based on the average period -- things that make me go hmmmm.
    Also, if you zoom on the graphs for the Slow Data, you can kinda see that the "Post Processing Graph" looks like a derivative of the "Pre Processing Graph". I suspect you need to rework your interpolation method.
    3. When I did a similar project, I think I first converted all the periods to frequencies and also generated a "sample time" array that was the cumulative sum of the periods. (I toyed with tweaking the time array so that the timestamp would correspond to the midpoint of the interval that I had converted to a frequency. I don't recall now whether that tweak proved useful enough to bother with).
    Once I had laid out arrays for frequencies and (unequally-spaced) sample times for those frequencies, I could generate an equally-spaced time array at a desired "virtual sampling rate" and interpolate to create new "virtual frequency" values. Since I was merely post-processing data, I think I also used the native LabVIEW array functions 'Threshold 1D Array' and 'Interpolate 1D Array' in the interpolation process.
    Now, before going into an FFT you'll want to remove the huge DC offset. This may be as simple as subtracting the mean or median frequency from all entries if you are nominally at constant speed.
    4. Your raw dataset for Slow Data has suspiciously periodic glitches in the periods. There is a very strong and dominating pattern that repeats every 16 intervals. Your typical period is registering about 10 million timebase cycles. However, in every set of 16 periods, you get one period around 27 million and another around 35 million.
    I don't know how you gathered your "Slow Data" values, but there seems to be a systemic error in the measurement. That sort of one-sample discrepancy looks very suspicious. I'd urge you to determine the source of those glitches and try to eliminate them. They don't appear to be telling the truth about the motion you wish to characterize. The device you measure doesn't by chance start and stop or go back-and-forth during your measurement, does it?
    Hope this helps.
    -Kevin P.

  • How to Immediately Change Counter Output Rate?

    I have a piece of code that largely works like this example: http://zone.ni.com/devzone/cda/epd/p/id/5493
    In other words, I set up the Counter Output with some initial frequency and duty cycle, but then during the main loop of my program I continuously change the frequency to a new value based on other criteria.
    I'm using an M-series PXI card and LabVIEW RT.
    The problem I'm having is that the card waits for the next edge before changing the counter output rate. For instance, lets say it is going at a low frequency and I am upping to a high frequency. If the command arrives in the middle of the current pulse, it will wait to complete the low-rate pulse before starting the high frequency output. Is there a way to make it interrupt the current count and immediately start counting at the new rate?
    Thanks,
    Isaac

    Hi Isaac,
    I posted the code in LV 8.2 so you should be able to open it now (it sometimes takes several minutes to upload).
    There are a few limitations to using the digital lines instead of the counters:
    1.  The digital lines are updated off of a sample clock which will be much slower than a timebase.  For example, on the 6221 the maximum update rate is 1 MHz, while the counter output has a max timebase of 80 MHz. As a result, the number of frequencies you can generate are going to be more restricted (divide down from 1 MHz vs. 80 MHz).
    2.  On M series devices, the digital lines must be clocked from an external source.  This could be generated from a counter
    3.  You have to build the digital waveform, which is a bit tricky (I think the example code should help out with that but I haven't had time to thoroughly test it).
    4.  If you are generating digital lines at fast rates, you will need to write quite a few samples at a time to the output buffer to ensure the data does not underflow.  If the buffer includes multiple periods of the digital signal, you would have the case that using the counter output would still update more immediately.
    Again, to determine the best course of action it would be useful to know what frequencies you want to generate and which exact hardware you are using. I just mentioned the digital lines as an alternative to the counters, but it might not be ideal for your situation.
    -John
    John Passiak

  • Low profile counter/timer board

    Does NI (or anyone else) make a low-profile counter/timer board? Perhaps with specs similar to 6602? If not, are there some other options that I could look into (I think the sample rates may be too high to use USB)?
    Solved!
    Go to Solution.

    Hi greatgrandpadog,
    Unfortunately, NI does not have any counter/timer solutions that are low-profile on PCI.
    Our cDAQ-9171 single slot USB chassis has four 32-bit counter/timers that can use an onboard 80 MHz clock (detailed specifications).  For external signals, you would need to use one of our digital i/o module which have various specifications.  You can find a list of them here.  This will be the best way to go for a compact USB counter/timer.  If you have additional i/o, take a look at our CompactDAQ Advisor, where you can use a 4- or 8-slot chassis to expand your i/o in a single system.  For more sophisticated control, CompactRIO offers a similar platform but with FPGA and Real-Time for greater customization and reliability.  There is an online advisor for that as well, here.
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Low-Frequency measurements using counter/timer

    I am trying to measure speed, and am using the FP-502 counter timer module to count the pulses from my sensor. The field point example that uses a fixed width gate pulse will not work for my appliation because I need a gate pulse so big that it updates way to slow.
    Does anybody have any sugestions on how to measure a low frequency signal using a counter/timer?
    Thanks
    Dan

    Hello guys
    Thanks for all your sugestions I have the final results. I got it to work but I would like to add some comments for anybody who is trying to attempt this.
    Triggeing on the gate is a must for low frequency measurements. I used the divide by sugestion however using a factor of 3 only gets you about 60 Hz after that you can't sample fast enough. My application required me to measure from 0 to 150 Hz. I added a "gear shifter" routine where the terminal count was set to 3 on frequencies lower then 45 Hz and 15 for frequiencies greater than 45 Hz. Using a terminal count of 15 for all measurements made the udate rate on really low frequencies way to slow i.e. .5 seconds for 20Hz (check the math on this).
    I a
    lso needed to cascade the counters. At low frequencies the count went higher than 6550. Using the previos channel function of the fieldpoint module enable me to get 32 bit worth of terminal count data.
    Finally I needed to add a timeout condition for 0 Hz. If there are no pulses coming from the senser the program displays the last value read. That won't be 0. So I added a time out routine that if I didn't see a pule in a certian amout of time, output 0 and reset the gate count.
    Thank you for you help you relly saved me. I hope my comments made sense.
    Dan

  • 9402 - Internal counter/timer?

    Hello,
    Does the NI 9402 have an internal counter/timer?
    The product description page on the web states that it does, however the manual for it doesn't mention a counter/timer.
    Other web searches only reference a counter/timer when installed in a chassis.
    If not, can someone recommend a USB DAQ for monitoring the rate of 4 pulse streams (5V, up to 100kHz)?
    Thanks
    Erik
    Solved!
    Go to Solution.

    Hey Erik,
          The documentation is a little unclear- the important thing to note is that the 9402 cannot be used with a USB sleeve:  NI C Series Module Compatibility Chart. I would recommend visiting the DAQ homepage and searching by bus and counter number. It looks to me that you could possibly use the USB 6501 which has 24 DIO lines, 1 counter, and can read in at a rate of up to 5MHz (and it's an easy $99).  If you need a little more that's still close to your price range, you might want to consider upgrading to the swankier USB 6210.  Hope that helps!
    aNItaB
    Applications Engineer
    National Instruments
    Digital Multimeters

  • Can I use Intel 815EP AGP 4X Pentium and plug in 5 Nos NI 6002 PCI counter Timer cards, instead of going for expensive PXI based solution? Hope there will be no degradation in performance - when used for constructing an Energy Meter test Bench.

    I was recommended to buy NI 6002 with PXI series, 5 Nos cards($875x 5 nos), and additionally a PXI rack costing about $ 2195 + some min--- card to interface with the computer costing another $ 875. Compare this with $ 675 x 5 Nos for 5 Nos PCI based NI 6002 + some cablesa nd connectors for synchronisation.
    First option is extremely expensive. But NI marketin manager will be glad that he sold more harware. But I want the truth. Why can't Intel 815 Pentium board be used?

    I am addressing the question if using PCI-6602s instead of using PXI-6602s will affect the performance, and the answer is NO. 6602 counter/timer devices comes in two different form factors, PXI/Compac PCI and PCI. The accuracy and performance is the same for both the PXI and PCI 6602s. However, using PXI solution will allow users an easier time with synchronization since that is the provided in the backplane of the PXI chassis. Additionally, if you ever need a higher accuracy solution you can add the 6608 device which has 75 parts per billion ppb vs 50 ppm of the 6602 devices. With 6608 plugged in the second slot of the PXI chassis (the one next to the controller), the high accuracy timebase is automatically shared acrossed the backplane of the PXI chassis which mean
    s that other 6602 devices in the chassis will share the same accuracy of the 6608. If the difference in the accuracy is not a concern and you are currently not ready to invest in the PXI platform, then you can go with the PCI 6602 devices.
    Best Regards,
    June Zhu
    National Instruments
    Digital and Timing Product Support Engineer

  • How to use Counter/timer PWM Pulse as a trigger to aquire data??

    (1) I'm using the NI DAQpad 6015 multi-function card with the new DAQmx Driver. I'm using the counter/timer (counter 0, and counter 1) to generate 2 different PWM pulses to supply my sensor circuit. each pulse is a 1 second in duration. The pulse with 5m.sec duty cycle is the supply for my sensor. In addition to that, I'd like to use the 5 m.sec as a trigger to aquire the sensor reading. The DETECTIN POINT should be the middle of the HIGH State of the 5m.sec pulse (i.e just at the 2.5 m.sec point of the high state).  
    (2) another point is: how to display the counter/timer pwm output pulses on the front pannel?? 
    Attached is the VI i'm using (Complete PWM.vi)
    regards,
    Attachments:
    Complete PWM.vi ‏49 KB

    Hello alaali,
    It sounds like what you need is a trigger delay property node.  This property node specifies an amount of time to wait after the Start Trigger is received before acquiring or generating the first sample. This value is in the units you specify with Start.DelayUnits.  This way you can still acquire using the trigger, and you can specify the delay to be 2.5 ms so that the point that you actually acquire will be 2.5 ms after the trigger.
    Hope this helps.
    Regards,Message Edited by Raajit L on 04-23-2007 04:34 PM
    Raajit L
    National Instruments
    Attachments:
    DAQmx Trigger Delay.jpg ‏6 KB

  • Counter/Timer Pulse Train generation

    Hello,
    I am having some trouble understanding why a particular VI I have isnt working(upper part of image below), I was wondering if someone could give me an idea of the cause from the error message.  I have a counter/timer which I am using to generate a pulse train.  It works fine on 'Continuous samples'  but when I switch it to 'finite samples' I get a 'resource is reserved' error when it gets to the DAQmx 'Play' VI
    I made a separate VI (lower part of image) and it works just fine with finite samples.  So  I am basically wondering what is different about finite versus continous sampling which could cause a resource to be reserved or not. (the board is a PXI 6281 if that matters)
    Thanks,
    Adam
    Solved!
    Go to Solution.

    You're correct on what the problem is. 
    For what it's worth, the newer X Series boards (63xx) and 2nd Generation Compact DAQ Chassis don't require the use of two counters for finite pulse generation (although technically there is a paired internal counter to accomplish the finite pulse generation, it's not really evident to the user). These products also have 4 counters available instead of 2. 
    Best Regards,
    John Passiak

  • Mounting 3 pairs of omron sensor E3X-F21 at 25mm intervals to measure time taken by moving object breaking beams and connecting to 6601 counter/timer card

    System is Windows ME Labview 6.1 6601 Counter/timer card. 3 pairs of Omron Photoelectric sensors E3X-F21 are mounted on a flat surface and as the object passes the first pair of sensors it starts timer1 and timer2.
    As the object passes the second pair of sensors it stops timer1 and as the object passes the third pair of sensors it stops timer2
    We have a known distance between the sensors so we are able to calculate the objects speed and position.
    We need a wiring diagram to connect the sensors to the 6601 card.

    I think I can describe a method that'll probably be simpler than the previous answer because it won't require any external logic circuitry.
    1. Configure two counters for "Two-Edge Separation" measurement, let's say counters 0 and 1.
    2. Wire Sensor 1's signal to both AUX-0 and AUX-1.
    3. Wire Sensor 2's signal to GATE-0.
    4. Wire Sensor 3's signal to GATE-1.
    5. Wire each sensors' 'ground' to the appropriate ground pins on your terminal block.
    6. Software configure both counters to use "max internal timebase" for a source -- 20 MHz for the 6601.
    You can specify the polarity of the transition you care about for both the AUX and the GATE signal, but I'll explain in terms of rising edges for both.
    Counter 0 will count time from Sensor 1's rising e
    dge until Sensor 2's rising edge. Counter 1 will count time from Sensor 1's rising edge until Sensor 3's rising edge. The count values will be in units of "# of 20 MHz cycles elapsed."
    You can probably get a decent starting point on the software using one of the shipped examples.

  • How can I count time with labview7?

    Hi
    How can I count time with labview 7 and NI-DAQmx like I did with labview 6.1 and "count time-easy.vi" (count event or Time.vi).
    I have a 6025E and labview 7.0
    Thanks

    I am not sure what you want to do or why..
    ... but here goes (some suggestions)
    If you want to count the time between two events, you have a choice, you may use the Tick Count. Inisitalize it first by getting a timestamp and then do a difference within a loop. The difference will give you the time elapsed in ms.
    You can also use the Get Date/Time String or Get Date / Time in seconds and once again take a snapshot when a first even occurs and another snapshot at the next even (at a point where you want to measure elasped time). This method is particularly useful if you want to timestamp an event.
    If I didn't answer your question, can you elaborate what you mean by "How can I count time".
    Best of luck..
    JLV

  • How to count time precisely?

    I was trying to count time using a VI like the one attached.
    My trouble is that this is not couting correctly. There is a possible reason I observed. 
    Maybe the computer is not able to process the VI as fast as necessary. 
    I thought about this because, when in edition mode the time counting was very wrong, and, when I created an aplication and installed it, it was running ok, as it got "light". But today, when I tryed to use this aplication with an old computer it didn't work. The clock is delaying.
    Is it possible to count the time correctly? 
    I'm using a DAQ6009 to do my works, my VI is pretty big, and I need an iteration at each 1 ms (milisecond) as I'm using digital inputs to count 5 encoders events (I know that this is not the correct way to count encoders, but this is the only way I can do that, and it's working).
    Thank you all in advace! hope you can help me!
    hugs!
    Solved!
    Go to Solution.
    Attachments:
    teste.vi ‏6 KB

    OK.  Let me try to help you understand a few things.
    The Tick Count and Wait (and Wait Until Next ms Multiple) functions all use a 1 kHz clock that is derived from the processor clock. The accuracy of these clocks is not great, although probably comparable to your stopwatch accuracy.  Any timing generated by these functions will show some differences from the time of day clock as it is derived from a different oscillator.
    The front panel updates are timed both by LabVIEW and the OS. Most screens are updated 60-80 times per second, maximum. Depending on what else the OS is doing, a screen update could be delayed 10s of milliseconds or longer.  It is certain that not every value at the output of the Add function will be displayed.
    The Wait Until Next ms Multiple will wait more than 1 ms if the other code in the loop takes longer than 1 ms.  I am not sure, but I think the indicator is buffered so that any delays by the OS in updating the display should not slow the loop. I tried removing the indicator and it did not seem to make much difference.
    I modified your VI to provide several indications of performance. First, I added the three-frame sequence structure to allow timing of the loop. Second, I changed to a for loop which will run a preset number of iterations. Third, I connected the output of the Wait Until Next ms Multiple timer to an autoindexing tunnel so that a record of the time of each iteration appears in the Ticks array. I calculated the differences between successive times and displayed that on a graph so that you can see the performance.
    I did not mean to sound critical of your use of English.  You write in English much better than I could in your language!  The point I was trying to make is that general descriptions such as "is not counting correctly" without quantitative results or evidence to support the claim do not have enough information to help us help you.
    Lynn
    Attachments:
    teste.2.vi ‏13 KB

  • How to count time between two pulses

    Hello everyone,
    I want to count time between two boolean pulses?  Can anyone give me an advice? Thank you in advance!

    Hello Michael78,
    You've right. I have a DAQ board and i want to acquire torque and angle (from a torque transducer). I already done that, but sometimes it doesn't work properly. To acquire this, i count sign changing of the torque to acquire exactly one period (3 sign changing). Torque have a noise, and when passes through zero, count more than 3 sign changing at a time, and this stop my acquisition (figure 2). I want to set a time between 2 counting sign . I tried something with tick count...but i made something wrong . I hope you understand me....
    Attachments:
    Capture.PNG ‏51 KB
    Capture2.PNG ‏47 KB
    Capture3.PNG ‏123 KB

  • [HELP] Agilent 53220A Counter Timer Will Not Initialise Using NI VI's!

    I am running National Instruments 2012 Development Suite.
    I have hooked up an Agilent 53220A to a PXI chassis via USB and MAX can see it.
    If I use the D:\Program Files (x86)\National Instruments\LabVIEW 2012\instr.lib\Agilent 532XX Series\Public\Initialize.vi library to initialise it, it takes ages before finally timing out.  I opened all the VI and issued the commands manually using the Measurement and Automation Explorer as follows:
    *IDN?\n = Returned the details of the Counter Timer.
    *RST\n = Returned no errors.
    *ESE 60;\n = Returned no errors.
    *SRE 48;\n = Returned no errors.
    *CLS;\n = Returned no errors.
    : SYST:ERR?\n = The subsequent read then times out!   (delete space between ":" and "S")...
    If I repeat the above but skip the "*SRE 48;" command it then works.
    Any ideas why my Agilent 53220A Counter Timer does not like the "*SRE 48;" command?
    Thanks.
    Christopher Povey
    Senior Test Systems Engineer for BAE Systems.

    ChristopherPovey wrote:
    I am running National Instruments 2012 Development Suite.
    I have hooked up an Agilent 53220A to a PXI chassis via USB and MAX can see it.
    If I use the D:\Program Files (x86)\National Instruments\LabVIEW 2012\instr.lib\Agilent 532XX Series\Public\Initialize.vi library to initialise it, it takes ages before finally timing out.  I opened all the VI and issued the commands manually using the Measurement and Automation Explorer as follows:
    *IDN?\n = Returned the details of the Counter Timer.
    *RST\n = Returned no errors.
    *ESE 60;\n = Returned no errors.
    *SRE 48;\n = Returned no errors.
    *CLS;\n = Returned no errors.
    : SYST:ERR?\n = The subsequent read then times out!   (delete space between ":" and "S")...
    If I repeat the above but skip the "*SRE 48;" command it then works.
    Any ideas why my Agilent 53220A Counter Timer does not like the "*SRE 48;" command?
    Thanks.
    I have confirmed this morning that I have installed the drivers and library for LabVIEW 2012 version from the NI website.
    Any ideas anyone?
    Thanks.
    Christopher Povey
    Senior Test Systems Engineer for BAE Systems.

  • WANTED: NI PXI-6602 counter/timer

    I'm looking to buy a used NI PXI-6602 counter/timer board. Got one?

    "Zvezdana S." wrote in message
    news:[email protected]..
    > Hugh,
    > To possibly obtain an used board from National Instruments, you should
    > contact your regional Internal Sales Representative (ISR) for possible
    > used boards. If you are not sure who your ISR is, generate a service
    > request at:
    I never knew NI had an SRQ line we could pull.
    Craig Graham
    Physicist/Labview Programmer
    Lancaster University, UK

Maybe you are looking for

  • Windows Vista 64 Bit VPN Client

    I navigated the Cisco Website (http://www.cisco.com/cgi-bin/tablebuild.pl/windows) to find a 64 bit version of the Cisco VPN client and was unable to identify if there was one. What software can be used to connect on a Windows Vista client to obtain

  • HT1229 how to move photos to an external harddrive

    I want to backup my iphoto '09 library to a Iomega eGo Portable hard Drive, Mac Edition.  How do i do this without backing up my entire computer contents. BJB

  • 24'' iMac SuperDrive Problem

    I have a problem with my iMac's SuperDrive. I have a DVD recorder for my TV, and I recorded a movie to a DVD-R. When I insert the DVD into the iMac, the drive spins for a long time, then mounts an empty CDR onto the desktop. I have no idea what's goi

  • F.01 financial statements

    Hi friends 1) In f.01 when we go for a report the system asks reporting year period like 1 to 16 and comparison period like 1 to 16 in our system the comparison year and periods  like 2007 period1 to 16. I want to make the comparison period FIELDS  l

  • Tcode IDX2: Basic type 'MATMAS02' is unknown

    Hi! How to get the basis type such as MATMAS02, MATMAS05 as known basis type in tcode IDX2? When I try to load metadata in tcode IDX2 I get the following error: Basic type 'MATMAS02' is unknown Message no. EA224 Thank you very much! Holger