Compact daq frequency measurement

hello,
I am considering using the compact DAQ NI cDAQ-9172 for my measurement and I want it to acquire frequency measurement. I have some analogue input, they are signal with noise. (A example is a measurement of a magnetic pick up)
I want to have a counter, I wuold use  the internal counter (5 / 6 slot) of the chassis ) NI cDAQ-917.
I am considering using the NI 9201, but I can utilize the internal counter with a analogue input module?
THANKS!!!!!!!!!!!!
 chiara.

thanks for your reply.  maybe i explained my situation incorrectly.
From the that sample freq program you showed me, i'm just using the numberic indicator for frequency only and not the other graphical displays (like the voltage and frequency spectrum).
In my original program, i already have a bunch of graphical displays measuring physical channel ai8 to ai12.
I wanted to see what frequency my ai12 channel as well as measure/display the voltage graphically.  I believe your saying that i can't measure both frequency and graphing at the same time on 1 channel?
What i did was I connect ai12 channel to ai13 and basically copied the the sample freq measure vi program to my original program to indicate frequency.
my orignal program has set the DAQmx reading ai8:ai12  to a analog 2D DBL multiple sampling.
but i noticed that the sample frequency measure program requires the DAXmx read.vi set to 1D waveform to measure frequency not 2D DBL like the rest of my program.  I think it is where this part i'm having problems with sampling all my inputs ai8 to ai13.
so when i copied the sample frequency measure program into my original program, it only runs one physical channel. Only the sample frequency program (ai13) or my other ai8 to ai12 graphs will work but not both at the same time.  It can't do all ai8:ai12 2D including the ai13 1D measurement continuously.
i dont think its possible to read in analog 1D and 2D measurements at the same time?
Thanks again.
Message Edited by immortalc on 01-04-2008 10:02 AM

