Measure Frequency of Digital Signal from DAQ-Board

I'm using a National Instruments DAQ board and I need to measure the
frequency of a digital signal from my data acquisition board.
I know the measure frequency.vi (In diagram - data acquisition -
counter), but i don´t understand yours implementation mainly in input
"counter". Because i don't understand the relationship of board channel (for
signal acquiring ) and the measure frequency.vi.
Thanks in advance,
[email protected]

Hi,
   Attached is a vi which models your signal, and provides a way to measure the average frequency over a window of time. It converts the signal to a sequence of periods. I usually start with this approach because you can save the data in a much more compact form if your sampling rate is high. Obviously over a specified period of time, if there are no zero crossings the frequency is zero, so I was a little incoherent before. The real issue is the latency caused by averaging. Your frequency measurement is most accurate half your window size before the current time, so smaller windows give you more up to date measurements, but also more noisy. If you need the most up to date measurement, then you have to use the time since the last crossing which is the case where the frequency never goes to zero. That's probably not a realistic situation. If you needed less latency, you could use a prediction algorithm.
Also, there are a number of signal measuring and processing vi's that LV gives you, for instance pulse measurements that could be used to partially implement this or other approaches, but I normally steer clear of them unless they fit exactly due to having to convert back and forth to the waveform data type.
Have fun!
Attachments:
DigRandFreq.png ‏62 KB
DigitalRandomFreq.vi ‏34 KB

