Counter miss TELL pulses, NI DAQmx 9181 with NI 9402

Hi,
I am trying to read TTL pulses from a function generator using a counter. I am applying a 1KHz signal to the counter. Every time counter reads the pulses correctly in first cycle of measurement, but it miss some counts in all following cycles.
I am using NI cDAQ 9181 Chassis and NI 9402 module with LabVIEW 2014 and NI Max 14.0.
My computer has Windows 8.1 operating system.
Please find the attached VI and images of Front Panel after run.
What could be the reason for that, please guide.
Thanks !
B. Sharma
Attachments:
Counter cDAQ Testing-LV 2014.vi ‏44 KB
Counter cDAQ Testing-LV 2014_Front Panel.png ‏68 KB
Counter cDAQ Testing-LV 2014_Block Diagram.png ‏70 KB

1.  The Elapsed Time VI starts counting when you first call it, so the first loop will take about the desired amount of time (although OS timing is not very reliable anyway).  The Express VI will reset itself as soon as you hit the time target.  Then, you wrap back around and reconfigure your task.  This takes time (during which the DAQ task is not counting, but the Elapsed Time VI has already been reset), and so all subsequent acquisitions will actually run some time less.  For example, if the configuration took 100 ms and you wanted to acquire 1 second of data, you would only get ~90% of the count.
2.  The time it takes to reconfigure the task is going to vary dramatically with the bus you are using due to latency (ethernet > USB > PCI/PCIe).  So it makes sense that the problem was not noticeable with PCI, and it was most severe with ethernet (9181) compared to USB (9171).
3.  Discarding the first sample on buffered counter measurements is a behavior change with STC3-based DAQ products (e.g. X Series, C Series, 621x) compared to older NI DAQ products (e.g. E Series, M Series, 9172).  In your case, when you use the E Series card the first measurement represents the count measured between the arming of the task and the first edge of the gating counter (which toggles almost immediately, you are very unlikely to receive an external 1 kHz clock edge during this time).  Since this measurement is often not desired and can be confusing, it is discarded in the newer NI hardware.
Here is the behavior from the M Series and X Series user manuals (I know not your exact hardware, but I know that the diagrams are in these manuals and your E Series and cDAQ systems respectively will behave the same).
From M Series User Manual:
From X Series User Manual:
Best Regards,
John Passiak

