DAQmx - Measuring edge position (time) with a counter ?

Hi all,
I have two signals that I need to study using a USB 6212 (BNC) card:
(1) a short 0-8V signal (~500 ns) (yellow on the plot)
(2) a long signal (~6 µs) for which I have to measure the amplitude (purple on the plot).
The long signal (2) has to be connected to an analog input so that I can measure its amplitude. In addition, given the duration of the pulses, I need to use the max speed for the ADC conversion. That's why I'd like to use a counter for the other signal and not a second AI (it wouldn't work anyway given the short duration of the pulse (1)).
Initially, I wanted to measure the amplitude of (2) only if the short pulse (1) occured, which is possible with a trigger on the AI channel, but in this case I get a too long deadtime and the acquisition is very slow.
To speed up the process, I wanted to record all the data with the AI and the times at which the signal (1) gives a rising edge to post-process everything later (using a FIFO I guess).
So my question is wether it is possible to measure the position (ie the time) of an edge of a signal with a counter ?
The signals measured with a scope are shown on this picture:
http://lpnhess.in2p3.fr/~bolmont/NI/outhg1.png
Thanks a lot for your help !
Cheers,
JB
JB

Greetings,
Please see 8-3 of http://www.ni.com/pdf/manuals/371931f.pdf
This shows that you can use the counter to record the current value stored in the counter that is being driven by a clock. This has the upshot of creating an array that has the times of the event. To do this, you need to set the source and gate properly. These can be set first by configuring the counter to Count Edges (see DAQmx Create Channel) and then updating the CI.CountEdges.Term (in the DAQmx Channel Properties) to the channel that has your signal and SampClk.Src (in the DAQmx Timing Properties) to a known clock, such as the onboard SampleClock.
Keep in mind, the specs for the digital ports (which I assume include the counter ports) have a maximum voltage rating of 5.25 volts, so while it probably won't make a difference, you might want to divide down the voltage to be within spec.
Of course, there are other ways to do this. For instance, you could just sample a digital port along with your analog port and then in post processing look for edges, but I feel like this is the cleanest way to do it.
In any event, it seems very possible.

Similar Messages

  • Measure waveform rise time with IVI step

    I'm trying to simulate measurement of wafeform rise time through IVI step TS 4. How should I  feed the Scope IVI step with waveform and then get the calculated rise time in simulation mode(I do not have the Scope yet.
    Thank you.
    Elik

    Hi,
    Thank you. So far it is simple, but I wonder if there is a way to feed to the IVI step through simulation waveform like square wave and different frequencies. I've tried using TDS 2000 series but I get the same data results.
    I configure it as Normal Acquisition
    Advance Tab Low Reference 10, Middle 50 and High 90.
    Channels Tab, left the defaults except Maximum input frequency which I configure with variable
    Trigger Tab Type Edge, Source Channel 1, Coupling DC, Slope Positive, Level 0.5
    Extension Tab, Waveform Measurement.
    I also set a step Read and set one of the channels to read Rise Time.
    Although the waveform change The data from step results which I suppose give you the rise time stay the same.
    Is there any way to change the waveform type and the rise time through the IVI step?
    Thank you.
    Elik

  • Measure pulse width with 4 counter simultaneously

    Hello,
    I am using NI PCI-6601 measure the pulse width with 4 counter simultaneously, due to only a DMA channel on this card so I selected interrupt data transfer mode to read data from PCI bus for 4 counters, but it working only for few seconds then a error message prompted:
    Error -200141 occurred at DAQmx Read (Counter 1D DBL 1Chan NSamp).vi
    Measurements: Data was overwritten before it could be read by the system.......(See attached picture: TestUI and Error MSG.bmp)
    I know the problem caused due to system is unable to read back data from PCI6601's memory as fast as they card countered. My quesition is:
    1. The timebase is 20Mhz(Sample rate), how to change the sample rate slower (like 100Khz) ?
    2. Any good solutions can meet my requrement?
    Attached is my source code, Test.vi is the main VI.
    Thanks for your help.
    Steven
    Attachments:
    Test.zip ‏557 KB

    What's more, you could include four channels in one task, so you don't need to build four task!
    Attachments:
    4 counters in one task.png ‏719 KB

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

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

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

  • Buffered Edge Counting 20 MHz with duplicate count prevention

    Dear all,
    I went through the specs of several boards (M- series, S- and E- series, 6602 etc...). It seems that these boards can count edges with duplicate count prevention on at a maximum rate <= 20 MHz (i.e., 1/4 of 80 MHz) - but maybe I have misunderstood the docs.
    Is there a NI board capable of buffered edge counting with a general purpose counter for random events going at rates from 0 Hz to > 20 MHz? Do I need to look for a reconfigurable board?
    Thanks in advance.

    Dear Elizabeth,
    Thanks for the answer.
    In my application, events arrive asynchronously (actually, randomly). During the duration of a gate (namely, 1 microsecond), one expects anything from 0 to many (i.e., possibly more than 20, up to 80) events. This requires duplicate count prevention. 
    I may have misunderstood the specs for M series boards, but the document:
    Using Duplicate Count Prevention for Counter Tasks in NI-DAQmx
    from the NI web site, for instance, states that:
    "All the other timebase edges that occur while the external source input is high are ignored. If no source edges are detected between two gate edges, as shown in Figure 3, duplicate count prevention ensures that pulse measurements return zero because the external source must be logic high to allow the internal timebase to increment the count register. This reduces your maximum source frequency to quarter of the original maximum (80MHz) timebase for NI-STC II and NI-TIO boards. Therefore duplicate count prevention should only be used if the frequency of the Source signal is 20 MHz or less.
    Duplicate count prevention should only be use in the following situations:
    Counter measurements
    The counter Source is using an external signal (such as PFI x)
    The frequency of the external source is 20 MHz or less
    What's your take on that?
    Thanks for your time.

  • 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

  • I rented a Movie and it has been loading for 3 hours now. Internet connection is fine. Have never had a problem with this before. What's really annoying is that the 24 hour time limit is counting down even though we cant watch it. Any suggestion"hours now

    I rented a Movie and it has been loading for 3 hours now. Internet connection is fine. Have never had a problem with this before. What's really annoying is that the 24 hour time limit is counting down even though we cant watch it. Any suggestions?

    The first thing to check would be your internet download speed, you can do this at www.speedtest.net.
    HD movies require a recommended speed of 6 Mbps, while SD movies require a recommended speed of 2.5 Mbps.
    Additionally, your 24 hours don't start until you begin to watch the movie, you have 30 days to start watching the movie.

  • Document on Positive Time Management & Integration with payroll

    Hi,
    Can any one suggest me any link from where I will get the IMG steps of Positive time management implemetation, time evaluation, time wagetype detail as well as the steps of integration with payroll..
    Thanks in advance.
    Ajay

    Hi Chandrashekar,
    Can you please advise how actually the transfer of clock times from time recording terminals to SAP R/3 will work?
    I read from help.sap.com that there is a SAP certified CC1 interface (BAPI based) which can be used for this purpose. However, in such a case, the time recording terminals should be SAP CC1 certified.
    If the time recording terminals are not SAP CC1 certified, then what is the method to be used? Will we write a custom BDC program in this scenario and what all should be considered in functional specification of such a BDC program.
    Please advise.
    Thanks and warm regards,
    Vianshu

  • Difference between a positive time and negative time management.Explain with screenshots.

    Hi gurus!
    I would like to know the difference between Positive time management and negative time management.
    thx & regards,
    raju

    Hi Nagaraju,
    I am adding more information..
    Whether or not an employee is on positive or negative time is determined by the time management status on IT0007. Status 1 or 2 = positive time; status 9 = negative time.
    In a standard system, positive time recording means the employee is required to record time (absence or attendance) for any day on which he is scheduled to work according to his generated work schedule. Negative time recording means an employee does not need to record time unless he has an exception to his normal working time; so absences are typically recorded as well as overtime or time work on days for which the employee is not scheduled to work.
    Schema TM00 is used to process positive time employees for whom clock times are entered; that is, every record has a start and end time.
    Schema TM04 processes both positive and negative time employees. The key distinction between TM00 and TM04 is TM04 does not require start and end times on every entry. Records with start and end times cna be processed in TM04. However, the records do not require these entries.
    In TM04 you will see code using IF, ELSE, ENDIF statements during the import process to separate the import of time data for positive and negative time employees.
    Positive time employees use the following data import statements in the schema:
    P2011 Import IT2011 records to TIP; regardless of whether the EE has IT2011, load the work schedule to TZP. If no IT2011 record exists, TIP is empty.
    P2001 Load absences
    P2002 Load attendances
    Negative time employees use the following data import statements:
    P2000 This is the critical difference between positive and negative employees. P2000 loads the daily work schedule to the TIP table as if the employee workede; that is, if the employee is scheduled to work from 8:00 to 17:00, this record will now appear on TIP. The work schedule details are also added to TZP.
    P2001 Load absences -- to pick up exceptions to planned working time
    P2002 Load attendances -- again to pick up exceptions, special costing information, overtime, alternate payments, premiums or any other variation from normal schedule work.
    So if you want to determine if you are using positive or negative time, check the time management status on the employees.
    Regards
    Siva

  • What is meant by Positive time mgt with clock & without clock?

    Hi Experts
    What is meant by Positive time mgt with clock & without clock? Plz explain with example experts..

    Hello Anniyan,
    Please check the below thread. Its a good beginner. 
    Positive & Negative Time Management Concept
    Please rewar if helpful.
    Thanks and Best Regards.
    Karan.

  • COUNT the same column multiple time with 2 different condition

    Hi everyone,
    I have a small query but I don't find the answer. Can anyone help me with this one ? Look at this example:
    WITH T AS (
      SELECT 'a' as Name, 1 as v FROM DUAL
      UNION ALL
      SELECT 'a' as Name, 2 as v FROM DUAL
      UNION ALL
      SELECT 'a' as Name, 2 as v FROM DUAL
        UNION ALL
      SELECT 'b' as Name, 1 as v FROM DUAL
        UNION ALL
      SELECT 'b' as Name, 1 as v FROM DUAL
        UNION ALL
      SELECT 'b' as Name, 2 as v FROM DUAL
    ) SELECT DISTINCT name,
             COUNT(DECODE(v, 1, 1, null)) OVER (PARTITION BY name ORDER BY v) as v1,
             COUNT(DECODE(v, 2, 1, null)) OVER (PARTITION BY name ORDER BY v) as v2
        FROM T
      ORDER BY 1;This returns :
    NAME V1                     V2                    
    a    1                      0                     
    a    1                      2                     
    b    2                      0                     
    b    2                      1                      But what I need is only one row with the count of 1 and 2 by name. How can I achieve that without using subqueries like (the following query returns the correct output)
    WITH T AS (
      SELECT 'a' as Name, 1 as v FROM DUAL
      UNION ALL
      SELECT 'a' as Name, 2 as v FROM DUAL
      UNION ALL
      SELECT 'a' as Name, 2 as v FROM DUAL
        UNION ALL
      SELECT 'b' as Name, 1 as v FROM DUAL
        UNION ALL
      SELECT 'b' as Name, 1 as v FROM DUAL
        UNION ALL
      SELECT 'b' as Name, 2 as v FROM DUAL
    ) SELECT DISTINCT t.name,
             (SELECT COUNT(*) FROM T z WHERE z.name = t.name and z.v = 1),
             (SELECT COUNT(*) FROM T z WHERE z.name = t.name and z.v = 2)
        FROM T t
      ORDER BY 1;The table I'm working on has millions of records and with subqueries it takes ages to executes. The one with analytical function takes less than 3 sec.
    Thanks for your help!

    Hi,
    user13117585 wrote:
    Hi everyone,
    I have a small query but I don't find the answer. Can anyone help me with this one ? Look at this example:
    WITH T AS (
    SELECT 'a' as Name, 1 as v FROM DUAL
    UNION ALL
    SELECT 'a' as Name, 2 as v FROM DUAL
    UNION ALL
    SELECT 'a' as Name, 2 as v FROM DUAL
    UNION ALL
    SELECT 'b' as Name, 1 as v FROM DUAL
    UNION ALL
    SELECT 'b' as Name, 1 as v FROM DUAL
    UNION ALL
    SELECT 'b' as Name, 2 as v FROM DUAL
    ) SELECT DISTINCT name,
    COUNT(DECODE(v, 1, 1, null)) OVER (PARTITION BY name ORDER BY v) as v1,
    COUNT(DECODE(v, 2, 1, null)) OVER (PARTITION BY name ORDER BY v) as v2
    FROM T
    ORDER BY 1;But what I need is only one row with the count of 1 and 2 by name. How can I achieve that without using subqueries Use the aggregate COUNT function instead of the analytic COUNT:
    SELECT   name,
              COUNT(DECODE(v, 1, 1, null))  as v1,
              COUNT(DECODE(v, 2, 1, null))  as v2
         FROM T
    GROUP BY  name
    ORDER BY  name;

  • How can i measure the transmision time in gpib with visual basic with more precision if i use time() function?

    I want to take a measurement of the time that i use to make a gpib transmision in a Visual Basic program,i use the function TIME() to take the time in the begining and other time in the end,but this way only give me precision of seconds, and i want miliseconds,can i use other function,other way?
    Can answer in spanish?

    Try using GetTickCount() API function, which provides millisecond precision. If you need more precise timer, try using QueryPerformanceCounter() function.
    Makoto

  • How do you interface a Renishaw laser real-time with NI DAQ?

    I understand that it is possible to acquire "real time" feedback from a Rensishaw Laser while measuring linear position, with the following modifiers applied.
    *The standard output is a digitized value to a proprietary (Renishaw) data acquisition (DAQ) card.
    *Renishaw lasers have a quadrature output facility on the back of the laser head. This permits capture of the �raw� interferometry signal. This raw signal is not compensated for environmental factors such as temperature, air pressure, humidity, etc.
    *The standard system integrates signals from an environmental unit for air temperature, pressure, and humidity, as well as signals from up to three material probes. Acquisition and pro
    cessing of these or equivalent signals would have to be considered to provide data for environmental compensation calculations (Edlen equation). This is mandatory in order to obtain accurate distance and velocity readings.
    *The quadrature output can communicate with other cards. (NI DAQ?)
    Specifics with regard to Labview software and required DAQ to read real time Laser output would be very much appreciated.

    You can use a counter available on the E-series MIO DAQ boards or the 660x counter boards. You can measure the position, frequency, and period of the output from a quadrature encoder. Examples on how to measure signals from a quadrature encoder for LabVIEW can be found on the web at ww.ni.com/support under the technical resource section search under the example programs section.
    You may also want to contact Renishaw to see if they have drivers available for LabVIEW and their DAQ equipment.

  • How to check 6 digital signals change value at the same time with PCI-6229??

    I am using DAQ card PCI-6229.
    Channel 1 generate a digital signal.
    Channel 2,3,4,5,6,7 acquire digital signals.
    I want to check:
    1. Whether the rising edge of Channel 2,3,4,5,6,7 occures at the same time;
    2. The time delay from the rising edge of Channel 1 to the rising edge of Channel 2,3,4,5,6,7 is within a certain range.
    I know I can use counter to get the two edge seperation time delay. But I only have two counter, it is two time-consuming if I check one by one.
    I don't know how to check the rising edge of 6 different channels occure at the same time.
    Does anyone has any suggestions?
    Thanks

    Hello,
    You can use the DAQ card's digital input change detection circuitry to detect changes in the input, you can then use a counter to measure the relative time between samples. Please read Page 6-9 DI Change Detection Applications for more information. Let me know if this helps
    Christian A
    National Instruments
    Applications Engineer

  • Need help with voltage counter

    I have a system that passes current through a resistor when ever a button is pushed.  The voltage across the resistor (about 100mV) is read by a cFP-AI-102 Analog Input voltage module.  I'm trying to figure out a way to count the number of times this happens.  In other words, I need to count how many times the button is pushed.
    I've tried using a While Loop, but since it counts with every iteration I end up with way too many counts for each button push.  Is there a way I only count once?
    Thanks,
    Eric

    Hi!
       If I understand, you want to measure how many times button is pushed, i.e. how many transition 0 -> 100 mV, right?  I'd do that with a shift register and a while loop.... just save the past state of the analog in, if the comparison between the past state and curtrent state is > 50 mV, you have a push.... (actually it depends on how terminals are connected...)
     Post your code, perhaps I can understand better the starting point. 
       remember: this way you're going to measure too many transitions, because usually, when a button is pressed or released you have some oscillating voltage (I don't know if you ever tried to handle a switch button with a microcontroller, there you can see this).  But maybe, AI module sample at "low frequencies" respect to this phenomenon.
    graziano

Maybe you are looking for

  • Itune store does not accept my debit card?

    I am trying to buy application from apple store it does not accept ny debit cards master as well as visa card

  • Unknown caller and blocked caller

    Keep recieving a skype call from *** MESSAGE RECEIVED! VIEW AT WWW.VIEWSN.COM *** why even after I have blocked the person?

  • ESWorkplace and ESR adopt different classifications for Services...but why?

    Hi, While experimenting with ESOA I noticed Services are classified differently in ES Workplace (http://erp.esworkplace.sap.com/) and ESR (http://sr.esworkplace.sap.com/)! Can someone explain me the reason of it? Thanks Pietro As example, take the Em

  • CD rom and Raid

    i jus got my second raptor HD today and tried to setup a raid 0 on my computer.  I got the raid utility to work and created the array.  I have two raptor 36gs on sata 3 and sata 4 and my cdrom on IDE1 master.  When i start up it does not detect the c

  • The cost of Apps

    Can anyone tell me why I have just paid £3.00 for a Game App for Symbian  on my Nokia N8 when I downloaded the same game for 0.79p on my I Pod and my son tells me that the same game is FREE for Android phones??  Why are we being ripped off??