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.

Similar Messages

  • 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

  • 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 set the sampling interval using DAQ device?

    Now I have a capacity sensor and a 24 bit DAQ device (http://www.mccdaq.com/usb-data-acquisition/USB-2404-10.aspx).
    The DAQ device has the maximum sampling rate of 50kS/s . My question is how to set the interval of data collection. For example, if I set the sampling rate to 2000, in continuous sampling mode, I use DAQmx read.vi in a while loop and set the 'number of samples per channel' to 100. I want to plot these data as a function of time by using a XY graph and also save these data. So I add a 'Mean' function to get the average of the 100 samples per each loop (than means, there are 20 data output per second). But when I set the 'number of samples per channel' much smaller (to get more data per second), there are some problems. It seems that the program cannot read so many data and get the average at a higher frequency. I don't know where the problem is. All in all, how to collect data more frequently?Maybe I didn't express my question clearly. I'll upload a simple program later if necessary. Thanks.
    Solved!
    Go to Solution.

    Another question is in continuous mode, NI DAQmx uses Samples per channel to determine the buffer size. But according to the website you specified, it says if the acquisition is continuous (sample mode on the DAQmx Timing.vi is set to Continuous Samples), NI-DAQmx will allocate a buffer according to the following table. And for sample rate between 100 - 10,000 S/s, the buffer size is 10 kS. So if I set the sample rate to be 5000 S/s, and set the Samples per channel to be 20000, then what exactly the buffer size is? 20 kS or 10 kS?
    Thanks.

  • 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 to measure frequency using daq 6009

    HAI..
       Im using PFIO line to measure the frequency..i have attached my vi along with this..output is read approximately to the given input when i highlight the execution,but when i use run and run continuosly alone,am getting incorrect values..im totally confused..suggest some ideas..
    another doubt, may i use analog port to measure the frequency of an oscillator?if so kindly help me to create a vi for this also..
    Attachments:
    counter.vi ‏19 KB

    From your VI, one thing is clear, you are creating a task, but you are not clearing it. Please take a look at this example:http://decibel.ni.com/content/docs/DOC-8172

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

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

  • Analog measurement WITHOUT DAQ device

    Hello everyone,
    I have an analog voltage which is varying between -10volts to +10volts. Is it possible to measure this analog voltage using LabVIEW software without DAQ ? If not kindly suggest the options available for DAQ device.
    In the traditional interfacing techniques which uses parallel port and/or serial port. We can acquire signal using C language and inport and outport commands.And no DAQ is required.... I was hoping if LabVIEW can be used without a DAQ device.
    I know that RS232 and parallel port can be used but how will the space and mark levels be used for acquiring an analog signals.

    Hello Miaa,from your description I can think about two things,that remind me the days when there where no sound cards
    at all computers,but people found the ways to produce sound from PC:
        1)   
                 Output:  you can get from your LPT 8 bit analog output if you connect all 8 data pins to one.
                 Input:  it probably possible to get 8 bit input,but you need to use some resistors,and have some knoledge in electronics,
                             in order not to burn your LPT with 10 volt input.
               Again,it's possible but not trivial way.
       2)    In general (very): one can get "analog output" even from 1 bit connection,
               in order to do it, the connection speed should be fast enought,and the illusion of "anlog output" reached by changing
              the ON/OFF state of the connection,in right way (playing with delays between ON/OFF,according to signal).
              About "anlog input" using serial port I can say nothing.
    In any case,this is very intersting but time cossuming issue,but if you know how to do it,the LabView part is not a problem,
    you have there access to parallel and serial ports.
    LV 8.2 at Windows & Linux

  • How do i detect DAQ device number programatticaly using Visual Basic (not using MAX)?

    how do i detect DAQ device number programatticaly using Visual Basic (not using MAX)?

    Several of the CWDAQ objects have Device (the device number), DeviceName, and DeviceType properties that I think will give you the information that you're looking for. For more information, look in the index of the Measurement Studio reference for Device, DeviceName, and DeviceType.
    - Elton

  • 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

  • To measure current in DAQ should we use rms value or DC avereage value

    to measure current in DAQ should we use rms value or DC avereage value

    i am taking measurement for single phase or 3 phase voltage and current and display it on front panel voltage measurement is valid but doinh with current measurement i suffer some problem should i take dc avg value or rms value for measurement 
    when i take dc average value it give result as i want but doing with rms valur it give wrong result according to my circuit sitution. As, we know in ac case rms value is used for measurement but it give wrong result so guide me in this regard 
    THANK YOU 
    Attachments:
    Final pp self.vi ‏156 KB
    Untitled.png ‏46 KB

  • How to simulate a DAQ device and use it for testing applicatio​ns without hardware??​?

                            how do i simulate a DAQ device
    in MAX and use it for testing applications without  hardware???
    If my application requires inputs
    from external hardware to proceed how can I simulate a DAQ device in LabVEIW?
    i need to simulate several Digital inputs and Outputs to test the software. currently i dont have the hardware and DAQ device here. 
    please reply with your valuable suggestions. 
    many thanks in advance
    RENN 
    Kudos always welcome for helpful posts
    Solved!
    Go to Solution.

    Hi,
          There is no option to simulate traditional device.You need hardware for that so i would suggest to simulate a PXI device which has similar configuration to PCI-6014 and to do a small modification to your application..

  • Can I use a NI 6009 DAQ device to act as a switch to close a circuit?

    Can I use (and how do I do it)a NI 6009 DAQ Device as a swith to close a ciruit?

    You can't use the 6009 as a switch. You can use the DIO to control a switch (like a FET or transitor).  How you would do this really depends on your application.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for

  • Moving my music from my ipod to a music folder on my laptop

    So I'm not sure if my music gets backuped too so i wanna make a folder on my laptop of my music i have on my ipod, but i'm not sure how....so somebody help me!

  • Net value issue in Billing document

    Hi, I have created a Intercompany Purchase order having total value 100 Euros. delivering plants create a delivery and posts goods issue. when they try to create Billing document with reference to this deivery in transaction VF01 , net value is appea

  • How to Decrease fragmentation level of a table.

    Hello Everyone, There is a table present in my production database. Its version is Oracle 10G(10.2.0.1.0) i)Its size is 26 GB with fragmentation level. ii)It has more then 48 crores of rows. iii)Its size is 20 GB without fragmentation level.(So 6 GB

  • Greater than sign in switch statement

    it wont allow me to use the greater than sign in this program how can i fix this? public class q2b     public static void main (String [] args)         int x = 2;         switch (x)         case 'x < 1'         System.out.println("x is less than 1");

  • All PA & OM Infotypes in one IDOC

    Hi All, Could anyone please let me know if there is any standard idoc which can cater to all the PA & OM infotypes. I searched for some some of the HRMD* idoc types which supports either PA or OM infotypes , but not completely. Any help is really app