64 bit counter

Hi,
we are using PCI 6251 card to acquire some analog signals using a digital trigger.
We are using an external 10MHz GPS clock as the reference clock.
We want to measure the absolute time for each sample based on the GPS signal.
We are thinking of using the 32 bit counter to count the edges of the 10MHz clock, but the counter wraps around in less than 0.5 secs.
Is it possible to use the second counter as an extension to the first and get a 64 bit counter.
Thanks
-Charles

Hi again Charles,
It is not possible to convert the code from LabVIEW to CVI, however I have rewritten the example for you.  It is pretty simple, but it should give you an idea of how to accomplish what you are trying to do.  I put controls on the UIR so that you can change the device number, however you must still use counter 0 for the primary counter and counter 1 as the rollover counter.  Give this a  try and let me know how it works for you.
Neal M.
NIC AE
www.ni.com/support
Neal M.Applications Engineering       National Instruments        www.ni.com/support
Attachments:
CombineCounters.zip ‏7 KB

Similar Messages

  • Changing bit count on lion

    Hi I recently got Mac Lion and photoshop CS5.5. I need to know how to change the bit count of my photoshop from 64 to 32 so I can use the 'import video frames to layers' tool. I know on snowleopard you just had to go into 'get info' but it there isn't the bit option on this version.
    Basically any idea how to change the bit count of my photoshop?
    Thanks in advance xx

    ok: Ive just checked on a mates computer with lion *and the lastest version of PS is CS5.1 or (12.1).
    if you right click on the application icon in finder>get info it is still there ie. open in 32bit mode.
    G

  • Creating a digital counter in labview

    Currently using a proximity switch connected to an SCC-DIO1 to read pulses from an encoder to develop an RPM measurement ( and angular velocity).  How do I convert my digital pulse into a true numeric count per minute (or millisecond)?  I'm able to detect the pulse from the module in labVIEW but I'm unclear on how to count the pulses per minute.      Currently using labVIEW 7.1.

    If all you're doing is counting pulses, you'd actually be better off
    using the counters on your DAQ card. They automatically track the
    number of pulses and can give other info like frequency. Look in the
    Examples for Counter VIs to show you how to use them. There's a pretty
    good one named "Getting Started Counter.vi".
    If you're set on just using a digital line, the attached image shows
    how to setup a basic 32 bit counter. (but I still suggest you have a
    look at using the Counters)
    Ed
    Message Edited by Ed Dickens on 07-14-2005 03:38 PM
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    32 bit Counter.gif ‏5 KB

  • Invalid values for negative counts using DAQmxReadCounterF64 for edge counting

    I am seeing this issue with using DAQmxReadCounterF64 with
    simple edge counting. If the counter reads a negative count value, it
    returns a number that looks like an unsigned 32-bit number rolled over
    (~4294967295).
    I am using DAQmx v8.9.5. PXI-6602 with Windows XP, programming in C++.
    Is this a bug in the driver?

    Hi Mroche,
    You're correct that the number you are seeing is the rollover of an unsigned 32-bit integer.  Newer DAQ products use a 32-bit count register (e.g. M Series, TIO, X Series).  In this register, the value -1 is represented the same as 232-1. 
    I wouldn't call this a bug exactly.  The value you are reading is what is in the count register, and I don't think it makes sense to necessarily assume that 4294967295 should be scaled to -1 for all cases.  Making this assumption would result in undesired behavior for anybody trying to count to 231 or higher (at which point the count would roll over to -231).
    Having said that... position measurements are treated differently starting in DAQmx 9.0 due to the behavior reported on another thread which was in fact deemed a bug (which I notice you have seen already).  The driver casts the raw count to I32 before scaling it to a position.
    Now, I'm not so sure it makes sense to treat the two measurement types differently, but I think the reasoning behind the decision was that negative values make sense when talking about position, but for counting edges not quite as much (what exactly is a negative number of edges?).  In the count edges case, I think it makes the most sense for DAQmx to allow the user to handle rollovers himself.  At the end of the day, all the driver can do is change where the rollover occurs (either at 0 = 232 or 231 = -231).
    In your case, if you want to read (-) values on your count edges task, the easiest way to accomplish this is to read the data back as U32 (DAQmxReadCounterU32) then type cast it to I32.  This will give the result that I think you are looking for.
    If you have any suggestions to help improve usability, please feel free to post to the DAQ Idea Exchange.  Some preliminary ideas to make this experience a little more intuitive might include a property node to set how the data is cast, or perhaps have the driver cast the data to I32 if the Count Direction is set to anything other than Count Up.  Although, the 2nd idea has the potential to break existing applications so it might not be as viable of an option.
    Best Regards,
    John Passiak

  • Setting the counter output mastertimebase divider?

    Hello
    I want to output single short pulses with varying pauses. My MuFu DAQ card has 20 MHz master clock rate and 24 bit counter (Good ol'6052E). When I try to output 1 µs with a pause duration of more than 839 ms, I get an error due to mismatch of clockrate and counter bit size with short and long duration. This is explained in great detail in the corresponding help:
    2/ counter clock rate <= X <= 2^24 / counter clock rate. with counter clock rate = master clock rate / divider
    0.1 µs               <= X     <=   16777215 / 20Mhz = 839 ms
    I could strech my limits by manually setting the CO.CounterTimebaseMasterTimebaseDivider to 10. But I've searched all property nodes I could find but I have not found this property.
    Does anyone know where it is hidden, and to which values it can be set?
    Thank you
    Michael

    Hi Michael,
    Unfortunately that property doesn't exist.  There are a few "Divisor" properties available for other subsystems (e.g. see Analog Input timing block diagram below).
    However, you'll notice in the above diagram that the valid divisors of the master timebase are only 1 or 200 (which then gives the AI Sample Clock Timebase).  You can get similar behavior on the counter by specifying to use the 20 MHz timebase or 100 kHz timebase for your source.  However, using the 100 kHz (1/10 us) timebase is going to prevent you from properly generating the narrow 1 us pulses that you require.
    So, you can use 20 MHz or 100 kHz without any additional resources, but 100 kHz wouldn't allow you to have a 1 us pulse, and 20 MHz won't let you have a high or low time of greater than ~839 ms.  You could generate frequencies in between these to use as the counter timebase (either use the frequency output or use the second counter to generate the desired frequency, or perhaps configure a dummy analog task) but of course there would always be a tradeoff between the resolution of the pulse and the maximum time between pulses.
    If you do have the 2nd counter available, here is my suggestion to get the best of both worlds:
    1.  Configure a counter output to generate a pulse every N seconds (I suggest configuring the output to generate at 1/N frequency at 50% duty cycle).  When you configure this counter, DAQmx will choose an appropriate timebase for you.  When N is less than ~1.67 seconds, DAQmx will use the 20 MHz timebase (since both the high and low time would be under the 839 ms).  When N is > 1.67 seconds but below ~335 seconds, DAQmx will use the 100 kHz timebase.  If you intend on modifying the rate of the output (to something above 1.67 seconds) after the task has started you would need to make sure to specify to use the 100 kHz timebase rather than relying on the DAQmx default.  You can't use a built-in timebase if you want to generate a delay greater than 335 seconds, but if you wanted to you could handle this case by checking for it and configuring the frequency output to generate an even lower timebase.
    2.  To generate the actual output signal, configure a retriggerable single pulse generation to be triggered off of the signal generated above.  This signal will be based off of the 20 MHz timebase (assuming you configure a pulse width less than ~839 ms) and so will give you a good resolution on the available pulse widths that you can generate.
    In summary, doing this would let you decouple the resolution of your generated pulse width from the resolution of the delay between the pulses.  The downside is that it uses two counters.
    The other option which I previously mentioned (and what you were asking about) would be to find a timebase that meets the two requirements: 1) fast enough to generate a narrow pulse and 2) slow enough to not roll-over between pulses.  You have 100 kHz and 20 MHz available to you, but you can generate intermediate frequencies using the frequency output.  If you plan on using a counter to generate the timebase instead, you should consider the other option which decouples the two counters.
    Of course, using a device with a higher counter resolution (most newer DAQ devices use 32-bit counters) would probably also resolve your issue depending on the full range of  delays that you need.  The downside here is the cost of new hardware.
    Best Regards,
    John Passiak

  • Counting (interneal timebase)events with only one counter

    Hello,
    i am using a PXI-6115 card. This card is external clocked with 8 MHz. But I want to measure only about every second. So I divided the external clock with the internal counter 0. This works fine.
    Now my problem. Now I want to know the external clock rate. Is it possible to build a pulse period measurement with only one counter??
    I thinking of counting internal timebase- pulses with counter 1 and to start and stop the counter 1 by the output of counter 0.
    Is this possible and how??
    Thanks for help, Ruediger

    Yes, there's a way to measure pulse periods with a single counter. The trick is to perform a buffered period measurement and sum the periods. The size of the buffer will determine the quantization/roundoff error.
    The source of this error is that you have no control over the initial phase relationship of your external clock and your internal timebase. There's a nominal ratio between the two frequencies, and you'd start by expecting ratio * (buffer size) total cycles counted.
    However, your actual count must be an integer, so you'll get either the next-highest or next-lowest integer, but you can't predict or control which one.
    Example: If you collect 1 period at 8 MHz using the internal 20 MHz timebase, you'll capture either 2 or 3 e
    dges from your timebase, implying a measured frequency of either 10 MHz or 6.6667 MHz.
    If you collect 1001 periods, you'll capture a total of 2502 or 2503 timebase edges, implying a measured frequency of either 8.0016 MHz or 7.9984 MHz.
    Notes:
    1. In many cases, you can set up for buffered event counting, using the internal 20 MHz clock as a source and your external 8 MHz as a gate.
    The advantage is that the buffered values already represent cumulative time so you don't need to sum them.
    A disadvantage would be that the internal 24-bit counter value will roll-over in less than 1 second at 20 MHz. I typically capture periods and then sum in software because I can convert to floating point between capture and sum if necessary to produce both high-resolution and long duration measurements.
    2. You should typically ignore the very first value in the buffer and work only with the others. If you want to capture 1001 legitimate periods, size the buffer for at least 1002
    -Kevin P.

  • 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

  • 32-Bit Items for FP-QUAD-51​0

    Hello,
    I have recently read an article that states that with FP 4.1 you can "configure your 32-Bit counter on the FP-QUAD-510 in MAX without combining two 16-bit counters". The FP Read will then report the 32-Bit value. Has anyone done this? I have only seen a LV7.0 example which outputs an array of 2 16-bit values and then combines to form a 32-bit array.
    Any help is appreciated. Thanks!
    Windows XP
    LV7.1
    FP4.1

    Hello Ames,
    The article was an email passed on from Adrian Raiola (NI Australia). Here is a transcript of the email.
    "The KB article is internal only so not sure why it's mentioned in the Readme files.
    Here is the full text.
    Title:
    32-Bit Counters for the [c]FP-QUAD-510
    Problem:
    In older versions of the FieldPoint software, users who wanted to create 32-bit counters had to combine two 16-bit counters, and could use the counters only on serial systems and in embedded applications.
    Solution :
    With FieldPoint 4.1, you can configure 32-bit counters on the [c]FP-QUAD-510 in MAX without combining two 16-bit counters. The new 32-bit counters can operate synchronously with VIs running either on a host machine or embedded on a con
    troller.
    Older versions of FieldPoint software required you to create two 16-bit quadrature position channels in MAX and then combine the two 16-bit channels into one 32-bit channel in LabVIEW.
    With FP 4.1, the software creates 32-bit channels and reports 32-bit data to applications.
    For more information about configuring channels, refer to the Item Configuration>>Add a channel or channels to an item topic in the Measurement & Automation Explorer Help for FieldPoint.
    If your application requires you to use the older method of separate 16-bit channels, you can follow the instructions in the articles refernced below in Related Links. "
    Did I interpret the email correctly?

  • Css 11500 64-bit counters?

    Are there any plans to have 64-bit counters for the CSS's? We currently use a program (cacti) to poll the snmp oid's of various counters on the css's- and the 32-bit counters reset just a little to fast on our high traffic rules at times- We've walked the css's looking for undocumented 64-bit counters but haven't turned anything up- also turning the polling interval up on the cacti product isn't an option with our current setup. were just curious to see if there are any plans, or hidden mib/oid's for 64-bit counters. Thanks!

    We are polling the counters for our content rules- specifically apCntByteCount .1.3.6.1.4.1.2467.1.16.4.1.25....
    Char count is the number of chacaters in the name of the rule/owner (exampleOwner (12 chars long) = 12.101.120.97.109.112.108.101.79.119.110.101.114 in ascii)
    I've not found an equvilent 64-bit counter for apCntByteCount. If anyone knows it's oid string (the begining anyway) I'd be very happy to find it!

  • 6120 counter max frequency

    I am trying to set the max frequency for PCI-6120 counter. By the card specification, the counter's max source frequency is 20MHz. However, on MAX software test panel, if the counter frequency is set greater than 5MHz, program pops up an error stating the max valid value is 5e6 MHz.. Attached is the error message. Did I do anything wrong? Or special card setting is needed. Please help. Thanks very much.
    Attachments:
    NI 6120 counter error message.jpg ‏36 KB

    Hi windwalker,
    The max source frequency is 20 MHz. The source is an input to the counter which is divided down to produce the output signal:
    The default behavior is that the counter will count to N, and then toggle its output.  N must be at least 2, so the maximum frequency you can generate with the default (toggle) mode is 5 MHz (2 ticks high, 2 ticks low of the 20 MHz maximum source).
    The other mode is "pulse" mode, where the counter will count to N and then a pulse its output.  You can end up getting a pulse every 2 ticks of the source, which could give you a 10 MHz clock.  You can't set this mode in the test panels, but here's an example in LabVIEW showing how to get a 10 MHz output (the "External Clock" can be the 20 MHz timebase).
    However, if you're just trying to generate a 10 MHz continuous output, then I suggest using the Frequency Output which is a 4-bit counter that can output a small set of frequencies including 10 MHz -- {10 MHz,100 kHz} / {1:16}.  It is programmed similar to the other counters.
    Best Regards,
    John Passiak

  • Minimum Frequency for counter Pulse Frequency Generation

    Hello,
    What is the Minimum Frequency that the Counter Output Pulse Frequency VI can generate?
    If I need to generate a REALLY low frequency pulse train can I do that?
    Thanks
    Dan

    Hi Dan,
    If you don't explicitly specify a timebase, DAQmx will choose a default depending on the initial parameters you set up for CO Pulse Frequency.  For example, the following code should work on any DAQ device with a 32-bit counter and a 100 kHz timebase available (from my first post, 11.64 uHz is the minimum frequency in this scenario).
    So... your 10-100 second periods should be more than achievable.  The inverse of 12uHz is about 23.15 hours.
    If you're on a 24-bit counter the maximum pulse width would only be ~167.77 seconds (2^24/100000), giving a frequency of about 2.98 mHz assuming 50% duty cycle.
    The only way you should be getting an error at the 10-100 second durations that you are describing is if you start the task off at a faster rate (so DAQmx will pick a faster timebase by default) then modify it to output a lower frequency.  Rollover times for the maximum default timebases are as follows:
        E Series:   ~0.839 seconds (24-bit counter, 20 MHz timebase)
        M Series:   ~53.69 seconds (32-bit counter, 80 MHz timebase)
        X Series:    ~42.95 seconds (32-bit counter, 100 MHz timebase)
    If you want to set a different signal source as a timebase, you can do it with a DAQmx Channel Property Node:
    I'm afraid I don't really understand what you are trying to do specifically.  How does this "infinite" pulse length fit within the context of your application?  Why not simply write the line high in software?  What hardware are you using?
    Best Regards,
    John Passiak

  • Upgrading form Windows 7 32 bit RTM to 64 bit

    I was wondering if anyone has any idea how to get a windows 7 64 bit installation download of DVD.  I did get the 32bit RTM, which was a mistake;  I should have gotten the 64Bit Vista downgrade, instead of the 32 Bit one.  Its probably too late too late to change my selection from lenovo.  However my understanding is that the lisence, RTM or not, is good for both the 32bit and 64bit versions.  With that being the case, I should only need the Installation disk or an equivalent download. 
    Any ideas?

    Ok thanks for the info,
    I'll try and contact microsoft again and try and find the right person to talk to; I'll let you know if I find anything useful.  Thanks for all your help.  One quick question for now though, what is "OEM VLK"?
    FYI for anyone who is trying to go from the 32bit rtm to the 64 bit counter part.  I have already tried calling Micro soft tech support once who sent me on the the Microsoft Store who said the only way for me to upgrade would be to buy the WIndows 7 professioanl upgrade from Windows 7 Home Premier edition, which is roughly $140 which frankly is asinine, especially when I'm trying to go from Windows 7 32 bit to Windows 7 Pro 64 bit.  Hopefully with enough calls to teck support I will get someone who has a clue and can get me to the right person to talk to. However, if this ends up being the only option, can you belive how bat it would have been if Microsoft did not have to compete with Linux, I mean this would be one more reason for the world to switch to linux.
    As a side note:   You know I whish Microsoft would have one place for these kind of things and alwasy remain consistant.  For example, if you go to The Microsoft windows 7 page and click on the link to see the differences between windows 7 pro and ultimate they list only two differences, bit locker and multiple lnguage capability, between the two which are more or less useless for me (http://www.microsoft.com/windows/windows-7/compare/default.aspx).   However, during my research regarding this problem I happen to come uppon a file called "Windows 7 Product Guide.pdf" (http://www.microsoft.com/downloads/details.aspx?FamilyID=B3C68EC2-E726-4830-AC89-31C71D6BE5F3&displa...) that lists even more differences, differences that seem to better justify the price difference between windows 7 professional and ultimate. 
    And then in other references I have seen something called windows 7 N and Windows 7 NK; What the heck is that?

  • Counting more than 65535 count with ICTR_CONTROL.VI

    I want to count pulse at a rate of 100 000 Hz, how can I do that with ICTR control? I use 8253 counter and the COUNT_EVENT.VI

    Hello:
    The 8253 counter chip is a 16-bit chip which means it reaches its terminal count (max count) at 2^16 - 1 = 65535. So, if you are counting pulses at a rate of 100 kHz then it will roll over in about 0.66 seconds - I understand your problem!
    We have several examples for cascading two of our 24-bit counters into a 48-bit counter. This would be the best solution for you - use two 16-bit counters as one 32-bit counter. The way this works is to output a pulse on the LSB counter when it reaches its terminal count and then that pulse (output pin) goes to the source of the MSB counter which continues to count. However, I do not believe the 8253 chip supports outputting a pulse on terminal count / rollover. This is what makes it tough for that board. I sug
    gest a TIO or STC based board.

  • Volume bit trouble, no startup

    My 1 year old 15" PowerBook with Tiger will sit at the gray Apple screen and load for a long period of time, with no progress. It has recently had problems such as slowing down, locking me out of my account, etc. I tried rebooting using my install CD and running Disk Utility. It mentions that my volume bit count does not match the specified number, and informs me that it cannot fix the problem.
    I tried reinstalling Tiger, but it mentions a bad disk and cancels the install. At first, I thought it was the CD, but I'm starting to think the hard drive failed. Can this be possible?

    I'd suggest running Apple Harware Test. Boot your machine with your software disc in the machine and hold down the option button immediately after hearing the startup chime.
    The machine will select all the available bootable volumes it can find. This will take a couple minutes of more. You should see the Apple Hardware Test come up as an option. Select that. Then I'd recommend running the extended test for thorough results. See what it says about your hard drive.
    If it doesn't find anything wrong, you may want to pick up a copy of a third-party utility like Diskwarrior. That's what I use and have found it able to fix things that Disc Utility cannot. A lot of people also like Tech Tool Pro.

  • Maximum Count Value

    I have a NI-6220 with a 32-bit counter.  For my application, I
    only want a counter to count from 0 to 999999 and then rollover. 
    Is there a way to set this either in MAX, or any DAQmx property nodes,
    or do I just have to make my own logic within Labview. 

    You can't make the hardware do exactly that, but there are some other options that may be acceptable:
    1.  You can use the "quotient & remainder" math function and only display the remainder when you divide the actual count by 1 million.  However, if the actual 32-bit count might also roll over, you'd get a discontinuity when it happens.
    2.  A hardware-based method may work depending on characteristics of the signal you're counting.  It's a little bit involved if you're new to counters.  A basic outline is that the counter is configured as a two pulse encoder.  You give it an initial count of 999999.  You enable z-index reload with a z-index reload value of 999999.  You configure a counter property that causes it to "pulse on terminal count."  You wire that output signal back in as the z-index pulse.  You wire your external signal as the B input so the counter will count down from 999999 to 0.  Finally, your software will return the value 999999-actual count in order to look like it counts up from 0 to 999999.
    -Kevin P.

Maybe you are looking for