Implicit counter operation

Hello,
     I have a question on how the implicit timing on a frequency input works.  I am inputting a straight frequency into a counter input on a cDaq unit.  I set it up using the 20Mhz Timebase. and counter 0, However If for example I input a 10Khz frequency and read data from the read counter vi every 10ms I would expect to see 10,000 * .010 samples or ~100 samples per read right?  I am only seeing about 10 samples per read though.  Am I not figuring something right?  I am setting up the sample clock as implicit using parameters (continuous, 200000 buffer size).

You should read the section in the 917x User Manual entitled Choosing a Method for Measuring Frequency.  In summary:
The one counter method loses accuracy as frequency increases.
The two counter (large range) method is the same as the one counter method but it takes the measurement over N consecutive periods which allows you to increase accuracy at the expense of measurement time.  To get a reasonable accuracy at high frequencies however would require your low frequency measurements to take a very long time.
The two counter (high frequency) method loses accuracy as frequency decreases.
The sample clocked method has good accuracy at all frequency ranges and maintains consistent measurement time.
The sample clocked method should be the obvious choice for measuring a large range of input signals.  However, it comes with the caveat that your input signal must be faster than the sample clock or you will receive an error and have to restart the task (which might not even be an issue depending on synchronization requirements).  You'll probably end up using a second counter to generate the sample clock.
Best Regards,
John Passiak

