USB 6211 DAQ counter

I am using the circuit and labview program found on the following link and I would like to use a USB 6211 DAQ.  I have noticed that the ctr0 and ctr1 both have multiple pins on the DAQ.  The circuit diagram says to connect one to "out" and the other to "gate".  Do I have to initialize anything or declare what pin i am using, or can i just wire to the "out" and "gate" pins for the respective counters and run the program?  
http://decibel.ni.com/content/docs/DOC-8665

Hey,
At the DAQmx Create Channel.vi you declare what counter you are using with the Physical Channel Input.
E.g.  you specify Dev1/ctr0 then you have to take CTR0 Out or Gate or Source, depending on the Task.
Christian 

Similar Messages

  • NI USb 6211 DAQ to get a signal inside the computer

    I am using Ni USb6211 DAQ to get a signal inside the computer, but the signal displayed as blocks of samples and I need contiuous signal display, I mean instance signal. Could you please help me?

    They are medical signals and the synchonization is important.
    I have experience in Labview enough to finish my work. Thank you for your time and you do not have to solve.
    Attachments:
    ECG & Pulse oximetry.vi ‏388 KB

  • Usb 6211 low pass filter c

    I have a USB-6211 DAQ and am looking to add a lowpass filter at 1Hz. The code below shows my current implimentation however I am not sure what I am doing incorrectly as the filter is not being applied.
    DAQmxSetAILowpassEnable(task_handle_, channel.c_str(), true);
    DAQmxSetAILowpassCutoffFreq(task_handle_, channel.c_str(), 1);
    // where:
    // channel = "Dev1/ai0:5"
    // task handle is being set via:
    // DAQmxErrChk(DAQmxCreateTask("", &task_handle_));
    // and started via:
    // DAQmxErrChk(DAQmxStartTask(task_handle_));
    The current order I am using is:
      - Create task
      - CreateAIVoltageChan
      - CfgSampClkTiming
      - RegisterEveryNSampleEvent
      ** SetAILowpassEnable
      ** SetAILowpassCutoffFreq
      - StartTask

    How might I approach this then in software? Do I have access somehow to C functions as part of the Digital Filter Design Toolkit?

  • USB-6211 - Getting Error 50103 when attempting to use two counter method

    I am using a USB-6211 and want to measure the speed of a motor by counting pulses coming back from sensors on the motor. Speed will vary from 0 to about 5k Hz.
    My strategy is to use "Method 2" in the manual to measure using two counters.  To do this I am attempting to generate pulses of known duration with Counter 0, route these pulses to the gate of Counter 1, send the motor pulses into the source of the counter1 and letting the counter determine and report the number of pulses that occur during the "gate time".
    To get the pulse generator going at 8,333 Hz I do this:
    AGniDAQmx_CreateTask(instrHandle,"TimingPulses, Task_Handle8)
    AGniDAQmx_CreateCOPulseChanFreq(instrHandle, Task_Handle8,"Dev1/Ctr0","Out",DAQmx_Val_Hz,0,8.333,0.5)
    AGniDAQmx_CfgImplicitTiming(instHandle, Task_Handle8, DAQmx_ValContStamps,1000)
    AGniDAQmx_StartTask(instrHandle, Task_Handle8)
    This works fine.  (By the way, I do stop and clear the task before exiting.)
    Now I add this code in a new task to try to use the Counter0 pulses to measure the input pulses with Counter1.
    AGniDAQmx_CreateTask(instrHandle,"MotorPulses, Task_Handle5)
    AGniDAQmx_CreateCIFreqChan(instrHandle,Task_Handle5,"Dev/ctr1",MotorPulses,0,10k,DAQmx_Val_Hz,DAQmx_Val_Rising,DAQmx_ValHighFreq2Ctr,0.12,10,"")
    AGniDAQmx_ReadCounterScalarU32(instrHandle,Task_Handle5,10,E)
    AGniDAQmx_ClearTask(instrHandle,Task_Handle5)
    This function fails on the CreateCIFreqChan() call with an DAQMXError 50103.
    Apparently Counter1 resources are being tied up by Counter0.  Is this true?
    Any suggestions?
    Thanks,
    -CBJohnson

    Hi Mallori,
    Thanks for the great reply message.  I do appreciate your help.
    Yes, I think you understand my application.  The motor can turn from zero to about 5K RPM and one pulse is generated with each turn of the motor.
    This application is using Agilent VEE but the statements are "C-like" so that's why I posted them like that.  I can't "cut-and-paste" directly from the VEE statements and I have to type them.  I mis-typed the Implicit Timing statement.  It was missing an "_".  It should have been:
    AGniDAQmx_CfgImplicitTiming(instrHandle,Task_Handle8,DAQmx_Val_ContStamps,1000)
    I think I understand what you are saying about DAQmx_Val_HighFreq2Ctr using the resources from both counters  That explains why I get the message about resources not being available.  
    I have tried to use Counter Method 1 and it *almost* worked.  A problem comes about when the motor speed is zero (stopped) and, since these motor pulses are being fed into the Gate of the counter, the zero value makes it simply time out.  Increasing the timeout value to infinite (-1) makes the entire program hang.  I need it to go on -- looking for other user input, reporting other data being collected, etc. If the counter is waiting for the Gate signal to rise to start counting and to drop to stop counting and do the calculation, it will not work since it just times out.  I went to this counter method (actually called counter method 3 in the DAQ manual) because then I am trying to generate the pulses of known period and send these pulses to the Gate.  Then I am feeding my pulses into the Source of the counter and letting it determine how many pulses occured during the "gate time".  In this case, zero pulses during the "gate time" should be OK; it should simply report that zero pulses were detected and start counting again on the next rise of the Gate pulse.  I thought I could simpy adjust the length the "gate time" to measure my range of frequencies.
    Make sense?  Any way to do this with the two counters of the USB-6211?
    Thanks, Mallori,
    -Craig

  • Externally controlled counter direction with USB-6211

    I am using a USB-6211 and created a simple read counter application with the DAQ Assistant. It counts pulses (1 sample on demand) on Counter 0 (PFI0). When I set Direction to Externally Contolled it does not work properly. It counts random up and down. According to the manual my direction input line is Ctr 0 B (PFI1), but the level of this pin has no effect. What am I doing wrong?

    Hello Steffan,
    According to the following Knowledge Base you have cannot use the default settings wehn trying to externaly control the direction of the counter:
    http://digital.ni.com/public.nsf/allkb/1A8818274130FA388625722E00760CC9?OpenDocument
    Since these changes cannot be done in the DAQ assistant you have to use the DAQmx API to resolve this. I have attached a small example that does a simple event count on the source pin of counter 0 (which is also the A input of the counter). With a property node I have set the Counter Direction input terminal to PFI 1 (which is the B input). Now when the PFI 1 is low you will count up, when it is high you will count down.
    hope this helps,
    Regards,
    RikP - National Instruments Applications Engineering
    Message Edited by RikP on 06-05-2008 10:12 AM
    Rik Prins, CLD
    Applications Engineering Specialist Northern Europe, 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
    Attachments:
    Count Digital Events Up-Down USB-621x.vi ‏33 KB

  • USB 6211 Counter

    Hi.  Does anyone know how I can drive a 0-12V PWM device with the 6211?  How can I control the frequency of the pulse?
    Thanks!

    Hi Seascan, 
    What type of application are you working with in regards to PWM and this device?  The 6211 does not support hardware timing, therefore the duty cycle/frequency will update as fast as the processor can handle or execute.  There was a similar question on using PWM with the USB-6211 on a previous forum.  Have a look at it here and if you have any further questions please let me know.  
    http://forums.ni.com/t5/Counter-Timer/NI-DAQmx-M-Series-Pulse-Width-Modulation-PWM-not-working-with/...
    Regards,
    Ben N.
    Applications Engineering
    ni.com/support

  • Usage of DAQ USB-6211 with Sound and Vibration Measuremen​t Suite

    Hi,
    Could I use DAQ USB-6211 with Sound and Vibration Measurement Suite ? All examples are based on 24-bit devices (usually with IEPE-on) such as NI 9234 or similar.
    I don't need IEPE, 16 bit is sufficient for my dynamic range, could leave without simultaneous sampling - so 6211 (that I have) is OK for me.
    Actually I'm interested in S&V Toolkit ( or Measurement Suite) as a tool with some specific Signal processing capabilities (for example, short-time FFT etc.)
    Thanks in advance

    Hi sgabr,
    Yes, you can use the 6211 with some of the Sound and Vibration VIs, including most of the FFT functions.  I know that's a little vague -- I don't have a list of which functions do or do not support 16-bit devices, but I did test it out on my system this afternoon.  If there are specific functions or examples you'd like to know about, let me know, and I will try them out.
    You also have the option to download the evaluation version of the Sound and Vibration Measurement Suite.  That way, you can test drive it yourself!
    Kyle B  |  Product Support Engineer  |  ni.com/support

  • Change counter input USB-6211

    Situation:  I have 3 signals I want to measure using counters on my USB-6211.  Since the 6211 only has 2 counters I was planning to measure them seperately and just switch which PFI was the input depending on which signal I wanted to measure.  However, when running the VI only PFI0 and PFI2 detect anything.  If I connect to any other PFI the Read times out.
    From other forum posts and my Device routes in NI MAX it says I should be able to internally route PFI0-3 to any of the CTR inputs so what am I missing here?
    Thanks!
    Wyatt
    Attachments:
    basic counter example.vi ‏18 KB

    This is no longer an issue. I copied the code into my main VI and created a new SubVI and it is now functioning properly... not sure what changed when I copied it though.

  • How to send TTL output AND acquire AI voltage data using USB-6211

    Hello,
    I am relatively new to Labview, so please bear with me.  I have a research application involving 2 pressure transducers and a high-speed camera.  I wish to acquire analog voltage data from the 2 pressure transducers.  However, at the start of the acquisition, I will need to send a single TTL output to trigger the camera.  This TTL pulse must be sent out at exactly the same time that the AI acquisition begins, in order to ensure that my 2 pressure measurements and camera images are 'synchronized' in time.
    Is this possible on the USB-6211 running with LabView 8.20?  I currently have a fairly simple LabVIEW vi that uses a software trigger to start an AI acquisition - I have attached it with hopes that it may help anyone willing to assist me.  I would prefer to be able to simply add something to it so that it will output a TTL pulse at the start of the acquisition.  
    Thank you in advance.
    Regards, Larry
    Message Edited by Larry_6211 on 12-19-2008 11:24 AM
    Attachments:
    USB6211_v1.vi ‏212 KB

    Hi All,
    I'd like to clear a few things up. First, you'll find that if you try to set the delay from ai start trigger and delay from ai sample clock to 0, you'll get an error. Due to hardware synchronization and delays, the min you can set is two. Note that when I say two, I am referring to two tick of the AI Sample clock timebase, which for most acquisitions is the 20MHz timebase. I modified a shipping example so you can play around with those delays if you want to - I find that exporting the signals and looking at them with a scope helps me visualize what is going on. The Manual has some good timing diagrams as well but it looks like you've already hit that. The defaults would give you a delay of  250ns from the start trigger - is this too high for your situation? What is an acceptable delay? I tend to think that "exactly the same time" is a measure of how precise rather than an absolute (think delays in cable length making a difference.)
    With all that in mind, I see a few options:
    Start your camera off of the AI start trigger (an internal signal) and just know it is 250 ns before your first convert. 
    Export the convert clock to use as a trigger. This assumes your camera can ignore the next set of convert clocks.
    More complicated option: Internally you have an ai start trigger, sample clock and convert clock. From your start trigger to the first convert is 250ns but if you export your convert clock you're going to get future convert clocks as well. One option would be to generate a single triggered pulse using a counter (start with the  Gen Dig Pulse-Dig Start.vi example) with the AI start trigger as the trigger for the counter, an initial delay of 250 ns, and a high time of whatever you want it to be. This should give you a singe pulse at very close to same time (on the order of path delays) as your first convert clock. 
    Hope this helps, 
    Andrew S
    MIO DAQ Product Support Engineer
    Getting Started with NI-DAQmx
    Measurement Fundamentals
    Attachments:
    Acq&Graph Voltage-Int Clk.vi ‏37 KB

  • How to make ROD426 connected to USB-6211 work in Labview

    Hello
    I have a rotary encoder type Hadenhein ROD426 connected to a USB-6211 I/O modul.
    I need to make this work in Labview, so i can read the position for the rotary encoder by angle. I can't find anny tools in Labview that does this.
    Does annyone have anny tips?
    Gøran Steen

    Gsteen,
    There are some examples in LabVIEW's Example Finder (Help menu -> Find Examples...) that might help.  Try Hardware Input and Output -> DAQmx -> Counter Measurements -> Position.  These examples are usually a great place to start.  I looked at "Meas Angular Position-Buffered-Finite-Ext Clk.vi" which looks like it may be of help to you.  You can also limit the example finder to only find examples that pertain to your hardware (USB-6211) by configuring the "Hardware" dropdown in the lower left-hand corner of the example finder.  If you are browsing, check the "Requirements" list in the lower right-hand to see if a particular example works with your DAQ.
    -cb

  • Can you record sound using a USB 6211 and convert the data to a .wav (or other sound) file?

    Hello,
    I am trying to build a system that will use a USB 6211 to record sounds from multiple electret microphones and then save the data as a .wav file or other sound file.  I have already built my mics and hooked the mics up to the USB 6211; the DAQ device seems to do an adequate job recording the signal - I've recorded from 3 mics at a time at 11,025 Hz, although I don't know how good the signals are since I can't save them for playback after the fact, and they aren't going through my sound card. Ultimately, I would like to save the data as a multichannel audio file which I could then open in a program such as Audacity for further editing and analysis. Since Audacity can import a variety of sound files, my file format doesn't need to be .wav if another format would work better.
    Any advice would be appreciated.
    Thanks, Eric

    If you are sampling all three simultaneously, your highest frequency recordable will be (11,025/2)/3, so about 1800Hz and that will pretty coarse (traditionally digital sound recording is at 44Ks/s at the low end). As to converting to a .wav, there are functions on the "Graphics and Sound" palette for saving waveforms to a .wav file.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • How to use voltage signals as input signals into USB-6211

    Hello everyone,
    I have a USB-6211 and a PDQ80A -quadrant photo detectot from thorlabs, i am trying to take three voltage signals from the PDQ80A into my PC using USB-6211 from NI. THese voltage signals are X,Y and sum (X+Y).  
    Looking forward to your reply.
    Thanks in advance,
    _Perseus 

    Technically, the question was in the title.  But of course, the answer to that is... Connect them using WIRES.   It's designed for voltage signals, just wire your cell outputs to whatever DAQ input channels you're going to read.
    Using LabVIEW: 7.1.1, 8.5.1 & 2013

  • DAQ counter vi

    I'm using a DAQ USB-6008 to count the edges of a digital pulse. i need to calculate the frequency of these pulses but I can't do it using the period time because this device doesn't allow it (or so i'm told) I'm using a counter channel, and can successfully count the edges, but can't figure out how to change this into frequency? I've tried timed loops of 1 second long, to calculate the number of counts per second, but can't reset this value and therefore can only get one accurate result.
    Any help would be greatly apperciated!!!
    Thanks,
    Tom

    Hi Tom,
    I've attached a VI as an example.  This uses a shift register to come up with a frequency based on the counter input from the USB-6008 device.  Let me know if you need anything further or have any questions.
    tsc
    Attachments:
    CalcFrequencyExample.vi ‏37 KB

  • Trigger rearm time on USB 6211

    I am using a USB 6211 to generate raster waveform and digital trigger to drive the galvanormeter mirror. I just want to send one cycle of waveform for every trigger pulse. The problem is that it seems like the USB 6211 trigger rearm speed is limited to about 20 Hz, which is quite low. Is this correct?
    Any solution?
    Attachments:
    Triggering.png ‏76 KB

    I might use the wrong word to explain it. What I mean by observing the behavior of the device when it was programmed as shown in the code is that no matter how fast my triggering clock was, there seem to be a certain period of time when the device did not accept any trigger pluse. That period of time was about 50 ms or about 20 Hz clock rate. The code worked as I expected it to be at trigger frequency less than 20 Hz. As soon as the clock speed pass 20 Hz, the extra pulse was not accepted.
    One thing that I did to verify the 50 ms time limit was by sending 200 Hz of clockspeed and found that the one that close to 50 ms did trig the device.
    Is there any example how to setup this device to surpass that trigger speed?
    If not possible with the USB 6211, which DAQ device you would reccomend to achieve more than 100 Hz trigger speed, or even better for up to 200 Hz?
    Thanks for your response : )

  • How to measure frequency by USB 6211?

    Dear all,
    I'm using USB 6211 to measure the input analog voltage signal, then use a counter to yield the frequency. Please find the VI figure in the attachement.
    The problem is the insteal of measure the right frequency, which is from 300Hz to 1000Hz. There is a lot of high frequency noise from thousand to milliion Hz. I think it pick up the high frequency harmonics. How to avoid it or use a more effective way to achieve the measurements.
    Regards,
    Alan
    Attachments:
    flow rate frequency measurement.JPG ‏43 KB

    You have to suppress high frequencies on the analog side of your signal. You must set it to a frequency which is not higher than half of your aquisition rate. If you sample with 10 kHz your filter must have a cutoff frequency of max. 5 kHz. Otherwise you will see the signal mirrored at the half of the sample rate. A 6kHz signal will lead to a 4 kHz signal after the sampling.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

Maybe you are looking for

  • Counting files in a Flder

    Hi all, I have to count the number of files in a folder and their respectives name in it using flash.Is it possible to do it by JSFL. can anyone give me samples regarding this.thanks in advance. Regards, S.Hidayath

  • Hebrew language support in iPod nano

    Hi, I have an iPod nano but it cannot displaye Hebrew text. How can I fix this? I could not find an update on the site. Thanks, Yoni

  • Elements 10 - Organizer - Show on Map Missing?

    Just upgraded to Elements 10, and unlike Elements 9, I cannot seem to be able to "Show on Map" any photo's. Has this been removed, or is there some hidden option I have missed and need to turn on?

  • Wo ist Exposè?

    Hallo McUsers. Ich bin neu hier und weiss nicht welche Erfahrungen Ihr mit dem neuen Betriebssystem von Apple habt. Ich war mit Snowleopard sehr zufrieden. Als Viel-Fotografierer nutze ich unter iPhoto jedoch mehrere Mediatheken und habe daher nach e

  • BDC for Routing upload - CA01

    Dear all, I developed a BDC a program for uploading the routing with multiple line item but it gives some error. If anybody have any program on that pls provide? Routing BDC - CA01