Similar Messages

  • How do I configure a counter to generate pulses using DAQmx?

    How do I configure a counter to generate pulses using DAQmx?
    Is says in the DAQmx C reference help
    "CtrnInternalOutput—The signal at this internal terminal is where the pulsed or toggled output of the counter appears. The output of a counter pulses or toggles when the counter reaches terminal count. When counting down, the counter reaches terminal count when the count reaches zero. When counting up, the counter reaches terminal count when the counter rolls over. To configure the counter to toggle or generate pulses, use the Export Signal function/VI with Counter Output Event as the signal name."
    I've tried this but can't get it to work, I may have the parameters wrong or something. The DAQmxExportSignal() function is very unintuitive to me. Here is my counter config code...
    int ret = 0;
    ret = DAQmxCreateTask("",&task_);
    errorMsg(ret);
    if (ret != 0)
    throw ret;
    // Configure the counter
    ret = DAQmxCreateCOPulseChanTicks( task_, "Dev1/ctr0", "", "/Dev1/PFI8", DAQmx_Val_Low, 0, divider, divider );
    errorMsg(ret);
    ret = DAQmxCfgImplicitTiming( task_, DAQmx_Val_ContSamps, 1000 );
    errorMsg(ret);
    // Change to pulse mode
    ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    errorMsg(ret);
    // Start the counter
    ret = DAQmxStartTask(task_);
    errorMsg(ret);
    The above code works fine, in toggle mode, if I just comment out the DAQmxExportSignal() part.
    HELP!!!
    Stefan

    The problem is due to the DAQmxExportSignal call.  By default, when you create a counter output pulse train task, the driver will automatically set the output of the counter to toggle when the count for each high ticks and low ticks expire.  The driver also automatically routes the signal present at Ctr0InternalOutput terminal (the output of the counter internal to the device) to the Ctr0Out terminal (the I/O pin available externally).  Using the line
     ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    will tell the driver to tristate the Ctr0Out terminal and not output the signal to the external I/O pin.  Using the DAQmxExportSignal function is generally only useful if you want to route the signal to some other terminal internal to the board without having the output show up on the external connector, route the signal to some other external pin other than the default pin, or if you want to have the output show up at multiple locations. 
    If you want to change the output behavior from toggle to pulse, you need to use the DAQmxSetExportedCtrOutEventOutputBehavior function.  However, this is generally only useful if all you care about are edges (not the duty cycle of the pulse train), and you want to generate higher frequency signals.  For example, with a 20 MHz timebase as the source of your counter, you can only generate a 5 MHz pulse train by default.  This is because the minimum value for the low and high ticks parameter is 2 (20 MHz / 4 = 5 MHz).  By changing the output behavior form toggle to pulse, you can generate a pulse train at 10 MHz since the output is now pulsing instead of toggling.  However, the width of each pulse is not programmable so you will no longer have a 50% duty cycle signal.  I don't remember exactly what the width of each pulse is, but I believe it's in the neighborhood of 50 - 100 nanoseconds in width.  I hope this information helps.

  • Counting pulses of a datataker with lab view

    my problem:
    I
    am trying to use lab view to visualize the measurements of different
    data - acquisition systems. At the moment I am working with the datataker DT50
    and I already did some temperature measurements with the datataker lab
    view driver. But when I tried to measure pulses (counts) I did not
    succeed. Is there someone who could help me solve this problem or who
    could send me a example vi to measure pulses from the datataker with
    lab view?thank you very much and best regards,
    jeroen

    Hi Everyone,
    This question has been answered.
    Thank you Julien for pointing to the correct website.
    This is the answer that was given.
    Hi Jeroen,
    With the DT50 there are two types of
    counters.
    The low speed counters use the digital
    terminals on the DT50, Digital channels 1 through to 5. You read them using the
    "C" command
    The high speed counters use the counter
    terminals on the DT50, Counter channels 1 through to 3. You read them using the
    "HSC" command.
    More information on these are on our
    website.
    For low speed counters
    http://www.datataker.com/Datalogger_Manual/The%20Low%20Speed%20Counters.htm
    For high speed counters
    http://www.datataker.com/Datalogger_Manual/The%20High%20Speed%20Counters.htm
    The dataTaker driver for LabVIEW, has the
    "C" command listed for the Channel Configuration cluster, so it will only read
    from the Digital terminals.
    However you can enter any custom command for
    the channels, in the channel number field if you list the channel type as
    "none".
    There is a brief mention of this in the
    driver documentation. The link below refers to the online
    documentation.
    http://www.datataker.com/products/Labview/Introduction_dataTaker_Instrument_Driver/datataker%20conce...
    It is listed under the heading "channel
    number"
    So in this cluster, you can enter the text
    "1HSC" in the channel number field to read in from counter one, and list the
    channel type as "none".
    You can also enter the text directly if you
    are using the low level VIs.
    Let us know if you have any
    questions.
    Kind Regards,
    Anthony Ulrich

  • How do I count arbitrary pulses from an oscilloscope with labview

    I am looking at arbitrary pulses on a TEK 2024B oscilloscope.  I want to use LabView to count those pulses and record a time stamp for each pulse (perhaps to an excel spreadsheat).  The duration of the measurement is over ten minutes and the pulses, on the average, occur once per millisecond.  How do I count/record these pulses with LabView?

    Jay,
    I would start by downloading the Instrument Driver for the 2024B from ni.com/idnet It should have the functions that the scope is capable of implemented there. If you have problems using the driver please post back.
    -Marshall R
    National Instruments
    Applications Engineer
    One stop for all your NI-VISA Support
    GPIB Support has a new homepage

  • Finite pulse-trai​n generation with variable time lapses with NiDAQmx

    Being a newby in Labview and NiDAQmx, I find it tedious to program the application I need to drive my experiment : I want to generate a finite pulse train, with variable delays between two consecutive pulses. These delays are known before the experiment starts, summurized in a table (element 0 decribes the time lapse between pulse 0 and 1, element 1 between pulse 1 and 2 ...). I would like to use NiDAQmx to program this. I had in mind the following scheme : two counters, first one counting time between pulses, the second one generating the pulse once "counter one" has finished his job. What I don't figure out is how to reprogram "counter one"'s register, without introducing unwanted delays in the time
    sequence of my finite pulse train. I am using a 6052E DAQ, and I want to generate delays in a same pulse train ranging from 1 microsecond up to 20 seconds.
    Thank you for ANY help :-)

    Hello !
    Well, I will try to be more precise while answering your questions. But first let me thank you very much for your help : your comments, questions and remarks are very helpful to help me shape my project, as you shed light on particular problems I strictly had no idea before !
    1) I can certainly get on well with digital output as my flash device is triggered by TTL signals.
    2) The lighting device is home-made, and I think it will be better for my needs to produce light throughout the duration of the input at the “on” level. In any case it will be driven by TTL-like signals. The intensity is manually set, so no analog control is required.
    3) I will use Labview to collect the experimental data. The signal will be sampled during the light pulse : the rising edge of the TTL-like output signal will trigger both the lighting device and the data acquisition, the latter being stopped on the falling edge. The light emitted by the lighting device is called a “probe” for the following reasons : the photons are absorbed by the photosynthetic sample and “immediately” re-emitted at a longer wavelength. A photodiode acts as a signal transducer, and I monitor the intensity of this fluorescence. Knowing precisely when light pulses occurred after the initial start excitation (which is also a brief pulse of light but of a much greater intensity than the “probe” light) and the intensity of light emitted during theses pulses, I can reconstruct the kinetic of fluorescence decay. This kinetic reflects the behaviour of my biological sample. Thus no continuous acquisition is required as between two light pulses there is nothing to monitor. And all the half-time reaction are timed relative to the same “start” excitation as they reflect a jump sequence of an electron extracted by the “start” excitation : first jumps are quick ones (half-time in the 10 �s range) and last jumps are slow ones (half-time in the 1 s range). With respect to these kinetics, I would like a 1 �s precision. If not achievable, I could skip the quickest jump (but it would be a pity) and focus on the second one which has a 10 ms half-time reaction and a 100 �s precision would then be enough. But as we say in French : “Qui peut le plus, peut le moins !” (roughly meaning that when you can achieve the best, you easily can do the least). This precision relates to the position of one flash with respect to the others. I don’t need to be very precise on the duration of each individual light pulse : a typical value is 100 �s duration, but I can get on well with 90 �s or 110 �s, my data being an average of the light intensity emitted during the light pulse). All I want to know precisely is when it is fired.
    4) Concerning the hardware, I already have a NI 6052E DAQ board, and unfortunately my laboratory cannot allow me to spend more money on this. I also have a fast acquisition board (IMTEC T3012) I intended to use to acquire my photodiode signal in place of the 6052E A/D converter. It has an old Labview driver, and I managed to upgrade it to suit my needs. It has an onboard segmented memory and can keep track precisely (it has a 60 MHz sample clock) of a trigger event. I am wondering if I can overcome the timing precision issue with this board, knowing that I strictly don’t care that flash n�1 is triggered at (t0 + 10 �s) or (t0 + 11 �s), provided that I know it, allowing me to place precisely my data point on the time scale. I can program the number of memory segments (i.e. the number of light pulses) and each one is filled with data coming from the photodiode upon receiving the rising edge triggering the light pulse. The precise date at which each triggered is received is stored in the board memory, allowing time reconstruction.
    I do hope this is much clearer than my previous attempts ! Believe me, it is quite hard to leave biology for a while and enter the cryptic world of data acquisition !
    Gritche

  • Finite pulse train generation​... how to count number of pulses?

    hi guys,
    this has probably been solved a hundred times but i just couldnt find it!!
    i have a pulse train generation happening on my ni usb-6211... using FREQ OUT, using a divisor on this, and routing it to PFI4.
    id like to update my VI so i can specify the number of pulses....
    im pretty much a noob at this stuff so any help would be greatly appreciated!! thanks!
    dan
    Attachments:
    pulse train generation.vi ‏25 KB

    Hi,
    No problem at all, we are here to help. What I’m going to do first is to point you to a bunch of examples for that might give you a better insight of the capabilities of the card in terms of finite pulse generation. What you should be looking at is called retriggerable pulse generation and here are some examples to look at: Retriggerable Finite Pause Trigger Digital Pulse Train Generation, Creating a Delayed, Retriggerable and Finite Pulse Generator, DAQmx - Retriggerable Pulse Train Generation - LabVIEW - CVI - ANSI C - VB.NET - C#.NET and Retriggerable Finite Pulse Train with Changing Pulse Specs.
    Let me know it helps
    Jaime Hoffiz
    National Instruments
    Product Expert
    Digital Multimeters and LCR Meters

  • Counte CMOS output pulse

    Hello,
    I'd like to know whether there are any couters which can count CMOS output pulse.
    The rating of CMOS pulse are:
    Output pulse: CMOS 5V
    Output pulse width: 10 ns
    (It is actually output from Hamamatsu C9744 photon counting unit)
    I have some PCI cards (6014 and 6110), but their counter logic is TTL, not CMOS.
    When the CMOS output is connected to a counter of these cards, the counter number
    increased, but this may not be a correct counting.
    If you have a good idea to count with NI products, please let me know.
    Thank you for your time and kind help.
    Hiro
    Solved!
    Go to Solution.

    Hey Hiro,
    The bottom line is that a TTL counter will be able to read from CMOS input, but not the other way around. Therefore, you are OK. This is mentioned in the last line of this link: http://digital.ni.com/public.nsf/allkb/5AB6172CAE2BEF3E8625629800597B3F?OpenDocument
    An explanation of the voltage thresholds associated with each standard can be found in the graph in this link:http://www.interfacebus.com/voltage_threshold.html
    The counters on your devices fall under TTL/CMOS standards, which can count a CMOS pulse input. Some general information about each standard can be found at this link: http://digital.ni.com/public.nsf/allkb/2D038D3AE1C35011862565A8005C5C63?OpenDocument
    Regards,
    Jeff L.
    Applications Engineer | National Instruments

  • Please help block my ipod touch second generation and forget the code, try putting the code so many times that now says connect to itunes, I connect but will not let me do anything that tells me this should unlock with key and I should do for Please help!

    please helpme i block my ipod touch second generation and forget the code, try putting the code so many times that now says connect to itunes, I connect but will not let me do anything that tells me this  should unlock with key and I should do for Please help!. thanks

    Place the iPOd in recovery mode and then restore. For recovery mode:
    iPhone and iPod touch: Unable to update or restore

  • I'm setting up my MacBook Air and it tells me to sign in with my apple ID but when I try to sign in it says there's a server error. What do I do? Do I try to skip the step?

    I'm setting up my MacBook Air and it tells me to sign in with my apple ID so that I can set up features like iTunes and iCloud and such but when I try to sign in it says there's a server error. What do I do? Do I try to skip the step? How can I fix this?

    The following previous discussion may help, in particular the last post (1/22/2014 by frankjet7): https://discussions.apple.com/message/21295536#21295536

  • I am unable to update my apps... in my purchases page it appears as "update", then a message tells me to log on with the Apple ID I purchased the app with... Well I have tried my two different accounts and neither one will work, can someone help ??

    I am unable to update my apps... in my purchases page it appears as "update", then a message tells me to log on with the Apple ID I purchased the app with... Well I have tried my two different accounts and neither one will work, can someone help ??
    And is there any way to sync all my purchases and accounts to just have one... It is a bit stupid that you dont even get a list of something of what account you may of used, or some kind of hint, so you could log on to the right account. I am really stuck ...
    Please Advise......

    You can't merge accounts. But you can check your purchase history:
    iTunes Store & Mac App Store: Seeing your purchase history and order numbers
              http://support.apple.com/kb/HT2727
    Also, what may seem stupid to you... may be a protection of privacy to others.

  • How can I tell if my problem is with iPhoto or if the SD card ?

    I'm trying to import photos from an SD card, and when I attach my camera (or insert the SD card - I've tried both ways),  iPhoto shows me thumbnails of the pictures, and tells me they are already imported.  But when I disconnect my camera, the photos aren't in iPhoto.  If I click on "Import Photos" nothing happens, although I get a message telling me to wait until the photos have finished importing, if I try to close iPhoto. 
    Is there a way to tell if my problem is with iPhoto, my iMac, or the SD card?

    As a Test:
    Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?
    Post back with the result.

  • I have just pre ordered the new iphone 5 it didn't give me an option to tell them what carrier im with? will it come with a nano sim?

    I pre ordered an iphone 5 this morning, (first time i have ordered from apple) it didn't give me an option to select a carrier? is this normal? will it come with a nano sim if it didn't let me tell them what carrier im with? i dont want to get my new phone and not be able to use it
    thank you.

    roncoe wrote:
    They've created a new SIM for this phone--the micro-SIM.  Different SIM tray and all.  If you ordered from Apple.com selecting the carrier was step two of the process.
    iPhone 5 confirmed to use nano-SIM, current SIMs not compatible.
    The "Micro SIM" is too large to fit in the iPhone 5.

  • My computer didn't reconize my ipod, it tell me I hav conect with another biblio,but I never put it in another computer.How I can't  lose all the game on my ipod because itune want to erase my ipod and sync.What I can save the game in my Ipod to computer

    My computer didn't reconize my ipod, It tell me I have syncr with a another biblio, but I nerver put it in another computer. How I can't lose all the game on my ipod because itune want to erase my ipod and sync, What I can do tosave

    My computer didn't reconize my ipod, It tell me I have syncr with a another biblio, but I nerver put it in another computer. How I can't lose all the game on my ipod because itune want to erase my ipod and sync, What I can do tosave

  • HT1386 I have a new computer. I have copied Itunes library from an external hard drive. Itunes now tells me I cannot sync with my Ipod as it thinks the 20gb on the computer are different to the 20gb on my Ipod touch! What have I done wrong? How can I fix

    I have a new computer. I have copied Itunes library from an external hard drive. Itunes now tells me I cannot sync with my Ipod as it thinks the 20gb on the computer are different to the 20gb on my Ipod touch! What have I done wrong? How can I fix it?  Alan

    See:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities
    Sync Your iOS Device with a New Computer Without Losing Data - How-To Geek

  • My iPhone 4S won't turn on it's been off for two days now. I tried charging it but it makes a noise every 8 seconds,holding the buttons down and also plugging it to a computer. I need help on what to do or if anybody can tell me what's wrong with my phone

    My iPhone 4S won't turn on it's been off for two days now. I tried charging it but it makes a noise every 8 seconds,holding the buttons down and also plugging it to a computer. I need help on what to do or if anybody can tell me what's wrong with my phone

    Yes ive tried a different charger and it also nothing shows when i plug it in just makes a noise

Maybe you are looking for