Similar Messages

  • Parallel counter operation

    Hi,
    I am trying to use two counter from the same card in paralle. I have attahed the VI here. I used the example VI to generate finite pulses to prepare my VI. Iam using PXI-6722 hardware.
    Can this operation be done? How to avoid the conflict?
    Regards
    Gopal
    Attachments:
    Parallel Counter operation.vi ‏34 KB

    Hello Gopal,
    You are receiving this error because you need both counters on the device to perform a finite pulse train generation task. You can see this Knowledgebase for more information about the problem.
    Matt Anderson
    Hardware Services Marketing Manager
    National Instruments

  • Condition in count operation

    Hi ALL,
    I have a car table with the following attribute sale_code,model_car etc
    the format of sale_code is year/number exemple when a client buy a car(model_car=mercedes) her code is 2012/0125.
    I want to calculate the number of cars that were sold in the year of 2011 grouped by the model_car attribute.
    select count (sale_code),model_car
    from car
    where sale_code like '2011%'
    when I tested this querry i received an error.
    My question is :
    how to resolve the issue when we use an attribute in where and we use the same attribute in count operation ?
    Thank you in advance.

    No Error, right?
    with data(salecode, model_car) as
      select '2010-01', 'BMW Z8' from dual union all
      select '2011-01', 'BMW Z8' from dual union all
      select '2011-02', 'BMW Z8' from dual union all
      select '2011-03', 'Merc' from dual union all
      select '2011-03', 'Merc' from dual
    select count(salecode), model_car
      from data
    where salecode like '2011%'
    group by model_car;
    COUNT(SALECODE)        MODEL_CAR
    2                      Merc     
    2                      BMW Z8   
    2 rows selectedPlease follow the Sticky Thread by BluShadow on the Top of Threads list and provide the necessary information to get quick solution.
    Regards,
    P.

  • Implicit counter and sample clock together

    Hi,
    I am using Labview with a NI DAQPad-6015 to measure temperatures (4 thermocouple channels) and control via a duty cycle (at constant pulse frequency).
    The VI I built contains a sample clock for setting measurement rate and an implicit timer to drive the "pulse frequency counter output".
    In this way, the measurement rate is slowed by the implicit timer (I guess, as the measurement VI alone runs with the properly timing).
    How to overcome this matter?
    Thanks in advance
    Gianluca 

    here is the VI I built for acquisition and control.
    The bottom loop acquires and sends signals, while the top loop averages measurements and write all into a file.
    Freq_duty_cycle.vi allows me to change on the fly both frequency and duty cycle of pulse.
    HBridge.vi is the control for a H bridge I drive to invert current direction to a load. 
    Attachments:
    HBridge.vi ‏12 KB
    temp_acq_4channels_peltier_control_Hbridge.vi ‏71 KB
    Freq_duty_cycle.vi ‏14 KB

  • Counter operations in PXI 6722

    Hi,
    What I want to do :
    My application requires generating an analog output, after some time the DUT responds with a pulse of 1.5ms duration. I need to find the time between the point where I genrate the AO and the point where I get the pulse.
    What I am planning to do :
    I plan to start a counter at the moment I start the AO, the input pulse to counter would be a pulse train from an external clock or another counter output. I would like to stop the counter using the pulse from the DUT by connecting it to the GATE terminal. The idea is derived from the example vi, Count Digital Events-Pause Trig.vi. Based on the number of counts and the pulse train frequency, the time can be measured.
    Problems Faced and queries:
    1. I tried to test the idea by generating a continuous pulse train from counter_0 and feeding it to the source of counter_1 and use the above example to count the pulses. Here I can only pause the count using the gate input. How do I stop the counting and get the count value using the Pause trigger property?
    2. If I want to use the internal clock base instead of using another counter, how should I enable this?
    3. Is there any other option to measure the time I need?
    4. When Iam using the generate finite pulse train vi in counter_0 and connecting it to Counter_1 source. Using the count digital event, I try to count the events. Error is generated with a reason that there is a hardware conflict. Can I not use different counters in the same card for generating a finite pulse train and counting them on the other counter input?
    Regards
    Gopal

    Hi Gopal,
    Thank you for posting to the NI forums.  You can use a digital start trigger and a reference trigger to get the functionality that you need.  There is a nice Knowledge Base article on this exact issue.  The link is below.
    How Do I Use a Digital Trigger in LabVIEW to Start and Stop Acquiring Data?
    Using the information in this KB, as well as the info in the related links, you should be application to program your application in LabVIEW, but please post back if you have further questions.
    Ed W.
    Applications Engineer
    National Instruments

  • X Series is here – New Counter Features!

    Hey All,
    The new X Series Multifunction DAQ devices have been announced – check them out here.
    I’m posting here because I think X Series has several new counter features that many on this forum have been looking for. The user manual
    will have all of these details and more with timing diagrams but I
    thought I’d summarize a few of the sexier features and open it up for
    comments/feedback.
    First off – what stayed the same between
    M Series/TIO counters and X series counters? The pinouts between M and
    X series are the same so the PFI lines and default counter pinouts are
    the same. The DAQmx programming is the same (you’ll need DAQmx 9.0, it
    should be up this afternoon) and all the functionality that was
    supported by M Series is supported by X Series, though a few behaviors
    may have changed. Counters are still 32 bit.
    Now on to
    the fun stuff – the big one that I tend to overlook: X Series has 4
    counters per board! They all have the same features and Freq Out is
    still there too (with an additional 20MHz timebase).
    Timebases:
    X Series devices have 100MHz, 20MHz and 100kHz timebases. Note the
    difference between 80MHz on M series and 100MHz on X series. DAQmx will
    take care of the difference for you, unless you were programming in
    terms of ticks and hardcoded in numbers based off of a 80MHz clock. 
    Counter
    FIFOs: X Series has a 127 sample FIFO per counter. When combined with
    PCIe/PXIe, our benchmarked buffered counter rates went from ~350k on M series
    (with a 2 sample FIFO) with a single counter to 10MHz on all four
    counters (160MB/s streaming rate). The FIFO also allows us to implement…
    Buffered Counter Output: Probably my favorite new feature. You can
    now use a multi point write on counters and write out a buffer of pulse
    values. There are two timing modes for this: implicit and sample
    clocked. With implicit timing, every idle/active pair you write is
    generated as a pulse. You can vary the idle/active time for every pulse
    in your pulse train. Check out the "Gen Dig Pulse
    Train-Buff-Implicit-Cont.vi" shipping example. With sample clock
    timing, the idle/active time are updated every time a sample clock is
    received. Check out the "Gen Dig Pulse Train-Buff-Ext Clk-Cont.vi"
    shipping example. These modes give you much more control over your
    waveform – now everything about it can be hardware timed. Also, I’ve
    benchmarked the output rates at 10MHz on all four counters at the same
    time.
    Finite pulse train with one counter: Each X Series
    counter has an Embedded counter paired with it. The embedded counter
    isn’t directly programmable, but it does allow you to do counter
    operations on one counter that used to take two.  A finite pulse train
    used to take two counters – one to generate the pulse train and one to
    gate it. Now a counter generates the pulse train, and its embedded
    counter counts the TCs and disables the counter when it reaches the
    number of pulses to generate.
    More sample clocked
    measurement modes: Edge counting and encoder measurements always
    supported sample clocks, all other counter measurements were implicitly
    (timed by the measurement waveform) timed. With the addition of the
    sample clock terminal to the counters now all counter measurements
    (except for semi-period) support sample clock timing. You can now get
    the pulse width of the pulse just before the sample clock rather than
    getting all the pulse widths and figuring out where they happened in
    time. Why not semi period? We added a new “pulse” measurement instead
    that returns a sample that contains the high and low time (or high and
    low ticks, or frequency and duty cycle) so for each sample clock edge
    you get a full pulse spec. Semi period still supports the same
    measurements it used to, just not sample clocked. Speaking of sample
    clocked…
    Sample clocked frequency/period measurement
    with averaging: X Series still supports the three frequency modes: Low
    frequency 1 counter, 2 counter High Frequency and 2 counter Large
    Range. In addition it supports sample clocked averaging. This is
    essentially a method that is high accuracy method based on the sample
    clock rate. With the same measurement time it has the same accuracy as
    the Large range mode but it doesn’t take two counters.  Note, counters
    do not have their own internal sample clock so you have to provide them
    with an external signal.
    Hope this helps,
    Andrew S
    National Instruments
    Multifunction DAQ Product Support Engineer
    Getting Started with NI-DAQmx
    Measurement Fundamentals

    Hi guys,
    I drew up a schematic of one of the applications I need to get running in our lab. To recap:
    1)      We have several piezo controllers for nanopositioning of samples under a microscope, some of them driven by a digital circuit that handles coordinate programming and trigger line programming (for syncing detectors to the piezo motion), other controllers are analog and need to be driven by voltages.
    2)      We would like to emulate the behavior of the digital controller using the analog HW (we have much more analog controllers than digital ones).
    3)      The basic implementation is like this (see also slide one in the attached pdf file) and runs perfectly:
    a.       A global pulsetrain ticks with a certain frequency
    b.      At each tick a voltage is written on an AO line and this tick is also sent to an RTSI line to sync multiple detectors
    4)      To fully emulate the digital controller we also need to implement 4 trigger lines that exist on the digital controller. These trigger lines allow for fully programmable pulsetrain output that is in sync with the movement of the piezo. Slide two in the attached pdf illustrates what is needed. These trigger lines allow for much more intricate syncing of our detectors (only measure during certain parts of the motion instead of all the time).
    After a lot of thinking and experimenting with the existing M series boards back here I came to the conclusion that the desired behavior is not possible with an M series board since they only allow for the output of “simple” pulsetrains with a given frequency.
    Looking at this webpage (http://zone.ni.com/devzone/cda/tut/p/id/9384#toc3) however, I think that the X series board would offer exactly what we need since it allows for buffered counter output that enables definition of very complex pulstrain “shapes”.
    Looking at the schemes I provided, could someone confirm that the X-series covers our needs? If this is the case, we would be interested in purchasing these kinds of boards.
    Cheers,
    Kris Janssen
    Attachments:
    Raman Imaging Timing Implementation.pdf ‏76 KB

  • Is "starting" a counter the same as "arming" it?

    Hi everyone,
    I am trying to understand why I get unexpected behavior with my VI and counter output.
    I am outputting 3 single,triggered pulses: 2 on a 6602 (1 each on counters 0 and 1), and 1 on GPCTR0 on a 6071E.
    The second pulse on the 6602 (on counter 1) is supposed to immediately pulse after the first pulse (on counter 0) is finished pulsing.
    GPCTR0 is a pulse used to start my data acquisition, and occurs before the first pulse from the 6602.
    All three counters share a common hardware trigger, a repeating 120Hz pulse, synced to some of my other hardware. This train of triggers arrive only after I switch a DIO line (on yet another card, a 6503), and this DIO line is turned on the a sequence frame after the frame in which I set up and "start" my counters (with control.vi set to "start").
    Now here's the problem I encounter:
    *most* of the time (~4/5 times) I get the output I want from the 6602, 1 pulse right after the other. But every once in a while, I get the pulses ~8 ms apart--that is, counters 0 and 1 are triggering off different trigger pulses in the 120Hz I send to the gates. So one of my counters is somehow missing seeing the start trigger that another counter sees.
    How can this be? If all counters are already started, shouldn't the same start-trigger trigger all of the counting operations at once?!
    Also problematic, every once in a while, counter 0 is missing the first hardware trigger, but triggers on the second trigger of the 120 Hz trigger pulses. So it seems my problem is that the counters are sometimes just missing seeing the triggers.
    Any ideas? I posted my VI. The relevant portions are in big frame3, inner frames 3 and 5. (frame 3 configures and starts all counters. frame 5 turns on my hardware triggers).
    thanks in advance for any help!
    Attachments:
    Neurochip-legacy.vi ‏698 KB

    to answer my own question....
    i discovered something miswired in my hardware.
    so there seems to be no labview problem...

  • How to Use the Average, Count, or Sum to Validate a Collection

    hi guys ,
    can any one help me with the following problem .
    I want to use count function in business rules for the validation of entity objects .
    I am new to ADF BC .
    and i am not understanding what are the appropriate accessor and attribute for the validation for "COUNT" operation.
    regards
    Sourav.

    you have to use collection validator.. for that..
    click the entity.. go to business rules tab... select entity validator.. then you will find collection validator..

  • Generate a delayed counter pulse

    I am posting this to see if anyone can shed any light on various DAQmx operations with counters.  I appear to have found a solution for the project but various counter operations are certainly not well documented and the notes I am posting may help anyone trying to do something similar.
    The project is to monitor an analog input channel and when a certain criterion is met generate a pulse with a specified width at a specified delay from the event.  It is being done in a LV Real Time system.  Initially I tried to start a counter task within a loop, wait until done and stop the task.  What I have found is that it takes a long time (of the order of 10-100's of ms) for the start task to return and the wait until done doesn't reliably return at the time the counter pulse is finished being generated.  Other people seem to have found the same problem.  This is described in the part 1 attachment and the attached vi.
    The other way to do it is with a retriggerable counter task and using a digital line on the same card to trigger the counter.  Then the way the counter works if there is a single pulse or multiple pulses is different.  The way low time and high time are interpreted is odd.    This is described in the part 2 attachment with screenshots from Scope captures.  I have a proposed solution but I'm not sure if it is the best way to do it.
    Any suggestions appreciated.
    Attachments:
    Generate delayed Counter Pulse problem part 2.doc ‏108 KB
    Generate delayed Counter Pulse Problem part 1.doc ‏25 KB
    Generate Counter Pulse.vi ‏153 KB

    Andrew,
    If you want to start a counter output task based on an analog input you should use an analog trigger (if your device supports analog triggering). Take a look at the example Cont Acq Sample-Timed Loop-Analog Start.vi (in the example finder - search for "trigger") for how to set up an analog trigger in DAQmx. Also, you can use the Start.Delay property in the DAQmx Trigger property node to specify an amount of time to wait after the Start Trigger is received before generating the first sample
    Michael P
    National Instruments

  • Enable data paging with parameters count() on new php function issue (BUG?)

    I've got my app prototyped quickly with the default settings in Flex Builder 4.  Now I'm going back and adding/modifying features to polish the app off.
    For this application I'm using PHP5 as the server side.
    The data paging is really cool and simple to call using the default settings.  However, I'm running into issues with customizing the data paging feature.
    This is the default header of the php function that was created for me:
    public function getTblbrowserrecord_paged($startIndex, $numItems){...}
    Instead of dumping all data back to the function I want to be able to search on certain fields so I created a new function called:
    getTblbrowserrecord_search_paged ($szName, $szIP, $szRule, $szURL, $szDateLow, $szDateHigh, $szCode, $startIndex, $numItems  ) {...}
    The new function is tested and operates as designed.
    I set the input types of the variables and return type (Tblbrowserrecord[]) of the new function then went to enable data paging.  The first screen came up and asked me for the key to use which I selected.  The next screen came up and asked me for the number of records which I set to 100 then went to select the count operation.
    I initially selected the automatically created count() function but it came up with the error " Count operation parameters should match the paged operation parameters list."
    So I created another function to match the search function's parameter's list:
    public function count_searched($szName, $szIP, $szRule, $szURL, $szDateLow, $szDateHigh, $szCode, $startIndex, $numItems)  {...}
    But I still ge the error "Count operation parameters should match the paged operation parameters list."
    But they DO match.  I looked at the default functions that were created by FB4 and noticed that the automatically generated function count() has no parameters and the paged function has the two functions $startIndex and $numItems which are not identical yet they work.  I tried removing those two fields from the count function but got the same results.
    What am I doing wrong?
    Thanks!

    Nevermind... For some reason my FB4 is not updating correctly.  After removing the two control fields at the end of the list AND exiting the app/re-entering everything worked ok.  I've been having this issue a lot lately and am thinking that is is a bug of some sort?

  • TS3297 I have an iPhone 4S - software up to date, operating under IOS7 -- all is well except suddenly I am not able to connect to the iTunes store. Tap the icon and immediately it returns to the home screen

    I have an iPhone 4S - software up to date on all counts, operating under IOS7.  I cannot open iTunes store.  Tap on the icon and it immediately flashes
    back to its home screen.   I have  no problem on my iMac or my iPad 4 -- just the iPhone 4S.

    Sounds like the device was dropped at some point and damaged as a result.
    Take it to Apple for evaluation and a replacement.

  • Hashed table -- Operations on it.

    Hi,
    tell me any one way of inserting data in to hashed table,
    and operations possible on the hashed table.

    Hi Kranthi,
    You can only access a hashed table using the generic key operations or other generic operations (SORT, LOOP, and so on). Explicit or implicit index operations (such as LOOP ... FROM to INSERT itab within a LOOP) are not allowed."
    Hashed table is useful when your have to work with very big internal table and to read it with
    "READ TABLE WITH KEY ..."
    And,
    http://If its possible to declare a standard table with same type as hashed table.
    Move your data to a standard table with the same Type as your dynamic hashed table.
    tb_stand] = tb_hash[.
    And access the records of the standard table.
    kindly reward if found helpful.
    cheers,
    Hema.

  • Reg. operation & frequency in PM ...... Have ur points.

    Hi all,
    Which table link the operation and frequency related data in PM module.
    Note :- Here operation means .. which we write in IA05(TASK LIST).
              & Frequency means .. which we assign to that operation.
    Pleas assist me.
    <b>Have ur points.</b>
    Regards,
    pradeep phogat

    Hi yaar..thanx for reply....my requirement is not fullfilled.
    <u>pleas understand the req.</u>
    In transactin IA05, we make tasklist master.
    I want to link (task group->group counter->operation->frequency) in my itab. Pleas suggest me the table in which i can link the operation with frequency.
    Very urgent....thanks in advance
    yaar Here frequency means the frequncy of operation which we set after clicking on maintenance package.
    PLPO Is task-list operation/activity master, contains data regarding operations....there is no field by which i can link the operation with the frequency.
    We have some tables of maintence package master....that also don't have the linking field.
    following are the tables.
    T351P
    T351X
    T351
    T351T
    Pleas assist me....

  • Counter Error -10609 "transferI​nProgError​"

    I am trying to use a Quadrature Encoder VI (found on ni.com and included below) to simulate wheel speed sensors. However, when I integrate this VI into my program on a PXI-6713 card, I receive the -10609 transfer in progress error. The problem occurs when I move from Park (encoder paused) to any movement speed. I have also been able to generate the same error in the Encoder VI just by moving the knob fast. My guess is that it is trying to update the new frequencies too fast, but I don't know how to solve that. I have the settings for it at Rev/sec and set for 1 pulse/rev. In modifying the quadrature VI to my program, the loop wait time has been changed from 90 to 100 ms, but that shouldn't be a factor.
    Attachments:
    Quadrature_Encoder_Simulator.llb ‏483 KB

    Hello,
    This is strange. I tried to run the VI and could not face any problem. But of course I had an E series card available with me. If you have an E series card could you please try to see if you get the error? I will try to check out a 6713 and try to run there too.
    But my guess is, there might have been some other counter operation with the same counter going on when you ran this qudrature encoder VI. Just a thought. Double checking might be helpful.
    Sincerely,
    Sastry V.
    Applications Engineer
    National Instruments

  • Arming a counter polling a digital line

    For arming a counter, a start trigger on the STC counter can be roughly emulated by polling a digital line and arming the counter once a high digital pulse is sensed. How can i do that?
    I'm using a PCI-MIO-16E-4

    Daniel,
    You did not mention which programming environment you are using, so I will describe the structure in LabVIEW (no matter which language you are using, this should give you the general idea).
    1. Configure your DIO port with DIO Port Config.vi.
    2. Configure your counter operation (Counter Group Config.vi, etc.).
    3. In a while loop, call DIO Port Read.vi.
    4. Monitor the bit corresponding to your trigger line. When this bit goes high, stop the while loop.
    5. Immediately after the while loop, call Counter Control.vi to arm your counter.
    This should be the basic structure of your program. Good luck with your application.
    Spencer S.

Maybe you are looking for

  • Problem in Update statement using Execute Immediate

    Hi All, I am facing problem in update statement. I am creating dynamic sql and use "execute immediate" statement to execute a update statement. But it is not updating any thing there in the table. I have created a query like : update_query='Update '|

  • Tv losing channels when vision box turned on

    When vision box is turned on I lose channels - film4 and radio channels and screen pixelates on others. Not actually watching channels through box, just on tv. Screen says no signal. As soon as box turned off signal returns. When scanning for channel

  • WRT54G file sharing problem

    Ok I have a problem, I had a old router before and worked very fine. All my shared forlder on my other computer was in the list of my network. I didnt change anything on my computers, bought a linksys and all my shared folders disapeared... at the st

  • Show all rows in a dataTable - XSD datasource

    Hi I have designed a report in CR2008 and my datasource for the report is an XSD file. There are 2 tables Table A and B. Table A is as follows: AID     Name     Reference     Period          Manager 5       Name 1     Ref 1          July 2009     Use

  • Conver BLOB column value to XML

    Oracle 10G My table has BLOB column my requirement is BLOB values needs to be populated in sequence file right now am using Java code to convert into XML then ETL tool to extrcat in to sequence file is is possible to pull directly into sequence file?