How to measure rpm

I have an NI 9401, labview 8.6 and a 9172 chassis and I am trying to measure the rpm of my rotating shaft. The code I wrote works at low speeds but is not accurate at high speeds. Does anyone have a standard labview 8.6 code for obtaining the angular velocity of a rotating object?

Hi Eluan,
What part of the code is inaccurate?  Is it the calculation or do you think you need to sample faster to gain more accurate measurements?  It is possible that there is noise in your data that you could average out to obtain more reliable measurements.  Is the measurement being taken with a specific type of device (eg: hall effect sensor, rvdt, encoder)?  There are a lot of different methods for measuring angular velocity of a rotating shaft, so please let us know what method you are using.  We will be better able to help you if we know a little bit more!
| Zach J. | Applications Engineer | National Instruments |

Similar Messages

  • How to measure RPM using digital I/O

    Please tell me how to measure RPM using Digital Input or please give me a code for this.

    You probably aren't going to find anyone to just give you code. Especially because you don't specify the hardware you're using. Doing this on FPGA is different than using DAQmx to do it. With FPGA you count pulses over a specified time. Using boolean logic from the digital DI node is a common way but there are others. (if you are using FPGA I can draw up an example, but I believe there is one on NIs website if you search google for it),. Then, if you want, you can run the data through an IIR filter, especially if you have a low resolution or slow moving encoder. Either of these conditions can result in very large difference of RPM even if the actual speed is not varying much (if you need an example why I can provide more detail, but some simple math calculating RPM should explain this. Obviously lower resolution will giv eyou less accurate results).
    If you use DAQmx you can set up a frequency task and it will return the number of pulses in a specified time frame; then you can convert this to RPM based on your encoder resolution and take the same steps of running it through a filter to smooth it out if need be.
    CLA, LabVIEW Versions 2010-2013

  • How to measure the frequency of a pulse being generated by a counter

    Hi,
    I am using labview 8.6 to generate 5 evenly spaced pulses for every 1 revolution of my shaft. However, I would also want to know the frequency of these pulses so I can determine the shaft speed. Since I am already generating the pulses using one of my counters, can I still tap into that or task another counter to measure the pulse frequency? If so, how? I have attached my code for generating the pulses and I am using an Ni 9401 module and an NI 9172 chassis. If someone can helo me modify the code to measure and tell me the pulse frequency as well, that would be really appreciated
    Attachments:
    autotrain2.vi ‏19 KB

    You'd probably get a more coherent answer if you didn't bounce around from thread to thread so much...
    How can I generate a pulse train from shaft encoder? (5/13)
    pulse train from encoder (5/15)
    how to measure rpm (5/20)
    How to measure rpm using shaft encoder and labview (5/23)
    This thread (also 5/23)
    I see you ignored my suggestion from the other thread--Kevin's solution is good too but using an encoder task offers more noise immunity (I think this is probably the cause of the problem you reported on the other thread).  You can fix it with digital filtering if you want to keep using a counter output instead of an encoder task.  Noise during transitions is pretty common for a quadrature encoder.
    A finite counter output task uses 2 counters on the 9172 (although you said 9174 earlier at one point--this wouldn't be the case on a 9174) so you wouldn't have one left to make your frequency measurement.  With the solution you have now, you can change to continuous to free up a counter if you don't care about outputing an exact number of rotation's worth of pulses (I'm not sure if you do or not--I didn't read through all of the various threads relating to this application to find out).
    For your actual question in this thread...  Have you tried running one of the frequency measurement examples?  From the code here I can't tell what you have tried (it just looks like a mangled version of the code Kevin gave to you in your other thread).
    Best Regards,
    John Passiak

  • How can I measure RPM with CTR-500 module?

    I have used  the CTR-500 module for mesurement of  motor RPM. But it doesn't have direct option to measure  RPM ,
    so i have count pulses for  1sec (then reset the counter) and  by calculation show the result for 1min. But it varies every time ,cant give me fix RPM.
    I want reliable solution for this.

    min
    You have not said how much the RPM actually varies from reading to reading and what the range of measured RPM is for the process.  This variation can be caused by a couple of things.  One would be actual variations in RPM due to changes in motor loading.  What is this motor driving?  Most RPM readouts use some form of sample averaging to smooth out the readings.
    A second cause could be your vi.  Suggest you post a copy of your vi. 
    In case you have not seen it, here is a link to a KB about measuring frequency with cFP.  It also links to several other docs on the same subject .  http://digital.ni.com/public.nsf/allkb/D8DB42F9FDC3607E862568640047F144?OpenDocument 

  • How to measure the rpm using NI 9411 and counters

    How to calculate the rpm of a shaft using NI 9411 and counters?

    http://forums.ni.com/t5/Signal-Conditioning/measuring-rpm-using-DAQ-device/m-p/2571131#M7353
    Additionally, if you set it to read a degree instead of pulse, your calculation will change a bit, but I'll leave that to you.

  • How to measure current and voltage and rpm with daq device

    i am measuring current and voltage and am wondering should i use shunt resistors or current sensors hall effect sensors. i have a pci 6221 and a scc-68 breakout box. what specifications or size should the shunt resistor/current sensor be or should i use another device to measure the currrent and voltage. do i need any other safety device between the resistors, current sensors and the scc-68 breakout box when measuring the current and voltage. will the daq card pci 6221 pick up a signal from the resistor. what terminals should the wires from the resistors and current sensors be connected to in the scc-68. i am using a proximity switch to measure rpm of a motor. should the proximity switch be 2 or 3wire connection. should it have an analog or digital connection and is a power supply required to power the proximity switch and should it have an npn or pnp connection

    hello,
     i was going to use a 20amp 50mv, or a 20amp 100mv current shunt and connect wires directly into the AI input terminals of the scc-68 from the current shunt would these be suitable. would current shunts such as these be suitable to use http://uk.farnell.com/elc/sh10020/shunt-sh10020-20a-100mv-1-class/dp/1319576 or http://uk.farnell.com/datel/3020-01098-0/shunt-50mv-20a/dp/1339338
    is it ok to use either a current shunt or should a hall effect sensor be used  such as this http://ie.farnell.com/honeywell-s-c/csla2cd/sensor-hall-effect/dp/1082269 . which of them would be more accurate or are both of them fairly accurate.
    when i am measuring voltage can i connect two resistors between the positive and negative of the wires going to the battery and connect two wires from either side of the resistor directly into the analog inputs of the scc-68 and measure the 12-15 volts directly would the pci6221 and scc-68 be able to measure the voltage drop across the resistor.
    i wanted to measure rpm also does it matter whether the proximity switch has 2 or 3 wires and should it have an analog or digital/frequency output for cponnecting to the scc-68

  • How to measure the baseline of a noisy, pulsed signal

    Hi
    I am measuring the torque exerted by a large motor on a shaft using a load cell and lever arm. The shaft runs at approx 150 rpm. I have attached a drawing that shows the output I get. This is a test rig.
    I have written some code that measures the maximum peak out of a group of approx 5 peaks and writes this to a shift register. This gives me an idea of the maximum torque "spike".
    I also wish to measure the baseline torque (due to the bearings in the machine). Even when highly filtered (my noise filter is set to 49Hz) the signal exhibits this noise which is probably due to vibration in the system. The signal is zeroed when the motor is not running.
    Does anyone have an ideas on how to measure the "baseline" torque? The large spike in torque prevents me from doing a running average. Can anyone think of a way of averaging just the noisy part of the signal to get an average value? I aim to to subtract the average baseline torque from the peak value to get an idea of the torque due to the event which causes
    the spike.
    Any help would be greatly appreciated.
    Many thanks.
    Attachments:
    drawing of torque signal.gif ‏26 KB

    Thanks for the reply. I understand what you are saying. However, I might have to modify my method for measuring the peaks if I choose to implement your idea. I have taken a screenshot of my "peak finder" code and attached it.
    Bascially, the reset terminal is wired to a timer which outputs a pulse every few seconds. This resets the vi (a standard NI one I think) and sets the peak magnitude back to zero. This way, I am windowing the signal and measuring the maximum peak in every window. This is what I need to do.
    So I could use a logical filter to feed data to the running average only if;
    the amplitude of the signal is less than a certain threshold
    and if the current value has similar low peaks either side of it
    How would you construct the code to delay the evaluation so that the values in front and behind of the current data point can be analysed?
    thanks again
    Attachments:
    peak_find_screenshot.jpg ‏45 KB

  • Measure rpm and PWM signals using digital input of NI9401 module

    Hi, is there a simple way how measure rpm (to 5000 rpm) and PWM (about f=3kHz) signals using digital input of NI9401 (ultrahigh-speed digital I/O)  module plugged in NI 9172 ?  I will wellcome any suggestions and VI examples (bether still). I'm begginer using LView 8.2. I apologize for my poor English. Many thanks.

    Hi CUA,
    Since you have already the right tools, you just need to get started with the software. The NI-9401 will give you access to the counters that are inside the cDAQ chassis 9172.
    You need to place the module in slots 5 or 6. You can read in how they work and how to configure them in the counters section of the user guide found here.
    Now to measure rpm, you can either measure the period of the signal (seconds) and multiply by 60 to have minutes and the number of ticks per revolution. You can find a shipped example to read period called “Meas Dig Freq-Buffered-Cont-Large Range 2 Ctr.vi” found under Hardware Input and Output » DAQmx » Counter Mesurements
    To measure PWM, it is similar procedure and you can read the semiperiod (high time or low time). There is also a shipped example called “Meas Semi-Period.vi” found under the same location.
    There is great information for these kind of task at this page or just post back if you need to.
    Hope this helps.
    Gerardo O.
    RF Systems Engineering
    National Instruments

  • How to make RPM-meter ?

    Hello guys, 
    I want to measure rpm of my mini wind turbin.
    I have a proximity sensor and i have a frequency-voltage device. 
    And my problem is, i can want using labview to make a RPM meter.
    How to do it ???
    Thanks
    Solved!
    Go to Solution.

    Hi Hutomo,
    I just noticed that this post has been duplicated many times. I think it'll be a better idea to just keep this topic onto one thread so that we can combine our efforts in assisting you. Since people have already been making comments here, let's just stick with that post. In the future it will be better if you just post once per topic, at National Instruments we do look at every post so don't worry about your questions not being addressed.
    Jason L. 
    Product Support Engineer
    National Instruments

  • Measure rpm

    Hello,
    I am new to LabView. I have a cDaq 9172 and three modules (9263, 9201, and 9401). I am trying to measure rpm of a shaft with a 24 tooth gear and magnetic pick up. The shaft is expected to rotate in a range between 0.5 and 5 RPM which corresponds to 0.2-2Hz square wave signals (analog acquisition). I've tried using the frequency channel on the digital module (9401) but I couldn't get the programming to wait to aquire the relatively low frequencies. I've also tried post processing the analog signal (module 9201) but the Tone Measurement VI gives me inaccurate measurements at low frequencies (<1Hz). 
    Could someone please offer me a simple solution for measuring frequency accurately for the expected range so that I can calculate the RPM?
    Much appreciated,
    Jake

    Nathanael,
    Thank you for the response. I've been trying to measure the time between edges but so far no luck. Is there an example in LabView Help that I could mimic explicitly for this range of frequencies? I've been working on programming it myself based on a block diagram image I found in this forum but again I have not gotten very far. I've attached the programs showing where I'm at right now with it. Suggestions would be greatly appreciated. 
    In my experiment, the square wave signal from the speed sensor has an amplitude of 24V and a frequency range from 0.5-2Hz. I am attempting to simulate that in the attached VI by producing a similar square wave, checking whether the value is above 5V and if it is I want to start a timer to run until the greater-than-5V-condition is met again. I'm confused on how to make the condition TRUE for only rising signals (going from 0V to above 5V). Also, I'm not certain about the timing method. I'll try putting in the Tick Count (ms) as you suggested. Again, any help would be nice.
    Regards,
    Jake
    Attachments:
    SpeedSensorSimulator.vi ‏46 KB
    MeasureTime.vi ‏11 KB

  • Measuring rpm using DAQ device

    How to measure the count value determined from the encoder to rpm value?Cn anyone pls explain?

    1. Write a program to read a count every second.
    2. Find count differene between this loop and previous loop.
    3. rpm=count difference*60/pulse per round.

  • How to measure two frequency simultaniously in a PCI 6014

    Hi I am measuring RPM of two gear drives by measuring the pulse/second(Measure frequency.vi). I have interlinked the gate of counter1 to the output of counter2. Similarly I have connected the gate of counter2 to output of counter1. to measure frequency.
    This way in a cycle one counter acts as gate counter while the other counter counts and later the counters changes their role.But my problem is that I have to measure the two counters frequencies simultaniously.
    I cannot do period measurement becasue I have several irregular pulse widths generated in each cycle.
    I am currrently experimenting with mesure period(DAQ-STC).vi. I have the following doubts in this VI.
    1)Can I replaced source configuration fr
    om internal timebase to external PFI source signal.
    2)If I replace my source signal from internal timebase to the pulse generated from my gear drive then would at the end of 1 sec (when the counter is disarmed due to change of trigger signal state and hence end of while loop) will the count attribute contain the count of my ttl edges?
    3) Would this be a accurate method for measuring frequency simultanuiously without using two counters?
    Thanks.

    Hi balajkasthuri,
    The best way to perform this is to use the frequency generator (freqout) of your 601x board. Your board only has 2 counters but it also has a frequency generator that doesn't use the counters. It is an output found on the freqout pin. You can choose to have a frequency of 10 MHz or 100 kHz divided by any integer between 1 and 16. This means you can create a pulse train of known frequency and known period and use that into the source or gate of your two counters depending on the frequency measurement method you are using.
    For example, assuming your two signals are much faster than the freqout signal, you can apply the freqout signal to the gate of a counter and have your signal feed the source. The number of counts you get in 1 pulse
    width of the gate (which is known since it is the frequency you generated) will determine the frequency of your signal.
    Otherwise, if your signal is much slower than 20 MHz, you can simply use the 20 MHz as the source of the counters and perform a simple period measurement on your signal. You would then take the inverse of your period measurement.
    Anyway, using the onboard frequency generator will give you the flexibility you need. I have linked below a useful tutorial describing the 3 typical frequency measurements. Hope that helps. Have a good day.
    Making Accurate Frequency Measurements
    http://zone.ni.com/devzone/conceptd.nsf/webmain/CD2C8AAED8FA59A486256C230078FE75?opendocument
    Ron

  • How to measure the performance of Extractor

    Hi,
    How to measure the time taken to by the extractor when executed from rsa3 for a given selection?
    Lot of threads speak about ST05... but these transactions are too granular to analyse.
    How to get the overall time taken.i need the overall time taken and the time taken by the individual SQL statements... please provide specific pointers.
    Thanks,
    Balaji

    Maybe SE30 can help you....
    Regards,
    Fred

  • How to measure the performance of sql query?

    Hi Experts,
    How to measure the performance, efficiency and cpu cost of a sql query?
    What are all the measures available for an sql query?
    How to identify i am writing optimal query?
    I am using Oracle 9i...
    It ll be useful for me to write efficient query....
    Thanks & Regards

    psram wrote:
    Hi Experts,
    How to measure the performance, efficiency and cpu cost of a sql query?
    What are all the measures available for an sql query?
    How to identify i am writing optimal query?
    I am using Oracle 9i... You might want to start with a feature of SQL*Plus: The AUTOTRACE (TRACEONLY) option which executes your statement, fetches all records (if there is something to fetch) and shows you some basic statistics information, which include the number of logical I/Os performed, number of sorts etc.
    This gives you an indication of the effectiveness of your statement, so that can check how many logical I/Os (and physical reads) had to be performed.
    Note however that there are more things to consider, as you've already mentioned: The CPU bit is not included in these statistics, and the work performed by SQL workareas (e.g. by hash joins) is also credited only very limited (number of sorts), but e.g. it doesn't cover any writes to temporary segments due to sort or hash operations spilling to disk etc.
    You can use the following approach to get a deeper understanding of the operations performed by each row source:
    alter session set statistics_level=all;
    alter session set timed_statistics = true;
    select /* findme */ ... <your query here>
    SELECT
             SUBSTR(LPAD(' ',DEPTH - 1)||OPERATION||' '||OBJECT_NAME,1,40) OPERATION,
             OBJECT_NAME,
             CARDINALITY,
             LAST_OUTPUT_ROWS,
             LAST_CR_BUFFER_GETS,
             LAST_DISK_READS,
             LAST_DISK_WRITES,
    FROM     V$SQL_PLAN_STATISTICS_ALL P,
             (SELECT *
              FROM   (SELECT   *
                      FROM     V$SQL
                      WHERE    SQL_TEXT LIKE '%findme%'
                               AND SQL_TEXT NOT LIKE '%V$SQL%'
                               AND PARSING_USER_ID = SYS_CONTEXT('USERENV','CURRENT_USERID')
                      ORDER BY LAST_LOAD_TIME DESC)
              WHERE  ROWNUM < 2) S
    WHERE    S.HASH_VALUE = P.HASH_VALUE
             AND S.CHILD_NUMBER = P.CHILD_NUMBER
    ORDER BY ID
    /Check the V$SQL_PLAN_STATISTICS_ALL view for more statistics available. In 10g there is a convenient function DBMS_XPLAN.DISPLAY_CURSOR which can show this information with a single call, but in 9i you need to do it yourself.
    Note that "statistics_level=all" adds a significant overhead to the processing, so use with care and only when required:
    http://jonathanlewis.wordpress.com/2007/11/25/gather_plan_statistics/
    http://jonathanlewis.wordpress.com/2007/04/26/heisenberg/
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Can you tell me how to measure audio signal frequency in measurement studio with visual basic 6.0?

    I'd like to measure two differential input signal(I.e. A+ and A-),below is two test projects,
    1.connect A+/A- to PCI 6052E card's ACH0/ACH8 ,and refer to GND for testing
    2.connect respectively A+/A- to PCI 6052E card's ACH0/ACH8 for testing
    Could you tell me the details of the second project?and give me a illustration in measurement studio with visual basic 6. 0 about the second?
    In addition,I would like to measure the audio signal frequency,could you give me a illustration in measurement studio with visual basic 6.0?
    Wait for your reply!

    Dear kelven,
    Thank you for contacting National Instruments.
    To address your question, there are Analog Input shipping examples that demonstrate how to measure an analog input differentially, as you specify in (2).
    As for measuring the audio signal frequency, you may want to check out the following KnowledgeBase. The link is:
    http://digital.ni.com/public.nsf/websearch/4b08380530d72d3b86256340004c3005
    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

