Timestamp/time elapsed for digital pulses

I am using a PCI-6132 to time digital signals. Ideally, I would like to use the NI-DAQmx C++ API to get a timestamp from the 6132 for each edge (essentially, input capture). I'm pretty sure there is a way to configure a task to do this, but I'm not quite sure how. Most of the tasks seem to measure relative times (ie, the time between two pulses, high time, etc). If someone could point me to the functions/configurations that I should look at, I'd be very grateful.
Thanks,
Ruddick

Hi Ruddick, 
I found a few examples which might help you along. Both can be found by navigating to the text-based examples provided in your DAQmx installation.
Start>>All Programs>>National Instruments>>NI DAQ>>Text-Based Code Support>>ANSI C Examples
In the folder, navigate to Events>>Signal>>Change Detection>>Read Dig Chan-Change Detection Event.c This program shows you how to create a DAQmx task which reads change detection events. During the callback phase, you can insert the code to get a timestamp. 
The other example, starting with "ANSI C Examples", is located in Counter>>Measure GPS Timestamp>>GPS Timestamp.c
These two examples should give you enough to work with to create a task which outputs a timestep at each rising edge when reading channels on the PCI-6132. Please let me know if you are having trouble finding these examples, I'll be happy to attach to another reply. 
Best,
Peter Rifken
Applications Engineer
National Instruments
www.ni.com/support
1-866-ASK-MYNI
Peter Rifken - Field Engineer & Business Manager
Boston / North New England & Maine

