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

Similar Messages

  • Using a 9205 to measure RPM

    I have not used labview in over 10 years but now have an application that requires but I am more then rusty. I am trying to measure RPM using a 9205 module and I am sure there is a way to do it. I have a pulsed voltage output from my measurement circuit and so far I am capturing the voltage. Can someone suggest a way to convert these voltage pulses to an RPM value. I am sure some type of leading edge counter would work.
    Thanks

    Not the cheapest route but there is a SCXI card that measures frquency.
    http://sine.ni.com/nips/cds/view/p/lang/en/nid/1661
    There may be some other frequency cards this is one I have used in the past.  With this card you can create a virtual channel and ask it what frequency the analog signal is going into it.  From here there is a conversion from frequency to RPM depending on the type of resolver or hall signal you are using to generate that signal.
    This method is the easiest but the cheapest would be to get a cheap AI DAQ device that can measure several times faster than the generated signal (nyquist theorem) then analyze the series of AI reads to determine the frequency.  Then convert frequency to RPM.  Depending on the signal a USB DAQ device might work, if not a PCI or PXI + MXI card would still probably be cheaper than the SCXI route.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • 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 

  • 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

  • I want to measure rpm using 100 ppr incremental encoder via digital input

    i want to measure rpm using 100 ppr incremental encoder  via digital input max speed (4000 rpm)
    am using 9178 c-DAQ chassis and 9426 digital input module
    pl provide me example code for this

    Hi asaccullo.
    The recommended settings for encoders are using the counters in the daq cards. Using digital I/O’s is not recommended, the encoders send digital signals but one of the main differences between using digital IO vs counters is that counters are designed to handle these type of events.
    Here I found several examples in ni.com/code that you might check:
    Imitation Quadrature Encoder with DAQmx Counter Tasks
    Use Counter Frequency to obtain an Encoder Rotational Speed
    An Elvis is a daq device, so this should work for you.
    I also found an example for myDAQ, it uses the DIO but with a counter task in the set up.
    Regards,
    steve.bm
    AE | NI

  • 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

  • What is the correct way to measure RPM using Visual Basic?

    I have something that works now, but I want to know if there is a better way. I am using a 6023E, I have a Hall Effect switch that goes low then high each rev when a magnet goes by. I have the signal connected to the GATE pin on counter0. I poll the card for the RPM over and over using code based closely on the example STCsinglePeriodMeasure. While this works, I'm not sure exactly what this code is doing. Do I need to call the entire thing every time? The problem is I need to reset and arm the counter each time before starting the counter, and calling everything was the only way I could get it to work. I'm looking for a way to either trim this down, or maybe there is another way altogether that is more apporpriate. Here's the code:
    iDevice% = 1
    ulGpctrNum& = ND_COUNTER_0
    ulArmed& = ND_YES
    ulTCReached& = ND_NO
    iYieldON% = 1
    iStatus% = GPCTR_Control(iDevice%, ulGpctrNum&, ND_RESET)
    iRetVal% = NIDAQErrorHandler(iStatus%, "GPCTR_Control/RESET", iIgnoreWarning%)
    iStatus% = GPCTR_Set_Application(iDevice%, ulGpctrNum&, ND_SINGLE_PERIOD_MSR)
    iRetVal% = NIDAQErrorHandler(iStatus%, "GPCTR_Set_Application", iIgnoreWarning%)
    iStatus% = GPCTR_Change_Parameter(iDevice%, ulGpctrNum&, ND_SOURCE, ND_INTERNAL_100_KHZ)
    iRetVal% = NIDAQErrorHandler(iStatus%, "GPCTR_Change_Parameter/SOURCE", iIgnoreWarning%)
    iStatus% = GPCTR_Change_Parameter(iDevice%, ulGpctrNum&, ND_GATE, ND_DEFAULT_PFI_LINE)
    iRetVal% = NIDAQErrorHandler(iStatus%, "GPCTR_Change_Parameter/GATE", iIgnoreWarning%)
    iStatus% = GPCTR_Change_Parameter(iDevice%, ulGpctrNum&, ND_INITIAL_COUNT, ulCount&)
    iRetVal% = NIDAQErrorHandler(iStatus%, "GPCTR_Change_Parameter/INITCOUNT", iIgnoreWarning%)
    iStatus% = GPCTR_Control(iDevice%, ulGpctrNum&, ND_PROGRAM)
    iRetVal% = NIDAQErrorHandler(iStatus%, "GPCTR_Control/PROGRAM", iIgnoreWarning%)
    ' Loop until 'ulGpctrNum' is no longer armed, or run window is closed.
    Do
    iStatus% = GPCTR_Watch(iDevice%, ulGpctrNum&, ND_ARMED, ulArmed&)
    DoEvents
    Loop While ((ulArmed& = ND_YES) And (iStatus% = 0)) And RunWindow.ExitStatus = "Running"
    If RunWindow.ExitStatus = "Running" Then
    'Run window wasn't closed, so read data.
    iRetVal% = NIDAQErrorHandler(iStatus%, "GPCTR_Watch/ARMED", iIgnoreWarning%)
    iStatus% = GPCTR_Watch(iDevice%, ulGpctrNum&, ND_COUNT, ulCount&)
    iRetVal% = NIDAQErrorHandler(iStatus%, "GPCTR_Watch/COUNT", iIgnoreWarning%)
    iStatus% = GPCTR_Watch(iDevice%, ulGpctrNum&, ND_TC_REACHED, ulTCReached&)
    If (ulTCReached& = ND_YES) Then
    MsgBox "Counter reached terminal count! RPM value may be incorrect"
    Else
    'ulCount is the period in microseconds, RPM = 1/val*(100000ms/s)*(60s/min)
    RPM = 6000000 / ulCount&
    ' Debug.Print RPM
    RunWindow.RPM.Text = Str(RPM)
    End If

    Finally getting around to this again. My previous post is incorrect, as the code I am using is based on the single period measure (it's right there in the code). I am having a problem with the values returned with this method. Occasionally, the card will return a lower than expected count, resulting in a very large (and incorrect) RPM value. I'm thinking this must have something to do with arming the counter at some unfortunate and coincidental point on the gate signal, resulting in a short count. It must be an unlikely event, because I get thousands of good, consistent values for every one bad one.
    To resolve this, I am thinking of going to the single buffered period measurement as suggested above. My idea is to set up a buffer with two values,
    and always take the second one (to avoid coincidental arming and short counts). I could also set it up to return more values, and the application could choose the most likely one (ie return three values, throw out the largest and smallest, etc.)
    I would rather just use the buffer in continuous mode, since the RPM varies much more slowly than the counter counts, and any snapshot of the buffer at any time would be sufficient, even in the presence of overwriting, etc. This would allow me to arm the counter once and poll it on the fly.
    My concern is that in continuous mode, the counter will be throwing a lot of errors which will interefere with the program flow. Can I just set the counter to suppress all errors when I do a buffered read? Worst case, I get a value as it is being written to by the counter, which will have some garbage value (hopefully a recognizable signature) which I can throw out in favor of the other values.
    Thanks,
    Doug

  • How do I measure RPM from a magnetic pick up?

    I have a Red Lion RPM display with a hall effect sensor connected to it. From what I've read This sensor/display setup passes a current through the pickup and measures the voltage generated by the rotating shaft to determine RPM.The problem I am having is my daqboard (PCI-6025E) counter won't measure the AC pulse of the sensor output. I currently use the ac output of the counter connected to an analog input and have it scaled for 1.6 v to 3.2 volts ac equals 400 to 2500 RPM.Is there a signal conditioning board I could use to convert the ac pulse to a 5 volts ttl pulse the daqboard can use?I've tried using a schmitt trigger, but I can't get an output from the trigger.

    ; ;lgfh;lgf;lkgf,
    One option would be to use the analog triggering on one of our full featured E Series data acquisition boards to trigger a digital pulse as outlined in the following Knowledge Base:
    http://digital.ni.com/public.nsf/websearch/67CCAAF13C8617FC86256E01006C3D69?OpenDocument
    Another option would be to purchase some of our SSR Series input modules. These modules convert AC and DC voltages to a TTL logic signal. If a voltage is within the selected input range, the SSR module returns logic low. Otherwise, the SSR module returns logic high.
    Whether you choose to go with the full featured E Series DAQ board or the SSR modules I recommend contacting our internal sales department at 1-800-433-3488 since they are wonderful at specifying systems.
    Am
    es
    Applications Engineering
    National Instruments

  • 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 |

  • Using cFP-AI-110 to measure rpm:capacitance in the card?

    I am attempting to measure the rpm of a number of different augers. The augers have a magnet on them that closes a magnetic switch when the magnet passes the switch. I have built a circuit with a very small amount of power traveling through a resistor and measure the voltage across the resistor. The magnetic switches are in series with voltmeters. I have attached a picture.
    The idea was that by measuring the time between closed circuits, I could calculate the frequency of the augers. When I use multimeters, the simple circuit I built works perfectly; a closed switch will cause a meter to read (say) 9v, an open circuit reads 0. However, when I swap in the analog input card for the multimeters I encounter a problem. When the circuit is closed MAX instantly shows the proper voltage, but when it becomes open the voltage decays slowly. In other words I get a triangle shaped waveform, and since some of the augers spin rather quickly the peak to trough distance is almost non-existent.
    Does anyone know why the voltage is measured properly as soon as I close the circuit, but why it decays slowly once it is opened? This problem only occurs if I use the NI card.
    Thanks for your time
    Attachments:
    rpmcircuit.jpg ‏9 KB

    If the drawing is right, a pull up seems more reasonable to me
    You don't want floating inputs at your cFP.
     If the contact opens, the - input floats and need to be pulled to to + input to measure 0V
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • 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 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 use cfp ctr 502 for rpm measure+cfp configure in labview

    i'm new in handling cFP's,i need to measure rpm of an engine using cFP CTR 502.Plz i need detail regarding which method either pulse counting or frequency method is required for my application,Plz also tell me is there any possibility of configuring cfp using labview

    Hi,
    please see the following link to NI-Discusion forum. There is simaler question.
    http://forums.ni.com/ni/board/message?board.id=110&message.id=1764&requireLogin=False
    I also send you tow links to LabVIEW examples. I hope it helps.
    http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_answer=&p_guid=BCB1261CBE2635D2E034080020E74861&p_node=174404&p_rank=&p_source=Internal&p_submitted=N
    http://venus.ni.com/stage/we/niepd_web_display.display_epd4?p_guid=BCB1261CBE2635D2E034080020E74861&p_node=
    TN

  • RPM measurement using NI ELVIS? help me out

    i want to measure RPM from two different sources simultaneously using NI ELVIS and i am using an hall effect sensor, how to do it?
    info:
    my hall effect sensor has 3 pins Vcc, GND, out
    i connected the Vcc, GND to ELVIS board itself and the OUT pin to CTR0- SOURCE pin (is this connection correct? i left CTR0-GATE and CTR0-OUT free)
    from one of the website i found that i need to use frequency counter
    so i went to NI-DAQmx->create task->acquire signal->counter input->frequency (i did a test run, nothing was working)
    then i did edge count NI-DAQmx->create task->acquire signal->counter input->edge count, here i could see the up counting every time i passed a ferrous material in front the sensor.

    I'll pass this to you to see if it helps
    http://zone.ni.com/reference/en-XX/help/370466W-01/mxdevconsid/elviscountsigconn/

  • 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.

Maybe you are looking for

  • Wlc 2504 7.4.100 to 7.4.110 upgrade fails

    Hello, I've got a strange behaviour while upgrading my 2504 wlc from 7.4.100 to 7.4.110. I used the gui procedure to transfer the updated aes file to the wlc. The procedure started fine, finished downloading, and then the wlc got completely stuck on

  • Applet using sockets works perfectly under Netscape but not under IE securi

    I have setup a java applet compiled with Sun Forte which implements a connection with a server application with sockets. The applet works perfectly on the same machine when it is loaded from netscape communicator but I receive an com.ms.security.Secu

  • My ICloud Contacts are Outdated and bringing me problems ...

    Basically my ICloud Contacts are outdated and I´m losing lots of new contacts that I have on my Iphone 5. I´ve recovered my IP5 Contacts several times by means of intializing my phone but ICloud keeps on bringing me the Old Ones. Is there a way to ma

  • AVCHD file compatibillity with Prem. Pro CS5

    I have Premiere Pro CS5 and am switching from my old miniDV camcorder to a new AVCHD format camcorder. I'm used to capturing footage directly from my old tape camcorder, but am not familiar with the process of working with files on a flash card. Will

  • After installing airport extreme, can't recieve mail on comcast/outlook??

    After installing Airport Extreme my internet works well, however I can't recieve email on my comcast/outlook.  Outgoing works I have rechecked my settings and they all seem to be ok. Help?