Maybe you are looking for

  • Ipod Won't start, no error message.

    Well, heres my problem and its rather frusterating T_T I click on Itunes and the little time thingy appears next to my curser, then Itunes just doesn't start. I noticed that in Task manager Itunes will show up, then vanish after a moment. Alittle hel

  • Moving one seat from a volume license

    I have two CS6 seats on a volume license. One serial n° I would consider moving one seat to CC. Not two, at least not just yet. The second seat is for the occasional freelance aid, and already costs more than it brings in. Can I just pull out one sea

  • Call Javascript function with getURL

    I can either open a new window using the getURL(javascript:function()) or I can open a new page and pass a variable using getURL("yourpage.aspx", "Get") but I really need to open the pop up with the javascript:function AND bring the information from

  • 17" MBP - no screen ilumination when resuming from sleep

    I've had the bug since installing the latest Lion update 10.7.3 I never shut down my 17" MBP, just close the lid and let it sleep, however, since the latest Lion update when I open the lip the screen illumination comes on briefly and then turns off -

  • XML query problem

    hello i have xml DATA AS UNDER , i want TO GET alll THE DATA BETWEEN <eob> </eob> tags. CREATE TABLE XMLTABLE (ID NUMBER, xml_data XMLTYPE); INSERT INTO XMLTABLE VALUES (1, XMLTYPE (' <eob> <eobHeader>THE FOLLOWING STATEMENT should be included IN you