Similar Messages

  • Measuring time elapsed for file output.

    Hello everybody
    I want to add a time constraint for a 'file output.vi'. I want to preset how long (time) should the vi write in my file. For eg. stop writing after 20 seconds. Please suggest an appropriate way for this. Am attaching my vi for your perusal.
    Thanks in advance
    Attachments:
    pic 2.JPG ‏110 KB
    TEST2.31.vi ‏419 KB

    Firstly sorry to post on two threads. Next, i got hold of a colleague's zip drive here's is the code with your modifications. But this is not functional in the following manner:
    1.The programme treats time to write in file and execution time of while loop alike, which is not required.
    If i give 30s for execution of while loop and 20s for file write time. and start writing at the same time when i start the while loop it works file, even if i give 20s for both and start both fuctions at the same time it works fine.
    But when i mention 30s for execution of while loop and 20s for file write time, and start the write function after 10s of while loop execution. I dont get data worth 20s which i want in the file.
    SO please suggest proper modifications
    Thanks in advance.
    Vaib

  • How can i compute the time elapsed between two pulses or the period of an encoder signal if I dont have a constant rpm?

    I need to compute the rpm of an engine using information from an optical encoder attached to it. the engine is running in transient mode so the encoder pulse doesnt have a constant frequency. I need to get the period betwwen two rising or falling edges using DAQmx.
    Any ideas?

    Using an M Series or TIO device you can measure the period between two edges (on two different signals) using the two edge separation measurement.  I'm assuming that you don't want to use position measurement because the frequency is varying so much?  If not, you may be able to set the sample clock period short enough that you get a decent average RPM measurement.
    gus....

  • Gen Digital Pulse Train Finite Retriggerable - Initial Delay is only for first trigger

    The DAQmx example Gen Digital Pulse Train Finite Retriggerable has an Initial Delay parameter. It appears (6602 and an E series card) that this Initial Delay only delays the pulse generation for the first trigger. Subsequent triggers show no delay. Is this the designed behavior ? Any way to get the Initial Delay to occur for all triggers ?
    Steve

    So, yes, you are seeing the appropriate behavior. However, it is possible to get a re-triggerable finite pulse train with an initial delay. What you have to do is set up a re-triggerable pulse, and have that pulse act as a pause trigger for a continuous pulse train. Let me explain further with an example.
    1) Set up counter 0 as a re-triggerable single pulse (Gen Dig Pulse-Retriggerable.vi). Set the low time = initial delay = X, and high time = Y. The re-triggerable pulse will be low for X, then high for Y after every trigger (it applies the initial delay to the first pulse, and the low time to every pulse after the first). The trigger source is your actual trigger.
    2) Set up counter 1 as a pause-triggered continuous pulse train (Gen Dig Pulse Train-Continuous-Pause Trigger.vi). This pulse train will be the frequency of the finite pulse train you want. The pause trigger source will be the output of counter 0.
    I have attached the VIs I used to accomplish this. There are three VIs, the two mentioned in 1) and 2) and another VI I used just to monitor the signals. These could be combined to a single VI if you would like. Hope this helps!
    -Alan A.
    Attachments:
    Retrig_Finite_Pulse_Delay.zip ‏135 KB

  • How can i request the actual time code of digital video recorder, i am using RS232 interface for asking actual time code of digital video recording

    how can i request the actual time code of digital video recorder, i am using RS232 interface for asking actual time code of digital video recording

    If you have an RS-232 interface to the digital video recorder, it may be that you can send a command to the video recorder in order to get the time code sent back to your application - you would then read this as a string and then incorporate this data into your program.
    The best source of help will be any documentation you have relating to the serial (RS-232) interface with the digital video recorder. This documentation should have commands that you can send to the recorder and expected response strings that you should get back from the device. This task should be straightforward but can often be frustrating without documentation about the video recorder. This will not be something that you can "guess" - past experience in writing serial communication ap
    plications has shown that a good manual is your best friend.
    Failing this if you have any source code for example programs that have already been written to communicate with the recorder, you might be able to extract the relevant ASCII strings and use them within your application. This is true whether you are using LabVIEW or a text-based language.
    Jeremy

  • HT203167 I downloaded two movies from itunes at the same time (both free digital copies from a dvd) and when they finished downloading... they disappeared. I've not been able to re-download them or find them.. anywhere. Any suggestions for tracking them d

    I downloaded two movies from itunes at the same time (both free digital copies from a dvd) and when they finished downloading... they disappeared. I've not been able to re-download them or find them.. anywhere. Any suggestions for tracking them down?

    If you downloaded them on your computer's iTunes then they should have gone into the Movies part of your iTunes library, if on a device (iPad, iPhone or iPod Touch) then into the Videos app - they haven't appeared there ?
    If you downloaded on your PC and they don't show in the Movies section then you could try searching for them by name (or part of their name) via windows explorer and see if that finds them. Or if you downloaded them on a device and they aren't in the Videos app then have you got a film age rating set in Settings > General > Restrictions that is hiding them, and if not can you find them via the device's spotlight search screen (swipe your first homescreen to the right) ?

  • Niscope for pxi5105, use a digital pulse signal to control analog signal sample

    i want to use ni-scope to drive pxi5105. And the PFI1 connect to a digital pulse signal(10KHz, 0-3.3V), to control a single channel analog signal continuous sample(Chan 0). I want a loop when the digital signal falling, the analog singal start to sample, and when the digtal signal rising, the analog singal stop. And by the low level of the digital singal, the analog singal sample (coupling by DC) can get an average and export to txt. I have tried the "start_and_reference_trigger.vi " and it did not work correctly. i need your help, thank you very much.
    Attachments:
    start and stop triggers for analog sample.vi ‏94 KB

    Hi Phil,
    The SCC carrier is only conditioning your signals (i.e. if your signals are not in optimal ranges, bandwidth or need external excitation). The actual counters and all digital lines are controlled directly by the M-series board. This means you will never be able to refer to a counter in the SCC module.
    If you route the signals of the M-Series board, is as if you had done so externally from the SCC. Look at this example and might give you more insight to how to implement it (This is software timing). The hardware timing would be doing correlation DIO. Here is an example that needs to be modified to adapt to your timing: http://zone.ni.com/devzone/cda/epd/p/id/4414
    Hope this helps,
    Yardov
    Gerardo O.
    RF Systems Engineering
    National Instruments
    Attachments:
    Finite Dig Output High.vi ‏31 KB

  • Aperture Time incorrect for NI 4071 @ 4.5 digits

    I wrote a program to determine what the aperture times are for the NI 4071 DMM and found the 4.5 digit time does not match the specification.  The specification states 50 us but the actual value returned is 20 us (The same as the 4070/4072 meters).  The 3.5 digit resolution returns the same answer as 4.5 digits and is not specified.  I don't see how 3.5 and 4.5 digits resolution can have the same accuracy.  The code in C# used:
    NI_4071.ConfigureMeasurementDigits(Function, Range, Digits);
    NI_4071.SetDouble(niDMMProperties.AcMinFreq, "", 10E3);
    NI_4071.GetDouble(niDMMProperties.ApertureTime, "");
    DC Current and Ohms gave the same answers as DC volts.  AC volts and current gave the same answers.
    Also does autorange use 500 us regardless of what range it finally ends up on?
    This means autorange is significantly less accurate than using 6.5 or 7.5 digits.
    John Anderson

    Hello John, 
    Thanks for letting me know about this post. If it is okay with you let us keep our correspondance limited to that page. I will go ahead and leave a link to the other post on this page so anyone with a similar quesiton can follow along. 
    Regards,
    Izzy O.
    Applications Engineer
    National Instruments 

  • I want to install a new Time Capsule for backups. I also have a B box2 from Belgacom for the digital TV, so how do I install?

    Hi,
    I want to install a new Time Capsule for backups. I also have a B box2 from Belgacom for the digital TV, so how do I install?

    Just setup the TC in bridge.
    Assuming you are using Lion.. download the airport utility that has some utility.
    http://support.apple.com/kb/DL1482
    Then manual setup, internet tab, connection sharing.. off bridge mode.
    Then plug the TC into the Bbox and just use it as wireless target for your air.
    You can use wireless on Bbox if that works as well, and you might need to juggle wireless channels to get everything working. Having both set to auto is not a good idea.. set and lock channels on one or the other but best is both.. On the TC go to the airport wireless page. change it to manual.. lock the channel. You can use 1, 6, 11 or 13 in ETSI..

  • Long startup time for Digital Editions Version 4.x

    Hello
    I've updated the digital editions at my notebook form version 3.x to 4.x
    I've access to all documents from version 3.x, but the start up time for
    Digital Editions is very long, approximately up to two minutes!

    In $DAC_HOME/CustomSQLs/customsql.xml
    there is a part about analyze table:
    <SqlQuery name = "ORACLE_ANALYZE_TABLE" STORED_PROCEDURE = "TRUE">
    DBMS_STATS.GATHER_TABLE_STATS(ownname => '@TABLEOWNER', tabname => '%1', estimate_percent => DBMS_STATS.AUTO_SAMPLE_SIZE, method_opt => 'FOR ALL INDEXED COLUMNS SIZE AUTO',cascade => false, degree => DBMS_STATS.DEFAULT_DEGREE)
    </SqlQuery>
    you can change DBMS_STATS.AUTO_SAMPLE_SIZE to a constant (eg 10 for 10%). However it will impact the analyses for all DWH tables.

  • I recently updated my iPad and backed it up, then deleted photos to make space for more now when I try to take photos it says "time elapsed" what does this mean and how do I fix it?

    I Have an issue with taking photos my iPad mini 2 keeps saying "time elapsed" what's does this mean and how do I fix?

    You are using PPPoE but there is no server to authenticate against.. or the modem is already connected and nothing else can join.
    Is this ADSL?
    Do you have the modem in bridge?
    How does it work with the modem working as router? ie what type of connection does your ISP supply.. eg PPPoE is only one.. PPPoA is another.. IPoA or ETHoA.. and sever other more specialised.. PPPoE can only work where it is supported.

  • Increasing the hight time of a single pulse

    I am quite new in using Labview, and have bumped in to this annoying problem:
    Basically I would like to create single ttl pulses with a user
    specified high time of anything from 0.5 ms to 100 ms, and repeat this
    procedure every (1 s -10 s) a certain amount of times.
    For some reason I cannot change the high time to anything higher than
    15 ms, even though it gets an input higher that 15 ms. Anything below
    15 ms the whole program works just fine.
    Does anyone know what could be the problem?
    I am using the pci-6024E card.
    Kind regards Kaqmak
    Attachments:
    snippet.vi ‏63 KB

    Hello Kaqmak
    The reason that it seems you only are able to set a high time of about 15 mS is that you are terminating your task before its completed. You should use the "DAQmx wait until done.vi" as shown in the "Gen Dig Pulse.vi" example which is included in the Example finder of LabVIEW. I have attached an example of how to do this...
    You should be able to generate a pulse that is at least about 167 seconds.. see the following link.
    http://digital.ni.com/public.nsf/websearch/F66CCAB​02D3B901886256A03005EE14A?OpenDocument
    Regards
    Mohadjer, NI-DK
    Attachments:
    snippet.vi ‏35 KB

  • Getting time elapsed in AS3

    I have some asynchronous stuff going on in my Flash movie and
    would like to determine how much time elapses between two events --
    e.g., a button click and the response from a socket server.
    I'm wondering how to go about this in AS3?

    Thanks for your response!
    I took your advice on using getTimer() and it's working
    swell. However, I was kind of hoping for something that didn't
    require my Flash movie to be running the whole time. I have learned
    that you can create a new Date object and access its time property
    and that will return a value in milliseconds. You can later create
    a new Date object, access its time property, and compare the two:
    var start:Date = new Date();
    trace('start:' + start.time);
    //calculate PI to a million digits or whatever
    var end:Date = new Date();
    trace('time elapsed:' + (end.time - start.time));
    I haven't tested that, but I think it'll work.

  • How do I count digital pulses and convert them to an x-axis unit?

    I am a grad student in Chemistry and I have undertaken a project to switch an old spectroscopic instrument from a stepper motor chart recorder to a digital interface. 
    I am using Labview 7.1.
    I just measured the signals coming from the instrument, so I know exactly what I am working with.
    I have one constant, 100mV, digital pulse--which was used to drive the stepper motor a set # of wavenumbers for a given amount of pulse. I need to convert this signal to correlate with wavenumbers--on the x-axis of my final waveform graph.
     The other signal is an analog signal, up to 250 mV, which is coming from a photomultiplier tube and represents my y-axis of my final waveform graph.
    I am using the NI BNC-2110 DAQ board. 
    Should I design the program based from just the AI Aquire Waveform.vi? Add a Count Events or Time vi. for the digital pulse?
    Could anyone give me some hints with my initial setup/layout? 

    Hints:
    Figure out what is the modle number of your DAQ device. I think the model you cited is just a break-out box.
    Depending on your hardware you may be able to use the step pulses to clock your A/D conversions.
    The number of sample will be the number of steps so all you need is a conversion factor to convert sample count totoal to wavelength.
    Others may offer better ideas so stand by.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to use single Timer to generate PWM PULSE, Pulse ON time measuremen​t, Event time measuremen​t1,Event time measuremen​t2

    Hi,
    I am planning to use a single Timer to generate PWM PULSE, Pulse ON time  measurement, Event time measurement1,Event time measurement2 some one please suggest me how can I achive this.
    Thanks in advance..
    Michael

    Hi Michael,
    It would be really good to understand your application a little more so that any specific needs that you have may be met. In the meantime, I would also suggest searching on ni.com for "pwm" or other keywords that relate to your application. You will see a faceted navigation on the left side that allows you to narrow your search for example code, tutorials, etc.
    Please post back with more information and the community will be able to help out with suggestions.
    ni.com search for "pwm"
    Mark E.
    Precision DC Product Support Engineer
    National Instruments
    Digital Multimeters (DMMs) and LCR Meters
    Programmable Power Supplies and Source Measure Units

Maybe you are looking for

  • How to install SQL SERVER 2008 r2 in window 7 home premimum 64bit

    how to install SQL SERVER 2008 r2 in home premimum 64bit os. can any say that weather it will support or not in window 7 home premimum os. my server log file: Final result:                  SQL Server installation failed. To continue, investigate the

  • Zip code entry problem

    On some websites there is a field requesting a 5 digit zip code. When I type the zip code into the field all 5 digits show--- when I tab to the next field, one of the zip code digits drops out (either first or last) and leaves only 4 digits. The info

  • Sql server Memory usage

    Hi, How to find out the current utilization of Ram in sql server? and how to restrict the ram for sql server  windows 2008r2 with 64bit os?

  • Is Precalculation server a prerequisite for Information broadcasting

    Hello Everybody, I wanted to know is installation and configuration of pecalculation server a prerequisite for enabling Information broadcasting feature in BW 3.5 i.e; inorder to send emails to users .I mean inorder to send mails to users is it neces

  • OWL support in Oracle products

    I have an OWL ontology(fully validated and created using Protege) that I would like to store into Oracle Spatial RDF. Does Oracle support this capability? If so, what are procedures, is there documentation that describes the procedures and the capabi