Similar Messages

  • How I can measure frequency of TTL signal without external clock?

    Hello,
    I want to measure frequency of TTL signal using PXI-6254 or PXI-6713, without using external clock.
    Frequency will be up to 100kHz. How I can use internal counter of 20MHz or 80MHz?

    Hi Yuta K,
    You have not stated what software you want to use for this measurement, but in case you're using LabVIEW, please go to the Example Finder (in LabVIEW go to "Help >> Find Examples"). 
    In the Example Finder, you make sure the "Browse" tab is stil selected, and than you go to:
    Hardware Input and Output >> DAQmx >> Counter Measurements >> Digital Frequency
    Here you will find some good examples of measuring a digital frequency with 1 or 2 onboard counters.
    If you need additional information, please let us know!
    Best regards,
    Peter S

  • Glitches on digital signal from 5751

    I am driving four LMH6574MA multiplexers with digital signals from NI-5751 digitizer (running on NI PXI 7953R FlexRIO). There are glithches on all the digital signals (signal frequency is 40 MHz). Is there a way to clean these signals up in software?

    Did you place the AI node in the IO Mod Clock 0 clock domain?
    If you don't have those analog input nodes inside of the correct clock domain you'll be performing an unsafe clock crossing that will result in glitching.
    The user manual walks you through how to add the IO Module Clock 0 to a project. Or you could start from the getting started example.
    National Instruments
    FlexRIO Product Support Engineer
    Attachments:
    CLIP help.PNG ‏32 KB

  • How can I find the frequency of a signal from a turbine flowmeter?

    My turbine flow meters output a voltage signal frequency. Is there are way that I can find the frequency in LabVIEW? Right now I have the flow meters wired to my card as analog inputs. Maybe I need to wire them in differently.

    Dear moebeth,
    To address your question, can you include more information about the flow meters? As far as I know, turbine flow meters can have outputs of analog voltage, analog current, frequency/pulse, or switch.
    If the meters are outputting a voltage, then connect it as an analog voltage input and use the analog voltage virtual channel.
    If the meters are outputting a frequency or pulse, connect it as a counter input. With the counter input, you would need to program in LabVIEW without using a virtual channel. Instead, you would use the counter VIs. There are shipping examples included with LabVIEW. Measure Frequency (DAQ-STC).vi can be used just by pressing Run if you wire the signal into the source of whichever counter you want to use and th
    e ground into DGND.
    Let me know if you have any further questions or if this does not resolve your issue.
    Thanks again and have a great day!
    Chad AE
    Applications Engineer - National Instruments
    Attachments:
    Frequency.zip ‏45 KB

  • Impulse on periodic signal from DAQ

    I'm using a myDAQ to measure a perioidic voltage signal, and I want to find the maximum and minimum of this signal. When acquiring the signal though, there seems to be a large impulse in the start of the acquisition data shown in one of the attachements. The capture is from a probe from before any filtering is applied to the signal. I'm not sure if this is an effect of the signal acquisition or something I am doing with the signal filtering, and I am new to signal processing in Labview in general.
    In the picture, I acquire 2 signals at 1, split the signal at 2 (top signal is of interest), filter at 3, scale at 4, and display at 5.
    Can anyone point me in the right direction of what could be going on in my code?
    Attachments:
    Capture2.PNG ‏34 KB
    signal.PNG ‏9 KB

    You might want to test the signals that you acquiring in MAX. It seems like the signal is going from 0 to -4.5 V in a short time. You are using the DAQ Assistant, which could be the source of the odd signal. I would recommend running some of the DAQmx examples. These examples can be accessed by going to Help in LabVIEW –> Find Examples -> Hardware Input and Output -> DAQmx -> Analog Input.
    Using Test Panels in Measurement & Automation Explorer for Devices Supported by NI-DAQmx
    http://www.ni.com/tutorial/4638/en/
    Thanks,
    Frank
    Application Engineer
    National Instruments

  • How do I ouput a digital signal from an analogue signal

    Hi all, I'm using a 6221 PCI card with LabVIEW 2010 (no add-ons) with the CB-68LPR connector block and I want to use an analogue voltage input signal of between 0 V and 5 V from an LDR to alter the brightness of an LED so I can maintain a stable level of illumination for a webcam based image capture and processing system.
    I can get the analogue voltage input from the LDR (set up as a voltage divider circuit) using the DAQ assistant via the Ain 0 channel on using pins 68(AI.0), 67(AI GND) and 14(+5 V) and write it to a graph and numeric display but I don't know how to write the value out to a pin that can be used for PWM I am thinking of using pin 40 PFI 13 P2.5 and a digital GND (pin 13).
    I've looked at example code that has been written to produce a PWM signal but these programs don't output the signal to a device/circuit they are just "nothing stuff" that output the PWM signal to a graph.
    Can anyone help me out or point me to the tutorials/code examples that are for real world applications?
    Solved!
    Go to Solution.

    Hello,
    PWM can be done in DAQmx using a counter output task.
    I think the 'PWM-Counter Output.vi' example goes quite a long way to doing want you want I think. This is found in the LabVIEW shipping examples.
    I also found it here:
    http://zone.ni.com/devzone/cda/epd/p/id/1710
    This might be worth a read aswell:
    http://zone.ni.com/devzone/cda/tut/p/id/2991
    Let me know if this is of any help.
    Nick C.
    Cardiff University

  • Capture digital signal with DAQ 6015

      I am wondering what is the best way I can capture a digital event accurately using my DAQ 6015 Pad.  It seems as though I can only capture it using (on demand) timing which I'm assuming means it will only capture it as fast as the loop iteration.  I'm looking to monitor this signal with accuracy down to about 10 ms.  Are there any good digital examples i can goto that you can vary how fast you can capture an event using the 6015?

    Hi caunchman,
    In this card, the digital lines are static so you will have to provide the timing through software, which might not be too accurate. I would suggest using one of the counters of this card to count the digital event. I don’t know what programming language you are using, but if you are using LabVIEW you can find good examples in the NI Example Finder. You can go to Help > Find Example > Hardware Input and Output > DAQmx > Counter Measurements > Count Digital Events. If you are using Visual Studio, C or DotNet you can find the Counter examples here: \All Users\Documents\National Instruments\NI-DAQ\Examples. I hope this is helpful,
    Ana P
    National Instruments
    Applications Engineer

  • Splitting one signal from DAQ

    Hi I m just working on my project and part of this is also build interface in Labview to use DAQ device 6008.
    DAQ device serves to acquire Voltages from thermistors and my interface should split this signal for example like this:
    =if(and(x>=8,D65<=8.54),-33.1*LN(D65)+46.12,if(and(x<8,x>=7.12),-40.1*LN(D65)+34.11,if(and(x<7.12,x>=6.15),-51.2*LN(D65)-0.28,"Out of Range")))
    but this is just excel equation that works. I tried to do something similar in quation node because that would be the simpliest way for me, signal that enters the node is x and leave as y and goes to the waveform chart, but it didn`t work.
    Then I built this interface thanks to the greater, lower icons and it was working fine till I was using number indicators icons as my input, but when i replaced them with DAQ device there was lot of issues with data types I was using and even after I fixed them there was all of sudden other problem with my equation node (because I needed to write condition somehow I used node) DAQ didn`t like it.
    Any help please. I m new in this world then if someone will know what to do, please try it in simple world.
    thank you in advance

    Hi and thank you for your answer.
    First file is the interface I created without DAQassist because I was told it will be the same when the numeric controllers will be replaced with DAQ assist, and this interface works.
    The next file is with DAQassist and there is many errors regarding the wires types and even when I add "convert from dynamic data" after signal is split then I get next error, and even when I ad "index array" that is recomended for this error when I run simulation I m getting next error regarding my functional node.
    If you can help I would really appreciate it.
    I have to find my very first file which include only functional node and I will forward it to you.
    Best regards
    Tino
    Attachments:
    Tino_equation_node.vi ‏124 KB
    Tino_equation_node_DAQ.vi ‏176 KB

  • How can i creat a DTMF signals, from DAQ ,I'm need vis

    I have DAQ E6025
    i need to creat from AO output a DTMF signals.

    Greetings,
    Below, I have attached a LabVIEW example that encodes and decodes DTMF signals.
    Good luck with your application.
    Spencer S.
    Attachments:
    Simple_DTMF_encoder_and_decoder.vi ‏233 KB

  • Can't Split Signals from DAQ Assistant

    I am reading three RTDs from a NI 9217 by using the DAQ assistant. I have tried to split the signals with the "Split Signals."  However, when I expand the icon to three outputs, it only gives me 1 output node to connect to instead of three.  How do I correct this?
    Attachments:
    RTD inputs.vi ‏87 KB

    I see what you mean.  In LV 8.5.1.  See attachment.  Only the top connector shows a connection.  The 2nd and 3rd don't.  You can't wire from them to another icon such as another waveform graph.  But you can wire from another icon TO the connector and it connects up.
    It looks fine in LV 8.6.
    Is this a LV 8.5.1 bug?
    Message Edited by Ravens Fan on 09-03-2008 04:28 PM
    Attachments:
    SplitSignals.PNG ‏3 KB

  • Vb6,card: pci6111,daq box:bnc2110,receive digital signal+react on it,how?

    want to send a digital signal from a function-generator into the daq-box (e.g. into ACH 2) and to react in my program on it, when the dig.signal makes the first step from 0 to 5 V e.g.must i change anything else on hw than connecting the function-generator to ACH 2? How can I react on it with my created CWDI1-Objekt. It doesn't work! Thnx a lot! p.s. other ideas are also wellcomed!

    Hi,
    I'm not understand the relationship between the components of your system (or even what they are!). You'll have to clear your system description a little bit.
    1.- You have a DAQ board, what model?. This is important since it will determine what VIs you can use. Are you using the board for Analog input, anolog output ...?
    2.- "The DAQ card relays the information to a digital oscilloscope", What do you mean by this?. Is the digital scope a hardware device or some sort of software component?.
    3.- ActiveX is used to communicate different software components, not to communicate with external instruments. Again, what is the o-scope?.
    4.- Initially you say that Win600 is a machine and then a program. Which one is it?.
    I think once this quest
    ions are cleared up we can start thinking of solutions.
    DiegoF
    National Instruments.

  • Counter 1 - Measure Frequency & Counter 0 - Generate PWM POSSIBLE?

    Is this POSSIBLE with a NI-6025E DAQ card? Can I use the two counters to generate % control a TTL PWM signal and at the same time measure frequency from a circuit? This is my connection.
    GPCTR1_SOURCE - connected to find frequency circuit
    GPCTR1_OUT - connected to GPCTR0_GATE
    GPCTR1-GATE - not in use
    GPCTR0_SOURCE - not in use
    GPCTR0_OUT - connected to DC motor circuit
    GPCTR0-GATE - connected to GPCTR1_OUT
    My concern is that changing or controlling the TTL PWM might change the frequency reading. This is because COUNTER O is connected to COUNTER 1.

    I understand to measure frequency of a signal there are TWO methods. A ONE counter method and a TWO counter method. I need to measure a frequency between 1 Hz to 200 Hz. Is the ONE counter method possible? What is the ONE counter method?

  • Reading digita signal

    I'm looking to write a simple program code that reads digital signal from the PXI-7350 that I'm using. Using LEDs to display the signal whether its high or low.
    Just looking for someone to point me the way on how to do this. Thanks 

    Hi odsnot,
    you can search in the Example Finder for "DAQmx". You will find a lot of useful examples.
    Mike 

  • Sequence 1create output digtal signal- 2 make microsecon​ds delay or less- 3 measure digital signal with board 6023e

    hello
    I need creat a digital signal and for this i use a counter output and then i need creat a delay after  a signal measurment and for this i use again a couter. My problem is how i can make this delay betwen create and measure a signal. this delay must to bethe shortest  possible  and precise. une of my attemps was make  a sequence and for make the delay i create a task for une virtual output with max frequency 5000000hz and just une pulse but i dont know how many time the labview get to go by the first task ( creat a output pulse and ent it) to make tis task before discribed to the last task (measure a digital sinal). Another thing that i dont know is how many time the libview get to create and eliminate une task. Une information beyond the kind of board (6023E) that can be useful to help me  with this problem is the information about my pc in this case i use a pentium4 3Ghz.
    thanks  

    ...My problem is how i can make this delay betwen create and measure a signal.
    ...how many time the labview get to end one task and start another one.
    What I tried to say is, that even if you use the counter of the 6023e-Board
    to create the delay and trigger the measure via LabView under Windows,
    you leave the realtime-path. Executiontime of LabView-code is then not
    determinated.
    One way to solve this, is triggering measurement via hardware and use LabView to read Data from the Buffer of the DAQ-card.
    You can find more info about DAQ in the "measurements manuall" of NI, delivered with your LabView Software.
    Lorand

  • Is it possible to use "Delay Values" to create a frequency signal from digital "Count Edges" -task? (= are the results I'm getting correct?)

    Hello.
    I have a digital encoder from which I need freaquency information (to ultimately get rpm -infromation). The problem is that this task is inside a loop with 2 other DAQmx -tasks that are using "one sample on demand"-aquisition mode and if I configure this new counter task to be a freaquency task, it only updates once in ~ second which makes the whole loop lag.
    I thus created an "artificial" freaquency signal by using "Count Edges" -aquicition mode and the "Delay Values" -block so that I substract the delayed signal from original "Count Edges" -signal. There is a 0,01s delay in the loop and I figured out that if the history of the "Delay Values" -block is 100 samples I would thus get the real edge-freaquency.
    I tested this configuration and the results seem to be at least really close to correct but I have no idea if this idea is in any way correct...
    This explanation was probably quite confusing so please see the picture attached.
    Thanks a lot in advance! 
    Attachments:
    are_the_results_correct.jpg ‏200 KB

    First of all, thank you for quick reply. Unfortunately I don't have the acces to the vi. until tomorrow.
    And yes, I think you understood correctly: essentially this arragement measures how many edges have been counted during one iteration. This is how I figured out that this could then be used as a frequency measurement:
    1. From the "Edges - Delayed Edges" I get the information on how many edges have been counted during last iteration.
    2. I "know" (really I don't?) that one iteration lasts ~0,01s because of the delay in the loop.
    3. There is 2048 edges in one round of the encoder so I get the rpm as follows: rpm = (edges - delayed edges)/204,8*60(s)
    (If I was using history size of one as you suggested it would be: rpm = (edges-delayed edges)/2048 * 60) However using history size of 10 and taking it account in the multiplication smoothens the response nicely.
    But doesn't this arragement count on the fact that the vi runs smoothly and there is no additional lag?
    I quess using another loop and notifiers for a dedicated freaquency measurement as you suggested could be worth trying. I just have to first learn how to use them. 
    If I do use them will the main loop run smoothly and not wait for every update of the notifier? This would be essential since the freaquency output refresses only about once in a second if I use the continious aquisition mode.
    Attachments:
    are_the_results_correct.jpg ‏198 KB

Maybe you are looking for

  • Can events be re-ordered?

    1) I have 3 calendars and I only use the Month view. When I toggle a calendar on or off, SOME of another calendar's events swap places on their day as shown in the list. 2) Bonus question: I have "Show time in Month view" checked in preferences. When

  • BI ABAP  Dump Error

    Hi Experts   ABAP Error in BI   calling PSA table to my program it contains more than 200000 records also applying grouping in select statement But it showing dump  . please correct me if any wrong in my code. BREAK-POINT.     DATA : BEGIN OF ITAB4 O

  • Play All option

    I've been making music videos of my granddaughter's softball team. Each video is a separate iMovie project running three and a half to five minutes, depending on the song I use. I export each video as a QT movie at full quality, then bring these into

  • Problem loading incoming messages. I can send emails.

    All of a sudden my incomming mail stopped. I am able to send emails. I am connected. I have restarted computer but that did not help. Also, I am not able to log out of mail, and have to force quit. Any help would be greatly appreciated.

  • Oracle 11g RESULT_CACHE_MODE

    Oracle 11g has the RESULT_CACHE_MODE database parameter. This parameter can have 3 values : MANUAL, FORCE and AUTO. Strangely enough in the documentation only MANUAL and FORCE are described: http://download.oracle.com/docs/cd/B28359_01/server.111/b28