Pulse Train Generation using PCI-MIO-16E-4

I need to generate pulse trains of changing pulse widths using PCI-MIO-16E-4 daq card using Igor Pro.
I have tried to use the CTR functions (but always keep getting errors and it doesn't work). I also used the general purpose counters (GPCTR functions) but cannot visualise them on a CRO. If someone can help in regards to the programming aspect, it will be greatly appreciated.
Thanks
Vakul

Hi Vakul,
Some questions that might help me to get you a solution.
Are you using Traditional DAQ, or DAQmx and which versions are you using?
What operating system are you running?
When you say you can't visualize them on CRO, I assume that you are hooking the counter out to a cathode ray oscilloscope and can't see the pulse train?
Are you going to need more than two different pulse widths for your pulse train?
There are several online knowledge bases describing how to change the frequency of a pulse train on the fly.
This link explains how to use software to create a new pulse width.
http://digital.ni.com/public.nsf/websearch/7B1B0427C39FE33086256CEE00752133?OpenDocument
This link discusses using frequency shift keying, which will only allow you to have 2 different pulse widths.
http://digital.ni.com/public.nsf/websearch/EC1F089252F33B248625696E006FB6FC?OpenDocument
I assume that you are writing this program to compile in Igor Pro using C. I can help you with the C code development, but don't know anything about the Igor Pro API.
Please get back to me about those questions and let me know if you need further help.
Michael Denton

Similar Messages

  • Data acquisition and generation with PCI-MIO-16E-4 card help!!!!

    Hello,
    I'm using a PCI-MIO-16E-4 card with labview7 (in using DAQmx)and I
    would like to draw a frequency response.
    My problem is: my program can run correctly in low frequency but, it
    can't work correctly in high frequency (after 2KHz the signal is
    false).
    For verifying my program: I only try to generate and acquire a sweep
    sine. I constate after 2KHz the sine I read dosn't resemble to a sine
    I wrote.
    Can you say me where is the problem?
    Thank you.
    Le Trong Thao.

    "Dr. Imad" wrote in message news:<[email protected]>...
    > my understanding is that you are generating a sine wave (on one of the
    > anlogoutput channels) and you are trying to read the signal.
    > Since you can verify the signal at low frequency, but not at high
    > frequency, it looks like you should increase the scan rate of the data
    > acquistion (if you can, set it to 10 times the signal frequency)
    > You can also use an oscilloscope to verify the signal is what you
    > really generated.
    Thank you for your response.
    I've tried to do it, and I've tried several other possibilities but it
    doesn't work correctly.
    In fact, I think the problem is in my program. Do you have a program
    that works correctly? I f
    ound examples in the help but they don't run
    correctly.
    Le Trong Thao.

  • Varying ON time pulse train generation using NI cRIO-9073 and NI 9401 module

    Hi,
              I am a beginner to the Labview environment.  Am using NI cRIO-9073 and NI 9401 module; and NI Labview 2013. I want to generate 64 pulses, wherein the ON time of the pulses are varying as shown below. The Pulses need to have a constant period of about 34µs. The pulses should have a constant amplitude anywhere from 5 to 10V. I am trying to do the same in FPGA interface mode but failing to do so. Please advise me..... Please also suggest pdf and video resources to learn Labview programming.
    Pulse ON Time
    18 µs
    19 µs
    20 µs
    21 µs
    22 µs
    23 µs
    24 µs
    25 µs
    26 µs
    27 µs
    28 µs
    29 µs
    30 µs
    31 µs
    32 µs
    33 µs
    33 µs
    32 µs
    31 µs
    30 µs
    29 µs
    28 µs
    27 µs
    26 µs
    25 µs
    24 µs
    23 µs
    22 µs
    21 µs
    20 µs
    19 µs
    18 µs
    17 µs
    16 µs
    15 µs
    14 µs
    13 µs
    12 µs
    11 µs
    10 µs
    09 µs
    08 µs
    07 µs
    06 µs
    05 µs
    04 µs
    03 µs
    02 µs
    02 µs
    03 µs
    04 µs
    05 µs
    06 µs
    07 µs
    08 µs
    09 µs
    10 µs
    11 µs
    12 µs
    13 µs
    14 µs
    15 µs
    16 µs
    17 µs

    t81,
    It is possible to make frequency measurements with either the 9422 or the 9425 but each will have its own limitations in the range of frequency it will be able to accurately measure.  
    A few things to know:  
    1. What are the frequency ranges for each sensor (tach and MFM)? More than just knowing Hz/kHz will be helpful.
    2. To what accuracy do you need to measure these signals?
    The 9422 supports a specialty digital configuration counter input that can be configured for frequency measurement (see link)
    http://zone.ni.com/reference/en-XX/help/372603F-01​/riohelprt/crio-9422_rt/
    The specialty mode is only available when using Scan Interface mode, not with FPGA.  
    But the max clock rate in the specifications for the 9422 is 4kHz so this may not be sufficient for the tachometer.  I believe this is the max rate at which the module will update its state no matter how fast the underlying software (RT controller) is running.
    The 9425 has a higher clock rate (~140kHz) but doesn't support the specialty digital mode mentioned above.  It is also a software timed only device but this shouldn't be a problem if you use FPGA.
    Dan

  • I am trying to generate a 50kHz sine wave for ten cycles, then aquire this waveform and store it in a file, I am using a PCI-Mio 16E-4 board, has anyone done anything like this?

    I am trying to generate a 50kHz sine wave output on the DAQ card and then simultaneously recieve. I am using a PCI-Mio 16E-4 series board to do this. Has anyone done anything similar. I can generate a 50k wave no problem, and recieve one, but I can not get these vis to run together? Any suggestiosn

    Jrod, yes you should be able to do this, actually there are quite a few example programs come with LabVIEW that handles simultaneous analog input and output, I check the specs of the board you use, the board should be able to handle the sampling/generation rate, but make sure for 50KHz sine wave, you would sample at least twice as fast, preferably ten times the generation rate, then this puts the sampling of the board to thew limit.
    The program you can try is attached here, good luck with the application,
    XD Gao
    Applications Engineering,
    National Instruments
    Attachments:
    Simul_AIAO_Buffer(E-series).vi ‏104 KB

  • Inputing TTL pulses to NI-PCI-MIO​-16E-1 via BNC-2110

    I need to count TTL pulses coming from photomultiplying tube (PMT) module. Can someone tell me, please, how do I connect BNC cable from PMT module to NI PCI-MIO 16E-1 DAQ board via BNC-2110 adapter?
    thanks a lot in advance

    Hello Photon Guy,
    Thank you for contacting National Instruments.
    I have attached an image which shows how to connect the USER 1 BNC and USER 2 BNC connectors to the proper PFI pins which serve as the source of counter 0 and counter 1. You should only need to use one counter to count edges.
    Regards,
    Bill B
    Applications Engineer
    National Instruments
    Attachments:
    BNC-2110.JPG ‏105 KB

  • Is it possible to start a PCI4472 and a PCI-MIO-16E-1 simultaneously using an analog trigger (with pre-trigger)?

    I would like to start several PCI 4472 and a PCI-MIO-16E-1 simultaneously. All boards are connected via a RTSI cable.
    My program works fine if I use software trigger, or an analog trigger from a PCI4472 channel. However, the analog trigger works only when I set pre-trigger (or pre-scan) to 0.
    Is it possible to start a PCI4472 and a PCI-MIO-16E-1 simultaneously using an analog trigger (with pre-trigger)?
    Thanks.
    Ian Ren

    Hi, Bill
    I think it is possible to set more than 38 pre-trigger scans on a single 4472 card. I've done this before. You can verify this by running the Labview example "Acquire N - Multi-Analog Hardware Trig.vi" which comes with LabView.
    What I try to do but without success/luck so far is to start data acquisitions of several 4472 cards and a PCI-MIO-16E-1 card using an anlog trigger (with pre-trigger).
    Thanks for your help.
    Ian

  • Can I use multiple PCI-MIO-16E-1 cards under NT 4.0 SR3, LV 5.1, & NI-DAQ 6.5.1?

    We have not been able to run multiple AT-MIO-16E-3 cards with NT 4.0, because (partly) the cards & NT are not PNP. Will changing to the PCI-MIO-16E-1 &/or PCI-6071E (64 channel version) allow us to simultaneously run multiple (same type) MIO cards on the same computer? We want to use one card to interface to SCXI, & it appears that the PCI version uses the same cables/connectors as the AT series.

    Hello;
    The PCI version of the e-series boards have pretty much the same features of the ISA version, the only difference is the bus.
    So, you should be able to use the same acessories as you use with the AT boards.
    Anyway, you can still try to install the AT boards with NT. The following link is a good step by step installation guide with some troubleshooting hints also. You just need to select the board and OS you are working at.
    http://www.ni.com/support/daq/
    Hope this helps.
    Filipe

  • Need to unreserve a counter in a finite pulse train generation

    Hi. Let´s introduce my application first: I´m trying to generate a N-pulse train with the M series PCI-6221, in order to achieve a high frequency clock for an SSI transducer. That´s why i can´t use a software generation (because of the high frequency) and i have to use a finite pulse train. Besides, I would need to use another counter for a variable and finite count (but not simultaneously). The problem is that, as i think i have understood, this finite pulse train involves the two counters working together, so I can´t programm another task with that resources.
    My question is, Is there any way to do the finite pulse train generation, unreserve the counters, wait for a finite count to finish and so on?
    Thanks.

    Hello,
    My knowledges tell me that you need two counter to generate a finite pulse train.
    The first counter generates a pulsed of desired width and the second counter generates the pulse train which is gated by the pulse of the first counter (Counter 0=Pulse Generation, Counter 1=Pulse train generation).
    However, the finite pulse train generation and the continuous pulse train generation seem similar. The key difference is the generation mode from continuous to finite and the use fo a DAQmx Wait Until Done vi instead of a loop to monitor user input. From a point of view of the hardware there is a difference between the two. Continuous pulse train generation requires only 1 COUNTER.
    Maybe you can try with a continuous pulse train generation and with this method you have another counter to do a finite count.
    Regards
    DiegoM.

  • Two retriggerable pulse generations after a pulse train generation

    I am trying to generate 3 pulse trains (ABCABCABC...) one after another.
    The program currently I am using generates 2 pulse trains (ABABAB.....).
    I am using the Traditional NI-DAQ and PCI-6602.
    I am thinking about using pulse train generation first and then retriggerable pulse generation after that.
    I understand that the retriggerable pulse generation can generate a pulse train triggered (or gated) by other counter output.
    I have attached a test vi.
    It uses the pulse train generation code when the counter number is 0 and when the counter number is not 0, then it uses the retriggerable pulse generation code, which I tried to modify from the pulse train generation code.
    First of all, I am not sure if I wrote the retriggerable pulse generation code correctly.
    Secondly, I don't know if the whole code will generate ABCABCABC...
    I would really appreciate your help.
    pchemjjang

    pchemjjang,
    I believe I may have misunderstood your original concern.  It sounds like you want to output this finite pulse train on three different counters.  You will output these pulse trains for 10 minutes and cease your program.  The Finite Pulse Train.vi will output a pulse train from only one counter.  With this Traditional DAQ example you would need to have three of these Finite Pulse Train.vi programs running simultaneously in parallel to output from 3 counters.  I would strongly recommend using DAQmx for this application because you will only need to utilize 4 VIs.  The rest of the work is done behind the scenes.  There is an example in DAQmx which should accomplish exactly what you are looking for in one program.  You must make sure to make the number of pulses 2000000, the duty cycle as 1/3 and the frequency as 1/(300us).  The DAQmx driver can found here.  In terms of the counters, I believe that each task requiring two counters will use the counter adjacent to it.  If you would like to output on counter 0 using finite generation then counter 1 will be used as the gating counter.  When you have the DAQmx driver then you can find this example by selecting Help>>Find Examples and then expanding Hardware Input and Output>>DAQmx>>Generating Digital Pulses>>Gen Dig Pulse Train-Finite.vi.  I have included an image to show how the front panel of this example should be configured to work.  The major note to make is that you will need to configure all of the counters in the channel names list.  In Traditional DAQ this did not seem possible.  In Traditional DAQ you would need to create a subvi out of the Finite Pulse Train.vi run three copies of it, in parallel, in a larger program.  Please let me know if you will be able to utilize DAQmx in this application.     
    Thanks,
    Gio L.
    Digital Support - Product Manager
    National Instruments
    Attachments:
    Counteroutput.jpg ‏49 KB

  • Pulse train generation with better precision

    I was wondering if there is a way to generate a pulse train with a width that is less than 2 milliseconds using labwindows 7.0 and a PCI-6602, I need more precision.
    Derek

    I use LabVIEW, not LabWindows, but I know that the 6602 device can certainly generate a pulse train with a width of way less than 2 msec. Way less than 2 microsec even. As low as 25 nanosec in fact.
    Aren't there any shipping examples for pulse train generation? If not, there's a few in the Dev Zone example library you could modify. Here's a link: Pulse Generation examples
    -Kevin P.

  • How can I wire two PWM outputs of Accelerometer into PCI-MIO-16E boad with SC-2043-SG?

    I have been using counter/timer pin since the accelerometer (ADXL202AE, Analog Device) provides about 550Hz PWM signal. The purpose of the project is:
    - To acquire PWM signals with Full cycle(ms) and Posity duty cycle(ms) generated in Accelerometer.
    - To convert the cycles into acceleration value.
    By using counte/timer(GPCTR0_Source) and Trigger(Trig1) on SC-2043-SG board, the signal was obtained.
    However, after converting the PWM signal to acceleration value and plotting with labview on-line, the sampling rate was pretty low (26-28samples/sec).
    Then, I began to doubt that there is a wrong wire connection. Even though I am using one counter/timer pin, the sampling rate
    was low. The purpose of using the acceleration was to obtain two output using two counter/timer pins.
    Could anyone help me wire pins and solve the problem?
    GINO.

    Gino,
    You should definitely be getting many more values in your buffer. You should actually be getting 500,000 values every second because a measurement is being taken for every pulse. I found a couple knowledgebases that describe error -10920 and how to remedy it. One is pasted below and the other can be found through the link.
    But I'm not sure if you're going to be able to fix this problem because you're measuring pulses at a very high rate. What is happening is every time a pulse width measurement is taken it is put into an onboard (DAQ board) FIFO buffer that is 9 samples long. The computer then reads these samples out of the FIFO and into an a buffer that you can see in LabVIEW. I think the FIFO is filling up too fast and the computer is not able to read the data out fast enough. Therefore you are losing samples because they are being overwritten. This is all dependent on your system.
    Here are some benchmarks for pulse measurements:
    The following numbers were derived from a Gateway with 128 MB-RAM and an Athlon 700 for ONE counter of the PCI-6602. The number of counters you are using will affect these numbers.
    Finite Buffer
    Buff Period - 7.25 MHz
    Buff Pulse Width - 7.25 MHz
    Buff Semi-Period - 3.35 MHz
    Continuous Buffer
    Buff Period - 250 kHz
    Buff Pulse Width - 250 kHz
    Buff Semi-Period - 140 kHz
    You should still be getting many more samples than 26 though. Try using this example with a very slow frequency pulse to make sure it operates correctly. Then start speeding up the pulse and determine when you get error -10920.
    Here is an internal knowledgebase that may help you:
    Title:
    After Long Periods of Acquisition with AI and Counters, a -10920 Error Occurs
    Problem:
    A customer has a PCI-MIO-16E-4 and his application is acquiring analog input signals and performing event counting with the buffered event counting mode. The problem is that the buffered event counting is at some arbitrary amount of time (e.g., after 2 days) getting an error with the number -10920. The questions are:
    1. Why is he getting this error?
    2. Do you know how big the FIFO is for this buffered event counting?
    3. When he shares a DMA channel with the floppy controller, how can we make sure they use separate DMA channels?
    Solution :
    Here are the answers to the above questions:
    1. There is probably just some noise on the signal line coming in at some point. The STC is VERY sensitive, so if there is any fast glitching, it will attempt to transfer all of these. This can also happen if the signal does not ramp up fast enough, resulting in double-triggering in the middle region. Use a filter, or a Schmidt trigger*, to clean up the signals. Another suggestion is to use the PCI-6602 with filtering.
    2. There is no FIFO used for the counters. The mMite has its own FIFO, but it is only about 9 samples long.
    3. PCI does not "share" DMA channels. It may technically be the same DMA channel number, but this is just for reference. PCI cards use Bus Mastering. With Bus Mastering, the operating system gives up control of the PCI bus so that the hardware (in this case, our DAQ board) can handle its own data streaming, eliminating the extra step of having the OS monitor the transfers. The DMA channel numbers are just the "channels" that are supported by the mMite chip. You can have 3 PCI cards in the PC, each with DMA 1, 2, 3, and none of them will actually be sharing any resources.
    And another knowledgebase about error -10920
    http://digital.ni.com/public.nsf/websearch/8FB9091CB9BB452B8525642000554799?OpenDocument
    Hopefully this all helps,
    Erick D.
    NI Applications Engineer

  • Position encoder works with PCI-MIO-16E-4 but not with PCI-6062E, why?

    I am using A BNC-2090 to connect Agilent HEDS-6540 position encoder to my PCI-6052E. The application works fine with my 12 bit NI card PCI-MIO-16E-4, But with the new card I get extra counts in my position. ex 1052 pulses when it is only supposed to be 1000 counts in a complete revolution. This setup still works great with the old card, meaning I can just plug into the other card and run the same app on the same computer, just a different device number. I have not been able to figure this out.

    You might be seeing the affects of dithing with your signal. I'm not sure why it would be on one board, though not the other, one counter must be more sensitive. Anyway, dithering is caused by vibration or other outside forces that cause small glitches that add to the count total for the counter. There is a way around this, and that is to use a counte convertor. There is a page on this website that tells how to make one. The link is below. I would sugget trying this to see if it will fix the problem.
    Brian
    http://zone.ni.com/devzone/conceptd.nsf/2d17d611efb58b22862567a9006ffe76/6f25cba2cd73417786256869005e5fc3?OpenDocument

  • Pulse train generation fails with certain values for "number of samples"

    I'm generating a retriggerable analog output signal, and so I'm using a counter as the sample clock (see: Retriggerable AI Using Retriggerable Counter). I am finding that, above a certain number of samples, and only for certain values of the number of samples, the counter task gives me error -200305, "Desired finite pulse train generation is not possibe." The error crops up only when actually starting the task.
    The analog signal that I'm trying to generate will be about 800 kHz, so my counter is set to run at the same frequency. I find that the counter task works fine if the number of samples to generate is anywhere between zero and 671,088 samples. Setting the number of samples to 671,089 gives the error above, as does 671,090 samples and so on. However, using 671,096, the counter task works fine. After that, the counter seems to output fine only if the number of samples is divisible by 8.
    The only thing I can think of is that (617088 samples) / (800000 Hz) = 0.839 s. At the internal clock rate of 20 MHz, 0.839 s is 2^24 samples, and it is a 24-bit counter on this hardware. So if it's this internal counter rolling over, that's fine and I can work around that. But if that's the case, what I don't understand is why increasing the number of samples in increments of 8 samples still works.
    The hardware is a PXI-6733 board, running with LabView 7.1.1 and NI-DAQmx 8.1.

    Hmmm,  multiples of 50 & 100?  Now I'm puzzled again.
    Here's how to make sense of the 100 kHz timebase idea though, even if it turns out not to be the right explanation.  For a retriggerable finite pulse train, you actually use a pair of counters.  If you were to program it manually, you could set your output counter to generate a continuous pulsetrain at 800 kHz using the internal 20 MHz timebase.  This output counter would also be configured to use the other counter's output as a digital level-based pause trigger.  So the 800 kHz pulsetrain is only output while the other counter's output is, say, high.
    The other counter is configured for retriggerable pulse generation.  The pulse duration or high time should be set for (# pulses) / (800e3 pulses/sec).  This other counter can be configured to use the 100 kHz timebase, so its high time would then have to be an integer multiple of 10 usec.
    So let's see...  An 800 kHz pulsetrain is possible with a 20 MHz timebase (exactly 25 cycles).  A 700 kHz (28 + 4/7 cycles) or 900 kHz (22 + 2/9 cycles) is not.  So when you request those other frequencies, you actually get a near approximation.  I dunno if DAQmx can be queried for the actual value correctly or not -- I recall an early version that reported back whatever freq you had asked for rather than what it actually used.  Queries based on ticks (rather than time or freq) did return what was actually used, as I recall.
    Let's suppose a request for 700 kHz gets truncated to 28 cycles of the 20 MHz timebase making a 1.4 usec period.  Then 50 of those periods becomes 70 usec, which is evenly divisible by the 100 kHz timebase.  Bingo!  (Note: 70 is the least common multiple of 10 and 1.4)
    Now suppose the request for 900 kHz turns into 22 cycles of the 20 MHz timebase, or a 1.1 usec period.  Now it takes 100 of those periods to get to 110 usec, which is also evenly divisible by the 100 kHz timebase.  Bingo again!  (Note: 110 is the lcm of 10 and 1.1).
    Did you follow the method here?  It should help you figure out expected results for various output freqs and #'s of samples.
    -Kevin P.

  • Question about setup_MITE in the PCI-MIO-16E-1

    I have a quick question about setup_MITE in the PCI-MIO-16E-1. In one of the manuals, it states that if you're using Dell Optiplex GX series for our hardware configuration, is it true we need to re-write the MITE functions to correlate with the hardware? Please if you can clarify what this means, I would really appreciate it. Thank you in advance.

    National Instruments is starting a new newsgroup to provide a forum for customers to discuss register level programming issues and ask questions. This newsgroup is not a direct support channel for register level programming, but may be monitored by National Instruments engineers. Please post you question with additional detail in:
    natinst.public.daq.driver-development.general
    Christian
    Christian Loew, CLA
    Principal Systems Engineer, National Instruments
    Please tip your answer providers with kudos.
    Any attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system,
    or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject
    to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

  • Finite pulse train generation?

    i am trying to generate a very specific pulse with my tio-6602 in labwindows. after a 20us delay, i want the board to generate 20 pulses, with a width of 1 us and an interval of 5us. ideally, this would be retriggerable at 100 Hz. any suggestions on what would be the best way to approach this problem?

    Paco,
    You can use a gated pulse train, which is similar to finite pulse train generation. With finite pulse train generation, you have one pulse for the gate of a counter set to generate a pulse train. The pulse train will only be output based on the gate, so if one pulse appears, you have a finite pulse train. Now, if you make the gate be a pulse train itself, then you can continuously output bursts of pulses. For instance, you can set it up such that the pulses are output when the gate is high. When the gate is low, the counter pulses would pause and when the gate resumes to the high states, your pulses would continue. I've attached a code excerpt for using NI-DAQ function calls to generate a finite pulse train that is in our database. I will see abo
    ut getting it put onto the http://www.ni.com/support pages. You can also find more information about the function calls used by referencing the NI-DAQ Help file installed with the NI-DAQ driver software and with the NI-DAQ User Manual, which is available at the web pages.
    Regards,
    Geneva L.
    Applications Engineering
    National Instruments
    http://www.ni.com/ask
    Attachments:
    finitepulsetrain.txt ‏2 KB

Maybe you are looking for

  • Must be a better way...

    Hello Flash Community! Thanks in advance for any help/advice. So, what I'm looking for here is some high level advice as far as a better way to do things. I feel like so often with programming I'm just breaking my neck to get things working when I kn

  • How can I cancel my order for extra ICloud storage space?

    How can I cancel my order for extra ICloud storage space? I don't need it afterall...

  • How to find Classes to which characterstics are assigned

    Hi, How to find the classes to which a particular characterstics  are assighned in 46B. I have characterstics and I should able to find the class/classes to which it is assighned. I have a BAPI BAPI_CHARACT_GETWHEREUSEDLIST which does the same as in

  • Compare veersion

    Hi,    Compare versions between 4.7 version and ECC 6.0 version.     Please provide me advantages.     Thanks & regards         vvvvrrr

  • Automatic external batch number assignment

    Hi gurus, I'm facing to an huge issue. I've created an subcontracting PO. Into this PO, I have inserted a external batch number to a component. When I make a good receipt with MB0A transaction. movement type 101 for the finished product and movement