Similar Messages

  • DAQ frequency measurement using anolog input channel

    Hello,
    I try to develop a DAQ application which run on a real time target.
    I want to measure frequency using anolo inpur channel of my DAQ card. I have a problem.
    Let me first try to explain what i trying to do. In the first loop i do sampling and show the result as double array.
    I need to show samples as double array so i can not read sample as waveform. With a shared variable i sent these samples to second loop.
    First loop reriod is msec and second loops period is 20 msec.So when the second loop run, 20 samples were alraady ready, frequency measurement is done.
    The problem is that i need to show frequency measurement as far as possible. Say frequency of my signal is about 100 hz, then this
    configuration gives correct frequency measurement. But if frequency of the signal is about 10 hz, this configuration fails since period of second loop is 10 msec and it is not enough time to measure a 10 hz signal. But if i adjust period of the second loop as 100msec,
    then i can measure 10 hz signal but then i can give measurement of a 100 hz signal  +90msec late. What can i do so i can measure frequency af signals ranges 0-100hz and give measurement result as far as possible?
    Attachments:
    measure_amp_freq.GIF ‏35 KB

    eesen,
    What you are doing doesn't make any sense to me. First of all, you should take multiple samples with the DAQmx Read and not one sample at time with the timed loop. Your frequency measurement will then actually be more accurate. You also should return a waveform. That includes timing information that the Freq & Amp function needs to determine the frequency. It cannot do it with a dbl array. If you have to display a dbl, then just use the Get Waveform Components to extract the y array. You can get rid of the second timed loop and use a regular loop for the DAQmx Read. If you just set the rate to be twice the highest input frequency and acquire enough samples for a couple of cycles, you should have a pretty accurate reading.

  • 6602: How to use 8 counters simultaneously in C++ using traditional Daq for frequency measurement

    Hi Everybody;
    I'm new to Ni-DAQ cards and working on NI PCI-6602 Card in Borland C++, I should use Traditional DAQ for my project. Now I want to use all the 8 counters simultaneously for frequency measurement.
    1.Where should I connect my External signal, to source or gate, at present I have connected to source.
    2. How to set parameters and start the counters simultaneously, what are the parameters to be set for frequency measurement.
    3.How to start counting.(parameter settings)
    4.Should I set any PFI Lines or by default are they set to counters.
    status = GPCTR_Set_Application (1, gpctrNum, ND_SIMPLE_EVENT_CNT)
    status = GPCTR_Change_Parameter (1, gpctrNum, paramID, paramValue)
    iStatus = GPCTR_Watch(1, gpctrNum, ND_ARMED, entityValue);
    status = GPCTR_Watch (deviceNumber, gpctrNum,ND_COUNT, entityValue)
    what is the paramID in my case, Clear and appropriate answers would be very helpful and thanks in advance.
    Message Edited by Pavan K on 07-11-2009 12:38 AM

      I have made a program with LabVIEW 5.1 based on NI 6602, in which four counters were used.
      Counter 3 is used to generate pulses, which are directed to the gates of counter 0, 1 and 2. 
      The source terminals of counter 0,1 and 2 receive pulses, individually, to count how many pulses appear during the time interval of each gate pulse.
      The results are stored in a data file.
      In order to test its performance, only one signal of ramdom pulses is sent to counter 0,1 and 2.
      But I find that at the beginning the counts for the three counters are the same, but the following counts are totally different!
      What's wrong? And how to solve such a problem? Does it have something related with synchronization?
      Thank you very much!

  • Compact daq (Error for long time measurement)

    I have a trouble when I use the NI9215 (analog input module of the compact DAQ).
    When it was kept sampling for more than 20 seconds, I got a error message from labview.
    For example, it is operated at the sampling frequency, 10 kHz, and try to get more than 200 kS, namely it takes 20 s, error messagy popped up in the labview program. In the labview program, I use a DAQ assistant, which is connected to DAQ mx read.
    Please give me some advice. Thanks.

    Post the message will be helpful, this can help determine if it is a buffer overflow, timeout, improper property memory leak...
    Paul
    Paul Falkenstein
    Coleman Technologies Inc.
    CLA, CPI, AIA-Vision
    Labview 4.0- 2013, RT, Vision, FPGA

  • Compact DAQ Data Acquisition

    Hello,
    I am working on data acquisition project using Compact DAQ - NI 9178, in the I have C series module NI 9213, NI 9207, NI 9205 (Thermocouple, current& Voltage and Voltage measurement units respectively).
    I have created tasks in MAX and using these tasks to read data in my LabVIEW VI.[ I use AI read VI only]
    Task settings , Acqusition mode - N samples, Samples to read -2 , Rate(Hz) -100m
    the above settings is same for all the three cards,.
    WHen I try to read 1 device data say data from NI 9207- I can read 200 samples per minute. WHen I try to read data from all the 3 units I see delay,
    Basically to complete 1 acqusition iteration it takes 1.4-1.5 seconds.
    Is there any better way to increase the speed of acquisition ?
    Thanks
    Solved!
    Go to Solution.

    My bad. Got confused with Frequency conversion. All good now. Sorry
    Was looking for 10 samples every 100ms, and I had programmed 10 samples every 2 seconds

  • How to use a photogate for frequency measurement using a NI USB-6211

    Hello, I am extremely new to LabView and am having trouble using the counter feature (or if this is even what I should be doing). I am trying to use a photogate as a frequency counter when a voltage spike is created by blocking the sensor. This will then be put into RPM and used to evaluate a small motor dyno I am creating. If anyone has any help or previous vi's they dont mind sharing it would be greatly appreciated. The photogate specifications are for an optek opb930l55. Thanks 

    Configuring a counter input task will be a little different depending on the type of DAQ card that you are using to read the digital pulses.  You just need to wire the voltage from the photogate to one of the counter pins on the card.  Then follow one of the many examples for measuring the frequency of pulses.  If your card allows it, I would suggest choosing the Counter Input >> Frequency measurement from the DAQmx Create Channel VI.  If you have questions about how to do this with your specific DAQ device, please provide more information
    Zach C.
    Field Engineer
    Greater Los Angeles

  • Compact DAQ 9215 BNC module -- Error code -200278 occured at DAQmx read

    Hi,
    I am trying to read data from a sensor giving an output between +/- 300mv. It is connected to the 9215 BNC module on the Compact DAQ chassis. When i try to acquire any number of samples at any frequency it comes up with an error message at the end (-200278). I have attached the screenshot of the error message.
    The program displays information in realtime in a waveform chart on the front panel as the  samples are acquired and also writes them onto a lvm file. I have also attached the vi of the program.
    Please help me as i cannot solve this problem. All help will be appreciated.
    Thanks
    Harshil
    Attachments:
    Error Message.jpg ‏29 KB
    Compact DAQ 9215 BNC.vi ‏74 KB

    Hi,
    Thanks for the help. I have tried to use arrays to
    store the data before i write to the file. The problem is when it writes at the
    end, the format changes and i do not get the channel name and the dt
    value (time interval between samples).
    Also if i select more than two channels than i do not get two colums in
    the output file but one column with both the values of the channels one after the other and thus becomes very hard to make where one channel ends the other begins.
    Please help on how to get round this.
    Harshil
    Attachments:
    Compact DAQ 9215 BNC.vi ‏93 KB

  • Scxi 1126 frequency measurement along with other scxi modules

    I want to measure frequency signal using sxci 1126. I have gone through the example code for sxci 1126. I am using NI-DAQ and Labview 7.1.
    The example code is applicable when am acquiring only from 1126. I have to acquire data also from 1102 102B along with 1126.
    In the example code along with AI config.vi and Ai Start.vi there are two additional vi's like AI paramete.vi and AI Trigger config.vi I understand that they are used for reading from 1126. My worry is how this is going to affect my acquisition from other scxi modules as all the modules are in multiplexed mode.

    Hi Bipin,
    Looking at your code, I see that you are still using Traditional DAQ. Since you have LV 7.1, you can take advantage of the new features of DAQmx.
    With DAQmx, you can create a virtual task that includes all of the different types of measurements you want to make. Once you set up the task in MAX, you can place it on the block diagram and automatically generate the code necessary to execute this.
    To do this, open up the Measurement and Automation Exlporer (MAX). Select "Data Neighborhood" from the tree on the left. Then click the button labeled "Create New." Create a DAQmx Virtual Channel. Follow the series of menus to set up your first type of acquisition (1126 frequency measurement). When you are
    done creating the task, you can add the second type of measurement to that same task. In the task config page, you will see a white box with the name of the channel you just created in it. Above the name you will see an "Add" button. Click on this button and follow the menus to set up your second measurement (1102 module).
    Once they are set up, save the task and open LabVIEW. Place the DAQmx Task Name constant on your block diagram found in All Functions >> Data Acquisition >> DAQmx... the task name constant is a purple colored box. Clicking on the box once its on the block diagram will expand a menu that will let you choose your task. Once selected, right click on the task name and choose Generate Code >> Example. This will automatically generate the code necessary to run the tasks. Simply hit the run button and enjoy!
    Thanks,
    Sal

  • NI9411 wrong frequency measurement of flow sensors / 24 impulse signals

    Hello Ni Forum,
    I already searched for similar problems, but haven't found anything helpful. So I'm posting our problem here. I'm apologizing in advance for bad english, it's not my mother tongue
    We're encountering some strange behaviour of our NI9411 Module. We're using it in a Compact Rio with some other modules (2x Analog In).
    Our goal is to measure the frequency of three flow sensors (impulse high = 24V, 0-22kHz) among with a torque sensor (TTL 5V, 30-60kHz) and a speed sensor (TTL 5V, 0-51,2kHz).
    They are wired as follows:
    DI0a = torque sensor
    DI1a = flow sensor 1
    DI2a = speed sensor channel A
    DI3a = speed sensor channel B
    DI4a = flow sensor 2
    DI5a = flow sensor 3
    Correspondig ports b are left unconnected, as it is said in the data sheet. All ground ports of sensors are connected to COM port of 9411. The module was connected to a 24V power supply.
    Now the torque and speed sensor measurement works fine. But measuring the signals of the flow sensors seems to be difficult.
    If an external frequency generator (impulse high about 9V, f=1,000kHz) is connected to port DI1a instead of the sensor signal, LabView shows exactly 1,000kHz. DI5a showed an avarage of 10 Hz, with a range from 10 to 60 Hz. DI4a equaled constant zero. The flickering up to 60Hz of DI5a was gone after disconnecting the 24V supply of the module. This changed nothing on the phenomenon described below.
    If the signal high impulse voltage is raised, the measured signal frequency goes up to 1300 Hz @ 24V signal high impulse voltage. The signal additionally raises, if an oscilloscope is connected to DI1a, to 2180 Hz (range 2110 to 2240Hz). However, there is no change of frequency if the osci is connected to DI5a. With the 24V supply connected, DI5a showed a frequency up to 600Hz @ 24V signal high impulse voltage on DI1a, also rising when connecting the osci on DI1a. As mentioned, there was no frequency measured on DI5a after disconnecting the 24V power supply.
    The signals of the generator showed some peaks on each edge (rising and falling) with values for example of 11V above high impuls voltage of 9V (20V together). That may causes that wrong frequency measurement.
    The signals of the flow sensors do not have such peaks, the LabView-frequency nevertheless does not match the real frequency, as shown below (all values in Hz):
    LabView
    ideal values
    Flow Sensor 1
    Flow Sensor 2
    Flow Sensor 1
    Flow Sensor 2
    4600
    12200
    740,6
    6760,0
    6400
    13500
    1481,3
    7500,7
    9700
    16400
    2962,6
    8982,0
    12900
    19500
    4443,8
    10463,2
    We're kind of helpless now. How can we get the signals of the flow sensors measured the right way? Are we doing something essentially wrong? Thanks in advance for offered help. I hope, I've given any necessary information. Any missing details will of course be delivered.
    Puls-Measure-VI is attached beneath.
    Regards,
    Johannes Rost
    Attachments:
    vi.png ‏20 KB

    Dear Lynn,
    thank you for your reply. The impedance was an issue that our local technical distributor already suggested to check. According to the datasheet of the flow sensor (see attachement) it can drive a current of 25mA. The signal generator we used is a test generator that can be used instead of the flow sensors to check the any evaluation unit the sensor is connected with. So it should generate signals that are equal to those the sensor would have generated. And even with this the frequencies measured with LabVIEW are not as expected.
    We are in contact with the sensor manufacturer to exclude mistakes in connection on the sensor side. But the behavior with the signal generator makes us think that is has to do something with the characteristics of the NI9411 that we don't know yet.
    Attachments:
    block diagram signal amplifier and signal description.png ‏151 KB
    technical data.png ‏124 KB

  • Compact daq multiple power supplies into analog input

    I'm trying to read several values from different sensors into a 9205 voltage input module using a compact DAQ.  My sensors use different power supplies, they all output voltage between 0-10Vdc.  I can read the value off of any one sensor fine, but once I hook up another both values start to shift and osscillate, however either one by themselves gives me a steady DC value.  I am taking differential measurements from the sensor's outputs... I'm not sure if it would be ok to tie the grounds of the two power supplies together and feed them to my ground reference input of the module, if I take a voltage measurement between the two power supply grounds I see about 1Volt difference.
    Any ides/suggestions would be appreciated.
    Thanks,
    M. 

    Hi,
    I have been looking at the sensors you are using and the pins seem to be correct so I just want to make sure that we are on the same page with the connections you are making.  This is assuming you have a spring terminal on your daq card rather than a DSUB.
    Humidity Sensor - Pin 3 or 4 (CHn+) to AI0 (Pin 1) and Pin 6 (SGND) to AI8 (19)
    CO2 Sensor - V to AI1 (pin 2) and 0 to AI9 (Pin 20).
    In your software you should then be taking a differential voltage reading on AI0 and AI1.
    Assuming that is all correct then this is very strange.  The wiring diagrams suggest that the signals are ground referenced so this should be sufficient however the 1V difference in the ground lines is perculiar if they are plugged into the similar place.  although the differential reading will eliminate error due to this one consideration is that if they are floating you may need to add bias resistors.  You can find out more about this here.  As I said it doesn't appear that this should be required but is worth a go if you have the kit to try it.
    Otherwise it might be useful if you can send me some screenshots of the behavior on the graphs and perhaps your code and we can see if that helps.  Also if you are able to verify the functioning of your sensors some other way would also be useful i.e. with a multimeter.
    Regards,
    James Mc
    ========
    CLA and cRIO Fanatic
    wiresmithtech.com/blog

  • Unstable Frequency Measurement USB6210

    Hi All, 
    I'm struggling to get a stable frequency measurement, to measure the RPM of a motor, using a single counter on a USB6210 board. 
    I'm using the +5V TTL signal to power an opto-transistor, and reading that signal back through Ctr0 (PFI1). See attached wiring schematic.
    I've put a scope in line (between PFI1 and DGND), and at the PFI1 terminal get a square wave, about 50Hz, peaks at about 2.5V. Do I need to be linking this signal to DGND, and how?
    I've set up a task in MAX, and readings fluctuate from 45Hz to 900Hz.
    I've also tried to read this in LabVIEW using the example VI - Meas Dig Frequency-Low Freq 1 Ctr.vi. I then get even more random results of +100,000 (full scale).
    Many Thanks,
    Martin 
    Attachments:
    Counter Wiring.jpg ‏63 KB
    24022010044.jpg ‏397 KB

    thanks a lot John P, i'll try it this vi config.
    well, my flow transmiter should give an 0-5 volts signal with frequency between 0 and 100 hz (datasheet here), and the data i need is codified in pulse frequency, the measured voltaje is wrong but frequency on oscilloscope is ok. i attached pics of my signal on oscilloscope measured on transmitter output, measures at daq card input are the same, i connected my transmitter ground to digital ground (im working on ni pci 6221).
    i tried the  Minimum Pulse Width option with 2.56 ms but now i realized why did'nt worked (voltaje level issues ), but now my typical noise is 3% of my signal, i think noise won't be a big deal.
    and i was surprised too about this system could get data acquisition insteand of data timeout error (because of voltaje level's issues), at first test i performed the system made the measures already mentioned, but i realized the ones who made this system attached the signal acquisition line to waterpump's power source (in fact, they attatched all data signal's lines to waterpump's power source ¬¬) and they hid noise effects with waveform's settings, now i fixed this and the system only shows me data timeout error.
    initially i got confused because if im getting frequency acquisition of milivolts signal i thought daq card's counter input could deal with it, but now i realized it was just noise peak effects.
    best regards
    .:. Pedro Rivera .:.
    i love to work and develop on labview, this is real fun!!!
    Attachments:
    signal acquisition.zip ‏355 KB

  • Simultaneous frequency measuring

    I have to measure for frequency signals simultaneously, so that I'm able to associate one measured value to the others. How do I synchronize this? Is this possible with the four counters on a 6601 board? Two of the signals have frequencies up to 15 KHz, two of them go up around 4kHz. I also have a 6014 board with an additional counter available, maybe I could use it somehow...I also have to synchronize the analog acquisition that I perform with the 6014 with the one of the frequency signals, namely a continuous TTL pulse.
    Thanks in advance for any help!

    Hi Achim,
    Typically, frequency measurements are made using two counters for increased accuracy. However, you can measure frequency using 1 counter and taking the inverse of the period measurement. You would just need to apply this to 4 counters. There should be a shipping example with the NI-DAQ driver that performs this. Here is a link to an excellent tutorial on frequency measurement.
    Making Accurate Frequency Measurements
    http://zone.ni.com/devzone/conceptd.nsf/webmain/CD2C8AAED8FA59A486256C230078FE75?opendocument
    This being said, what I suggest in your case is to use a 6602 counter/timer board with 8 counters, 2 for each frequency measurement. Using a 660x board, you can also use triggering to simultaneously start all counters. This can be
    done by routing a signal from the PFI line to the counter trigger using Route Signal.vi in LabVIEW or Select_Signal() in C function calls. Then you would setup a trigger and reference the common trigger signal that you routed the PFI line to. The following discussion thread might be useful:
    Counter/Timer Triggering 660x
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=506500000008000000B2300000&ECategory=Measurement+Hardware.Counter%2FTimer
    Anyway, I hope that helps. Have a good day.
    Ron

  • Frequency measurement error using DAQSTC

    I have modfied the example listed to measure up to 9 frequencies continuosly in the vi as attached.
    When I use the same approach combined with analogue & digital input/output I get a small error in frequency.
    (Input line PF10 reads 6.8Hz for a 6.7Hz input.)
    Attachments:
    measure_9_frequencies.zip ‏50 KB
    Rig_13-2_Monitor-1.llb ‏196 KB

    Hello,
    The code that you are using to take the frequency measurement could be done with lower level VIs that will more than likely resolve this issue. I modified one of the LabVIEW shipping examples: Measure Period (DAQ STC).vi Please take a look at the VI that I have attached.
    Attachments:
    Measure_Multiple_Freqs.vi ‏98 KB

  • Frequency measurement question

    hi,
    i'm trying to get a graph/table of the frequency of a signal as it varies with time using LabVIEW 8.2. the frequency of the signal i'm analyzing is constantly changing, so i would like to, ideally, find the frequency of each pulse so that i would be able to graph that frequency as a function of time. the signal is generated by a fiber optic system which is hooked up to a standard NI DAQ card.
    right now i'm trying to use the Spectral Measurement VI wired to a graph, however it doesn't seem to be producing the desired results.
    thanks

    Hi Ben,
    Ah, I get it now, thank you for the pictures.
    "Just
    to clarify, does the Counter I/O -> Frequency task work with
    non-digital signals?"  No, the input to a counter task must conform to
    the 5V TTL logic standard.  Here
    is a document that talks about how to use non-TTL signals with counter
    tasks.  Since you are interested in the length of time between two
    adjacent peaks or troughs, it would be nice to use a digital frequency
    task, but this analog signal needs a lot of help before you can use it
    as a TTL counter input.
    "Also,
    it would seem that the Analog I/O ->
    Frequency would be the ideal task for my application, however it
    doesn't seem as though it is supported by my card..." You are correct,
    you cannot directly take an analog frequency measurement with your
    hardware.  Different hardware is required.
    What's coming to mind is a direct measurement between two adjacent peaks and troughs.  LabVIEW ships with some very nice examples for this type of measurement.  From LabVIEW's Help Menu >> Find Examples... >> Analyzing and Processing Signals >> Time Domain Analysis >> Peak Detection and Display.  Please note that some of the VIs required by this example are not included in the LabVIEW Base Package.  Below is a screen shot of the front panel.  Computing the frequency of each pulse is then a matter of calculating the time between two adjacent peak or trough values.  I hope this gives you some ideas.
    Message Edited by Pie56694 on 07-09-2008 11:34 AM
    Message Edited by Pie56694 on 07-09-2008 11:35 AM
    Attachments:
    2008-07-09_101048.jpg ‏94 KB

  • NI9411 frequency measurement with analogue output

    I have an NI-9411 connected into a 9178 cDAQ module. I want to constantly measure the frequency of a digital signal then output this signal as an anlogue output using another of my NI modules. I am pretty new to the NI environment, does anyone know of a simple method using the DAQassistant?
    Thanks for your help.
    Richard

    Hi Richard,
    Do you want to output a voltage that varies with frequency or just an analog signal with the same frequency as the digital?
    The easiest way for you to do this is to use two DAQ Assistant VIs and wire the output from your digital module into the output of your analog module.
    If you wanted to output a varying voltage with frequency you would perform some simple scaling on your measured frequency and wire it straight to the output.
    If you wanted a varying frequency analog signal, you could use the Simulate Signal express VI and wire the measured frequency into the frequency input.
    The reason you only see four channels for frequency measurement is that this particular function utilises the hardware counters on your device to count the time period between pulses to work out the frequency, your cDAQ 9178 has four of these hardware counters.
    For direct voltage level measuring you will see six differential channels available.
    Hope this is helpful to you.
    Regards,
    Adam Brown
    Applications Engineer
    National Instruments UK

Maybe you are looking for