Period measurement timebase apparently lower

I'm performing buffered low frequency period measurement using 1 counter, with an NI 6624. I am using the maximum timebase, which is 20MHz. The gate signal has a frequency of about 25kHz.
The expected period "resolution" due to quantization should be 1/timebase, in this case 1/20MHz=5E-8s.
The problem is that I am getting an effective "resolution" of 5E-7s, or an apparent timebase of 2MHz. What could be wrong?
I've checked digital filtering (DAQmx Channel Properties) on the source and gate signals, and are both enabled with the timebase of 20MHz.
Any comments apreciated.

Hello Daniel,
I agree that you should have a period measurement resolution of 50ns. This means that if you have a perfect 25kHz input signal, you should count 800 pulses of the 20MHz timebase within the 40us window. If you count 799 or 801 pulses, you will get 1/(39.95us) = 25.031289kHz or 1/(40.05us) = 24.968789kHz.
However, the thing to keep in mind is that you must have very accurate 25kHz source in order to determine if this is the case. Using the calculations from above, you would need a signal source with an accuracy of at least +/-0.1249% at 25kHz.
You may want to verify that your signal is at least this accurate before determining if something is wrong with your board or configuration.
Regards,
Bill B
Applications Engineer
National Instrume
nts

Similar Messages

  • Triggered finite acquisition and period measurement

    Hello,
    My problem is this: I'm not sure on how Labview accesses devices and how setting up multiple tasks affects loop iteration speed.
    The vi I have attached uses a rotary encoder to generate a pulse triggering the acquisition. I have noticed that trying to also perform a period measurement on this pulse causes the iteration time to double. For that reason I have included the case structure so the program reads once every 50 iterations.
    I am using the PCI 6250 (dev2) and PCI 6220 (dev1) which are connected by an RTSI cable. The 6220 and 6250 are connected to CB-68LP and TBX-68T terminal blocks respectively. The latter of which causes some problems due to incompatibility.
    Any help on either te reasons for the slower iteration time and how to solve it would be most appreciated.
    Thank you
    Ingram
    Solved!
    Go to Solution.
    Attachments:
    new.vi ‏64 KB

    Hi Ingram,
    Thank you for your forum post and for including your VI. On reviewing your code I am aware of the following:
     Acquiring 3 Analogue Voltages using a PCI-6220 (Temperature and Torque readings)
     Acquiring 1 Analogue Voltage on the PCI-6250 which represents "Percentage Metallic Content", this task starts when a Trigger is recieved on PFI9
     Acquiring 1 Counter Input on the PCI-6220 which represents the RPM of a motor
    You are also logging test data to a ASCII text file, this data is only logged when the user presses the stop button on the Front Panel.
    As the Counter and Analogue input tasks are seperate from one another it would be worth placing them in their own loops, I think with a bit of rearranging we should also be able to avoid the scenario where you have a while loop embedded inside another while loop. The initialisation of the DAQ tasks should only really be performed once, outside any loops. Another issue dependant on how long the application is executed is the dynamic arrays that are being created, these could become really large slowing down the application the longer it is run for.
    An architecture I would recommend for your application is "Producer/Consumer" outlined in the community example available here.
    The producer loop will be acquiring data and runs really fast (High Priority), the consumer loop logs data to file (Low Priority), data is shared between the loops using a Queue structure, no other wires should be shared between the 2 loops as these might cause a data dependancy.
    Do you require all 3 input tasks to be perfectly syncronized with one another?
    Many Thanks
    Jamie S.
    Applications Engineer
    National Instruments

  • DAQmx period measurement- buffer is cut when frequency is too high

    Hello,
    I'm using the DAQmx period measurement in order to measure a low frequency pulses. Even though the average frequency is low I still sometime get two pulses that arrive within a short time . When that happens I get  an error message and the buffer is cut. I'm wondering if there is any way to ignore one of the pulses (in the case that the pulse arrives at a time that is too short for the program to read) and for the measurement to keep running until the buffer is full??
    Thank you ,
    Shafran

    Hi all, thanks for your help.
    I'll give more details:
    1. I'm using PCI-6602
    2. The error code number I'm getting is:  200141       Possible reason(s):
                                                                                         Data was overwritten before it could be read by the system.
    3. I'm measuring photon emission from biological samples where each photon is converted to a pulse of a 35.2 ns width. I can control the concentration of the sample and therefore the average frequency of the pulses. I have started with an average intensity of 100 kHz and I went down to 10kHz. My final goal is to run the period measurement program in loops where I decide the buffer size so each loop will take approximately 10 seconds. The problem is that even if one out of all the buffers is cut all my calculations after that are wrong. A filter sounds like the perfect solution for my problem (I need to find out more about that option).
    4. I have checked the limitations of the program and I know that it can't measure pulses that arrive at a higher frequency than a few MHz, therefore I assume that even at an average frequency of 10kHz I still get some pulses that arrive within a frequency of a few MHz.
    Thanks again for all your help. I hope I didn't bore you with to many details...
    Shafran    

  • Doing Data acq. and buffered period measurement using counters simultaneously, gives an buffer overflow error

    Iam doing Data acquisition using NI-PXI 4472 and buffered period Measurement using NI-PXI 6602 simultaneously,my program gives an buffer overflow error

    murali_vml,
    There are two common buffer overflow and overwrite errors.
    Overflow error -10845 occurs when the NI-DAQ driver cannot read data from the DAQ device's FIFO buffer fast enough to keep up with the acquired data as it flows to the buffer (i.e., the FIFO buffer overflows before all the original data can be read from it). This is usually due to limitations of your computer system, most commonly the result of slow processor speeds (< 200 MHz) in conjunction with PCMCIA DAQ boards, which have small FIFO buffers (e.g., the DAQCard-500). Sometimes using a DAQCard with a larger FIFO can solve the problem, but a better solution is to lower the acquisition rate or move to a faster system. Another cause of the -10845 error could be due to an interrupt-driven
    acquisition. For example, PCMCIA bus does not support Direct Memory Access (DMA). If the system is tied up processing another interrupt (like performing a screen refresh or responding to a mouse movement) when it is time to move data from the board, then that data may get overwritten.
    Overwrite error -10846 occurs when the data in the software buffer that you created for an analog input operation gets overwritten by new data before you can retrieve the existing data from the buffer. This problem can be solved by adjusting the parameters of your data acquisition, such as the lowering the scan rate, increasing the buffer size, and/or increasing the number of scans to read from the buffer on each buffer read. Additionally, performing less processing in the loop can help avoid the -10846 error.
    See the NI-DAQ Function Reference Manual for a listing of all NI-DAQ error codes.
    Have a great day.

  • PXI 6229 pulse period measurement

    Hi there,
    I try to make pulse period measurement using PXI 6229 counter, I have 0.5Vcc according to DMM and 1.05V peak2peak based on scope. Then, I connected 0.5Vcc (incoming pulses) into SCB68 pin 3 and GND pin 55. I used the DAQ assistant to perform measurement n the setting for Signal Input range is min= 1ms and max = 23ms, those values I got it from scope i.e pulse period. I set it to the Rising and Acquisition Mode to 1 sample(on demand). But, I can’t get the measured values and I have no ideal why?
    Please help
    Walter.

    Hi Walter,
    the counter input of the PXI-6229 accepts standard TTL digital signals. You can find its specifications on page 7 of this document.
    I will repeat the relevant parts here:
    Input high voltage: Min: 2.2 V; Max: 5.25 V
    Input low voltage: Min: 0 V; Max: 0.8 V
    If I'm correct, your signal does not meet these specifications, so in this case you will have to connect the signal to an analog input and measure the pulse width as if it was an analog signal.
    Please check this page for an example.
    Daniel

  • -10920 error when executing buffered period measurements on a PCI 6602 timer.

    I frequently encounter the -10920 NI-DAQ error when I run the C code for single buffered data period measurement .
    The error message is "One or more data points may have been lost during buffered period measurements due to speed limitations of the system". I am unable to resolve this error. I have a Win2K environment and am using VC++ to compile and execute the code. Please help.

    When doing buffered period measurements, the rate at which you can transfer data from the counter is system dependant. To try to get around this there are two things you can try. The first is to set the 'number of counts to read at a time' to a greater number. This way, the 6602 board will use less calls across the PCI bus. If possible, try to limit the number of pulses coming in on the gate that you are using to latch the counts, though in many applications this is not possible.
    Make sure that you minimize the PCI bus activity on your computer. This includes, video activity and any network activity along with anything else that is connected to the PCI bus.
    Brian

  • BPC 75NW YTD / Periodic Measure query

    The Application is currently set to YTD. The Inputs are therefore done on YTD level for Costs. Headcount is a statistical account with AST account type, so YTD/Periodic measures become irrelevent.
    Now, What I need is Periodic Costs  Divided by HC to get Cost/HC (Cost_HC_Centre) and this is the script that I am running:
    *SELECT (%BUS%, "[ID]", BUSAREA, "[CALCULATION]=Y")
    *FOR %YEAR%=2011,2012
    *FOR %MONTH%=JAN,FEB,MAR,APR,MAY,JUN,JUL
    *FOR %BA%=%BUS%
    *RUNALLOCATION
    *FACTOR=1/USING
    *DIM CATEGORY WHAT=ACTUAL; WHERE=<<<; USING=<<<
    *DIM TIME WHAT=%YEAR%.%MONTH%; WHERE=<<<; USING=<<<
    *DIM DATASRC WHAT=INPUT; WHERE=<<<; USING=<<<
    *DIM FLOW WHAT=F_999; WHERE=<<<; USING=<<<
    *DIM CURRENCY WHAT=INR; WHERE=<<<; USING=<<<
    *DIM COSTCENTER WHAT=[BUSAREA]="ADM_%BA%"; WHERE=<<<; USING=NO_COSTCENTER
    *DIM PROCESS WHAT=NO_IO; WHERE=<<<; USING=BAS(%BA%)
    *DIM ACCOUNT WHAT=BAS(Salary_and_Benefits); WHERE=Cost_HC_Centre; USING=HC
    *ENDALLOCATION
    *COMMIT
    *NEXT
    *NEXT
    *NEXT
    By doing so, it is calculating it as YTD Cost / HC where I need Periodic Cost / HC
    Please let me know how can I achieve the same.
    Thanks.

    Is measure formula for PERIODIC working as expected ?If not ,you might need to calculate periodic values and store in PERIODIC  measure . and then use periodic measure in the logic.

  • 2 channels on semi period measurements M series 6221

    Can I perform measurements of semi period on 2 seperate channels with my M series 6221?

    Hello rawpaw,
    The NI-6221 has two general-purpose counter/timers, which means that you should be able to perform a semi-period measurement with each one (for a total of two semi-period measurements).
    For more information on performing these measurements, please refer to the "Counters" chapter of the M Series User Manual. Hope this helps,
    Daniel S.
    National Instruments

  • Analog period Measurement

    Hello,
    I need to measure the frequency of the sinuoidal signal that is acquired using LabVIEW FPGA. I tried to use the block Analog Period Measurement.
    The value that i have used are: threshold level 0, hysteresis 0.5.
    However, no matter what the frequency, the period is always zero.
    I also tried different threshold and hysteresis values, but it was in vain.
    I would be grateful if you could be of any help.
    Regards, Keshav
    Solved!
    Go to Solution.

    Hi keshasvew,
    This function has a valid output signal that only becomes true once per period, so it's likely that you're actually getting a good result, but never seeing it. You will need to add a bit of code on the output that uses the output valid signal to latch the latest valid measurement result. You should also monitor the timeout output, as that will generally stay true if you're not getting any results at all.

  • Buffered semi period measurement: discard EVERY first value?

    Hello,
    I perform the buffered semi period measurement. The data aquisition last very long (maybe over one day...).
    I arm the counter and then I execute the "read buffer.vi" in an while loop to read the data continuously into a circular buffer.
    In the 6602-manual I read the first value ist always bogus.
    My question is:
    Will I have to discard always the first value when the while-loop restarts? Or will I have to discard only the first value after the first iteration of the while-loop.
    Regards Peter

    Peter,
    You will only need to discard the first value from the first iteration of the While Loop (Counter Read Buffer.vi). Unless you implement a start trigger, the counter could begin counting in the middle of a pulse. Since the counter does not stop and start counting during each iteration of the While Loop, only the very first value buffered is bogus (great choice of words).
    Good luck with your application.
    Spencer S.

  • NI PCI-6602: semi-period measurement stops unexpectedly or returns wrong values

    Hi,
    Using an NI PCI-6602 card we try to measure the semi-periods of a digital signal.
    In "continuous sampling mode", 10 samples are collected in the buffer and then are read
    out.
    Up to 6 counters on this card are sampling the same signal in our testing configuration.
    Here we found these issues:
    1. Failure
    In principle, the measurement runs correctly, but one or more counters sporadically may
    suffer a complete failure. I.e. these counters don't provide samples anymore.
    Only after stopping and restarting the assigned task, a failed counter works again.
    Apparently, a counter failure is most likely to happen when
        - the sampled signal "changes", i.e. when the pulse width of the signal changes,
        - or when the computer load is high, e.g. when opening a window of another application.
    Every counter occasionally failed, but the issue was found very often at counter 1 of
    the PCI-6602 card, if we used counters 0 through 5 in parallel.
    Using another PCI-6602 card, the failures happened preferably on counters labeled "near"
    number 5.
    2. Wrong values
    Occasionally the "interpretation" of the sampled values changes, i.e. the length of the
    "high level" period is returned, where the "low level" period length should be given, and
    vice versa.
    This is our task configuration:
    Configuration done with MAX:
    Signal input range:    2 usec - 2 sec
    Custom Scaling:        None
    Sample mode:        continuous
    Buffer size:        10 Samples
    In addition these calls are made:
    ret = DAQmxSetDigEdgeArmStartTrigSrc( task->mHandle, <use the same terminal as is used for
    the signal to be measured>);
    ret = DAQmxSetArmStartTrigType( task->mHandle, DAQmx_Val_DigEdge);
    ret = DAQmxSetDigEdgeArmStartTrigEdge( task->mHandle, DAQmx_Val_Rising);
    ret = DAQmxSetCISemiPeriodStartingEdge( task->mHandle, <the channel>, DAQmx_Val_Falling);
    Best regards
    Manfred

    Hi Manfred7,
    did you already test this behaviour with a simple example from us?
    Just go through the example database and try the examples there.
    These examples should work. 
    If it works, there is a problem with your programm.
    If it won't work, please tell me more about your software:
    - Version
    - DAQmx Version ,...
    best regards
    Dippi 

  • Period measurement Error 20308

    I'm trying to measure the period of a very slow frequency (0.083 Hz) coming into my DAQ(6009).
    However it comes with "Error -20309 occurred at  "NI_MAPro.lvlibulse Measurements 1 chan.vi:2" when called from "NI_MAPro.lvlibulse Measurements N chan.vi:1"  (waveform index 0 of 1)".
    The DAQ is capturing method is set to "on demand" however I have also tried various (frequency + buffer)  such as 10k by 2k.
    but it  still comes up with the error.
    I know why it comes up with this error but don't know how to fix it.
    I have attached the vi (the simulate signal is replicating my DAQ)
    Solved!
    Go to Solution.
    Attachments:
    untitled.PNG ‏17 KB
    Period.vi ‏35 KB

    The error is explaining that not the wave didn't cross the reference levels enough times to do the calculations. Check that your signal reaches both the high and the low levels and that you have enough data in your signal to do a couple of whole signal periods. (with a signal frequency of 0.8 it will take 12 seconds to do a whole cycle) In the simulated example, I got it to work just by increasing the number of samples to 100. 
    Ian S
    Applications Engineer CLD
    National Instruments UK&Ireland

  • Analog period measurament with ext. clock.

    Can I measure a period of an analog signal (6052E w/ SC2345 accesory) with an external timebase (6602 w/ BNC2121).  The devices are RITSI'ed together.  I am trying to do this in DAQ mx.

    The terminology between Traditional DAQ and DAQmx is quite a bit different as far as counters go.  In DAQmx, the gate and source pins on the counter are no longer featured in the API.  Instead, you either specify the source of the input signal, trigger, timebase, or clock that you want to use for your application, and the driver will automatically route the source to either the internal source or gate pin on the counter as appropriate.  To see how the source and gate pins are used for different applications, look at the NI-DAQmx Help->Key NI-DAQmx Concepts->Counters->Counter Parts chapter.  For example, if you want to use an external timebase for your counter, you will need to set the Counter Timebase Source attribute (Counter Input:General Properties:Counter Timebaseource) under the DAQmx Channel Property Node.

  • BPC 7.5 NW PERIODIC Measure returns error in new environment only

    Recently we created a new BPC environment/server. This new environment has had HANA installed and is going through testing. In our testing we have incurred the following issue, but we are not sure if it is HANA related or just a result of something in the new environment not being set up correctly.
    Our BPC LEGAL/Consolidations application is a YTD application. A basic EVDRE was created with Time in Column (expanded to month), and Entity, Account, Profit Center and Reporting Currency in the Row. The EVDRE is first expanded with the MEASURE set to YTD. The correct results are returned.  The MEASURE is then changed to PERIODIC and the EVDRE expanded. The result is an error - "Errors found retrieving data".
    This same EVDRE opened in any of our other environments does not result in an error and returns the correct periodic results.  I have verified that the time dimension is exactly the same in the working and non-working environment. I also had the BW team verify with UJA_FORMULA_APP that the contents of the table for LEGAL/Periodic.  I had them pull out the Formulas from a working and non-working environments. It appears they are the same.
      QG1:
    MEMBER [MEASURES].[PERIODIC] AS 'IIF([%C_ACCT_FA%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="INC",-[MEASURES].[/CPMB/SDATA],IIF([%C_ACCT_FA%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="EXP",[MEASURES].[/CPMB/SDATA],IIF([%C_ACCT_FA%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="AST",([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02])),IIF([%C_ACCT_FA%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="LEQ",-([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02])),-[MEASURES].[/CPMB/SDATA]))))';SOLVE_ORDER=3
      QG0:
    MEMBER [MEASURES].[PERIODIC] AS 'IIF([%C_ACCT_FA%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="INC",-[MEASURES].[/CPMB/SDATA],IIF([%C_ACCT_FA%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="EXP",[MEASURES].[/CPMB/SDATA],IIF([%C_ACCT_FA%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="AST",([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02])),IIF([%C_ACCT_FA%].CURRENTMEMBER.PROPERTIES("2/CPMB/ACCTYPE")="LEQ",-([MEASURES].[/CPMB/SDATA], CLOSINGPERIOD([%TIME%].[LEVEL02])),-[MEASURES].[/CPMB/SDATA]))))';SOLVE_ORDER=3
    Does anyone know where else we should look? Any help would be greatly appreciated.
    Thanks in advance!
    Deana

    Hi,
    If when you launch BPC Server Manager, you do not get "Cannot connect to ABAP server", this means user BPC_SYSADMIN is connecting correctly. And assuming you had invalid RFC user in BPC Web, your issue is then only with user BPC_USER (or BPC_ADMIN if the issue is with BPC Admin client only)
    If you do get that error, it means the error is for more than one user, so I would look for something big missing.
    In point 1 you mention domain users, make sure in BPC Server Manager under "reset login credentials" that you do not have windows users specified there as it's a common mistake, those should be your 3 BW communication users
    On BPC .Net server, if you installed SAP GUI, run an MDX_PARSER test in SM59 to check librfc32.dll is working correctly
    Also quite common issue it is possible your background users have wrong authorizations; in PFCG check the roles SAP_BPC_SYSADMIN SAP_BPC_ADMIN and SAP_BPC_USER were copied to customer namespace and that the role are active (user tab should be displaying green light) and assigned to the background communication users
    Also check the background users are not locked in SU01 (if they are locked the password saved on .Net server was or is not matching the real password defined on NW server)
    Thanks,
    Julien

  • Pulse/Period measurement to control VI

    Hi
    I am enquiring regarding controlling a vi iterations with an external trigger. Let me summarise my VI first.
    I have a for loop using single point aquisition i need to run for a specific number of iterations depending on the time base between my external trigger (this is approx. 1-3 seconds). This is located in a while loop containing a number of other data manipulation including limit testing etc. The reason i am using single point rather than buffered is that i need to display the data in RT and (from my knowledge) i can't get the buffered aquisition to do this, or even waveform AI to do it either.
    I have used the measure period VI in labview to obtain a time in either s or ms within the while l
    oop and passed this to my for loop to iterate x times.
    The problem is (which actually makes sense!) when the while loop runs it must recieve two pulses from the external trigger before it can pass a number to the for loop. The result of this is that i lose sequences (a sequence is the data occuring between the pulses).
    The VI does exactly what i want BUT the timing is all wrong.
    What i need the VI to do is capture the time between ALL the pulse sequences, so that when the VI reiterates, the number of times the for loop must iterate is already in place. I have tried buffered pulse measurement but can't seem to get it to work as i think it should.
    Any ideas? It is kinda difficult to explain this exactly in writing but any solutions appreciated.
    R

    Ross,
    There are definitely different ways of doing this. The way you have done this in your VI will work; however, there are drawbacks. First, each time you call the AI single point VI, it performs a configuration, which takes time, so you're doing this 4 times every loop. This slows down your readings.
    A better way is to scan all four channels at once, and then read them all at once, saving the time to configure every loop. Even better than that is to run a buffered acquisition, and read the most current data out of the buffer.
    Therefore, I would propose taking a look at an example in the LabVIEW directories for a Continuous Scan example. It will show you what VIs you need to set up the acquisition. Then, there will be a while loop w
    hich reads the data. What you'll need to do is look at the inputs of the AI Read VI. There's an input to tell it where to get the data. If you set it to "Relative to the end of the buffer", and tell it to get 1 point, you'll get the most up-to-date point for all 4 channels. Then you can combine the channels to get your plot, just as you are now, and you can look to see if your trigger happens.
    Second, when the trigger does occur, you can do an AI Read outside of that loop and read the ENTIRE buffer, to get ALL of the points. These will be at whatever scan rate you set up, but they will be nice and evenly spaced, not determined by the loop time. So, in this manner, you can still get real-time updates of what's happening, but your scan rate can be higher than the loop time, and you'll still get all the data. Got it?
    If you need an example to demonstrate how to do this, I'd be glad to show you.
    Mark

Maybe you are looking for

  • Is there a way to save a form, once filled out, as a different file type in Reader?

    I have Acrobat, my coworkers only have Reader. Company won't purchase Acrobat for the other employees. I built a form for my coworkers to fill out. We need them to be able to send the filled out form to clients, but we don't want the clients to be ab

  • PO-GR-IR Link

    Hi All, I have a requirement where in i have to develop a report, for which PO-GR-IR needs to be displayed. We get the hostory of PO from EKBE, and we get GR from MSEG and IR from RSEG. But the problem is if a PO has 4 GRs and 3 IRs then how to know

  • How much memory can my macbook pro handle?

    I have a mid 2012 macbook pro 15" i7 quad core 2.3 ghz with factory 4gb of memory. Just curious how much more memory I can install in my mac? Apple says 8 GB but others say 16 GB. Any thoughts?

  • Create users in MDM console

    HI, I want to create some hundreds of users in console.Hence i dont want to create it manually. Is there any procedure to load the users into console list. Thanks Sree

  • Internationalization when viewing reports

    I am trying to internationalize reports (at least the numbers and dates that are retrieved). (using getHTMLContent of RAS SDK - BOE XI 3.0). a) I tried setting userLocale into reportClientDocument reportAppFactory.openDocument(infoObject.getID(),