Calculate RPM using NI 9402

I am attempting my first simple Labview DAQ project, though I am more comfortable with Signal Express.
My torque sensor has a +/- 5Vdc, 60 pulse/revolution speed output. The speed will be up to 200 RPM, so I was aimed towards a NI 9402 High Speed Digital I/O module for my CompactDAQ chassis. When I used DAQ Assistent to configure the counter, it indicated that there were no supported devices found. Is there some easy code to calculate shaft RPM with the 9402 configured as a digital input?
Thanks
Solved!
Go to Solution.

I have the same module and am also trying to calculate RPM from a transducer that outputs 60 pulses/revolution however I am using the cRIO platfrom and I believe the Express scripts do not work with cRIO, correct? What would be the best way to go about programming this calculation then?
Best,
Dan

Similar Messages

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

  • Calculate Tax using BAPI_SALESORDER_SIMULATE

    Hi All,
    I am doing a proof of concept to get some data from the third party tool and calculate tax using BAPI_SALESORDER_SIMULATE.
    I am gonna wrap this BAPI in a web service and pass the calculated tax amount back to the third party. I want to pass the default values for all the fields except for the credit card parameters.
    Can some one help me with the default values that I can pass to this BAPI to check how it works.
    Thanks,
    Guru.

    Hi Anurita,
    How did you solve this issue? Do you also have an example code?
    I am trying to enable auto vat calculation for vendor invoices.
    Many Thanks!
    Kenan

  • 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

  • Install RPM using yum

    Hi, I think its not the right forum to ask the question related to LINUX. If any one has any idea then please reply to my post.
    I want to install some missing RPM's on the machine on which i am planning to install 11gr2 standard edition using yum command. My linux machine has the internet connection.
    If i want to downlaod and install the package(gcc-4.1.2-42.el5.x86_64.rpm) using you then what syntax i have to use in order to install that package.
    MY OS version is:Red Hat Enterprise Linux Server release 5.1 (Tikanga)
    Linux AHF10241.domain.local 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007
    x86_64 x86_64 x86_64 GNU/Linux
    Thanks All.

    Hi ,
    Can you please follow the below guide lines.I'm sure it will work.
    Step 1:
    Go to /tmp directory
    $ cd /tmp
    Step 2:
    Download awstats using wget
    $ wget http://easynews.dl.sourceforge.net/sourceforge/awstats/awstats-6.5-1.noarch.rpm
    Now install awstats
    Step 3:
    $ sudo rpm -ivh awstats*OR
    # rpm -ivh awstats*
    (or)
    # rpm -ivh http://easynews.dl.sourceforge.net/sourceforge/awstats/awstats-6.5-1.noarch.rpm
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com/

  • Can we calculate HRA using Indirect valuation

    Can we calculate HRA using Indirect valuation/ summe/prznt.
    Pls let me know

    Indirect Evaluation of Wage Types: Indirect Evaluation is a method to calculate the eligible amounts (default) for some of the wage types. INVAL is the Indirect Evaluation Module used to meet the Indian specific business requirements.  This helps in reducing data entry problems and administrative problems to Payroll Administrator.
    Following are the different indirect valuation methods available in SAP:
    INVAL A:  To default fixed amounts
    INVAL B:  % on base wage type (s) + amount
    INVAL C:  % on base wage type (s), subject to a maximum of some fixed amounts
    INVAL D:  Default fixed amounts based on slabs applicable

  • How to write a sql query to calculate weights using CTE

    Hi guys,
    want some help using a CTE to generate data using recursive SQL - input data in table A to be transformed into table B shown below
    Table A
    Instru_id_index     instru_id_name    instru_id_constit  con_name   weight
            56                       INDEX A                     
    23                  A                 25
            56                       INDEX A                     
    24                 B                  25
            56                       INDEX A                     
    25                  C                 25
            56                       INDEX A                     
    57              
    INDEX  B       25
            57                      
    INDEX B                     31                 
    D                 33
            57                      
    INDEX B                     32                 
    E                  33
            57                      
    INDEX B                     33                 
    F                  33
    (Logic should be recursive in order to be able to handle multi-level, not just level 2.)
    Table B
    Instru_id_index     instru_id_name    instru_id_constit  constit_name   weight
            56                       INDEX A                        
    23                A                   25
            56                       INDEX A                        
    24                B                   25
            56                       INDEX A                        
    25                C                   25
            56                       INDEX A                        
    31                D                   8.3
            56                       INDEX A                        
    32                E                    8.3
            56                       INDEX A                        
    33                F                    8.3
            57                       
    INDEX B                       31                
    D                   33
            57                       
    INDEX B                       32                E                   
    33
            57                       
    INDEX B                       33               
    F                     33
    how can I write a simple CTE construct to  display the data in table B -  How can i calculate the values of weights as 8.3 respectively - calculate these without changing the structure of the tables.
    Can I do this in a CTE

    Full join?
    Anyway, thanks for Rsignh to produces a script with CREATE TABLE and INSERT statements. I've extended the data to one more level of recursion.
    create table weight_tab(
     instrument_id_index int,
     instrument_id_name varchar(10),
     instrument_id_constituent int,
     constituent_name varchar(10),
     [weight] decimal(10,2))
     insert into weight_tab values
     (56,'INDEX A',23,'A',25),(56,'INDEX A', 24,'B',25),
    (56,'INDEX A',25,'C',25),(56,'INDEX A', 57,'INDEX  B',25),
    (57,'INDEX B',31,'D',33), (57,'INDEX B', 32,'INDEX E',33),
    (57,'INDEX B',33,'INDEX C',33),
    (33,'INDEX C',42,'Alfa',60),
    (33,'INDEX C',43,'Beta',40),
    (32,'INDEX C',142,'Gamma',90),
    (32,'INDEX C',143,'Delta',10)
    go
    SELECT * FROM weight_tab
    go
    ; WITH rekurs AS (
        SELECT instrument_id_index, instrument_id_name, instrument_id_constituent,
               cast(weight as float) AS weight, cnt = 1
        FROM   weight_tab a
        WHERE  NOT EXISTS (SELECT *
                           FROM   weight_tab b
                           WHERE  b.instrument_id_constituent = a.instrument_id_index)
        UNION ALL
        SELECT r.instrument_id_index, r.instrument_id_name, w.instrument_id_constituent,
               r.weight * w.weight / 100, r.cnt  + 1
        FROM   rekurs r
        JOIN   weight_tab w ON r.instrument_id_constituent = w.instrument_id_index
        WHERE r.cnt < 4
    SELECT instrument_id_index, instrument_id_name, instrument_id_constituent,
           cast(weight AS decimal(10,2))
    FROM   rekurs
    go
    DROP TABLE weight_tab
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to test the communication stability and calculate ber using the CVI ?

    Our chief engineer gave me a task yeasterday.He asked me to do software testing and calculate bit error rate that we would know our communication stability.
    However,I have never touched this aspect of knowledge. I have known a bit about CVI and I want to write  bit error rate code using CVI.Thus,I could test the communication stability.
    But I don't know how to analyse and judge the receiving codes whether they are right or wrong.
    We use Modbus communication protocol and receive data via serial port,so I want to save all datas and record the total datas number ,marking as M.
    then,save the eligible datas and record the mumber marking as N. So, bit error rate is (M-N)/M   .
    Whether this is feasible ? Or you have any good idea. Thank you very much.
    unsigned char in_data[100];
    inqlen = GetInQLen (comport);
    for(i=0;i<inqlen;i++)
    in_data[i]=ComRdByte(comport);
     Above is my code that receive all datas and I want to save the array in_data[] data and record the number.
    switch(inqlen)
    case 19:
    crc=usMBCRC16(in_data,inqlen );
    if((in_data[1] == 0x03)&&(crc==0)&&(in_data[0]==device_addr))
     Above is the condition judgement that receive eligible datas which number marks as N.
    I know there is a precondition that I filter out all the wrong data . However ,I don't know any good idea. I will appreciate if anyone could help me.
    Thank you very much.
    Best regards.
    xiepei
    I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
    Solved!
    Go to Solution.

    Hi xiepei,
    since you are using modbus, a simple error checking is implicit in the protocol and is the comparison between returned checksum and the calculated one on the received message: checksum errors, if any, are an effect of communications errors (you should have at least 2 bits changed and on particular patterns to have the checksum be calculated correctly!). You won't be able to calculate BER on them, but you can calculate PER (Packet Error Rate).
    Another flag for communication errors, on the other direction, is to intercept error messages from the device: if it fully implements modbus protocol, it should return some warning in case of error (I seem to remember that in some cases it returns the reveived message with some error bits added: please check in modbus documentation).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How do I calculate IRR using months, not years

    When using the IRR funtion in Numbers for Mac (internal rate of return), how do I let the formula know that my time period is months and not years?  In the Excel function, there is an extra arugment in the function that allows you to select the dates and the cash flow for that date.  In the Numbers version, you can only select the cash flows, there is no variable for the dates.  I believe that the function in Numbers automatically assumes you are using years when in fact my cash flows are represented in months (monthly rent from properties).  The function description in Numbers clearly states that you can use months so I must be missing something.  The examples that Numbers provides for using the IRR function all assume the cash flows are in years.
    For non-finance people, the time frame makes an enourmous difference.  If you invest $1.00 with me today and a year from now I give you back $2.00, your return on investment is 100% (you doubled your money) and your IRR is 100% because it took exactly 1 year.  But if I wait five years to give you the $2.00, the return on investment is still 100% (still doubled your money) but the IRR is 20% because it took five years.  Not as good a deal for you and the IRR represents that.  In these scenarios, I can calcullate the IRR using Numbers.  But what if I give you the money back after 6 months?  Or after 18 months?  Or give you .25 cents each month for 8 months?  The IRR will be MUCH different.  How do I tell Numbers my intervals are not in years?
    Thanks for any help!  For two years I've been doing all my spreadsheets in Numbers and then having to calculate the resulting IRR in Excel!! Yuck.

    dB,
    IRR works identically in Numbers and in Office. If that's not the function you want, that's another issue. Here's your IRR calculation in Office (LibreOffice):
    And here it is in Numbers:
    If your payment series is in uniform time periods, why would you use anything besides IRR?
    Jerry

  • How to calculate predictions using an MVAR model

    Hi All,
    I'm using an MVAR model (Least Squares). The AR VI in the Advanced signalprocessing toolbox calculates the regressionparameters and returns the noise that is not acounted for by the MVAR model.
    However I need the estimations too... So I tried to subtracting the noise from the original data. Can somebody please confirm that this approach returns the correct estimations from my MVAR model?
    Best regards,
    KK 

    Hi All,
    I'm using an MVAR model (Least Squares). The AR VI in the Advanced signalprocessing toolbox calculates the regressionparameters and returns the noise that is not acounted for by the MVAR model.
    However I need the estimations too... So I tried to subtracting the noise from the original data. Can somebody please confirm that this approach returns the correct estimations from my MVAR model?
    Best regards,
    KK 

  • Plotting pump flow against RPM using xy graph

    I want to plot the output flow from a pump versus the shaft rpm. How to achieve continuous plotting using a XY graph ?
    I read through the posts here and in one of that a refernce was made to the Variable-Timechart.vi example as a possible solution for this scenario. Is that the only one way out ?
    As an added information I am using a M- Series card that supports only the NiDAQmx drivers.
    Some tips to tide over the problem would be helpful.
    Thanks
    Raghunathan
    Raghunathan
    LV2012 to Automate Hydraulic Test rigs.

    Hi Raghunathan,
    You could use waveform charts but they have to have a constant delta t for the time axis so Variable Time Chart XY.vi seems to be a better option.
    Regards,
    Ankita

  • 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

  • ALV Grid( How to calculate percentage) using alv gridfunctional module.

    Dear Gurus,
    In my report first coulmn and second column are sales and margin but third coulmn is margin%. now at last of report i want to display total sales and total margin and overall margin percentage. I am able to do total of sales and margin by using standard functionality of grid. I need to know to calculate overall percentage. I am not using alv oops method . I am using fucntional modules .
    Thanks in advance.
    Regards
    Dave

    Hi Devendra shrama,
    Percentage calculation in ALV
    The following method is a bit of a mission but it
    seems to be the only way around this at the moment.
    Also it only works with an ALV Grid not an ALV List.
    You have to take over the total lines manually.
    1. In the ALV output tab add extra fields that are the
    same as those on which you are sorting and contain the
    same values.
    2. In the Field Catalog you must add these fields but
    they must be hidden i.e. no_out = 'X'.
    3. These fields must be included in the Sort Catalog
    with subtot = 'X'.
    4. In order to handle the final total line in your
    layout for the ALV you must set field no_totalline'X' because you are going to be taking this over as
    well.
    5. Create a form called SUBTOTAL_TEXT or similar
    structured as follows:
    form subtotal_text using ep_subtot_line like
    output_tab
    es_subtottxt type
    slis_subtot_text.
    In this form you will do the percentage calculation
    again at total level. The structure ep_subtot_line
    will contain a field for each of the fields in your
    output_tab i.e. ep_subtot_line-sales,
    ep_subtot_line-cost and ep_subtot_line-margin. Put the
    margin calculation into ep_subtot_line-margin.
    6. In the eventtab that you pass to the ALV_GRID
    function module you must create a record with the
    field name = 'SUBTOTAL_TEXT' and the field form = the
    name of the form you created in step 5 above.
    This works OK.
    i hope it helps you.Happy solving.
    thanks
    karthik

  • HDD RPM using powershell

    Hey guys,
    Do we have script with which i can pull HDD RPM of my remote server by using PowerShell script? i tried to check via WMI object, but couldn't get any clue related to HDD RPM. 
    Thank you.

    You can use Get-PhysicalDisk retrieve disk info. The returned MSFT_PhysicalDisk object has SpindleSpeed property, indicating rotation speed for rotating disks, but not all rotating disks provide this information. 
    Gleb.

Maybe you are looking for

  • Error when activating update rule

    HI BI Expert, The original transfer rule for 2LIS_11_VAITM was deleted accidently and I created new one and mapped with the existing infosource. The system always generates the following error at the time of transport to another client. Error when ac

  • Windows Store No Longer Working

    Hello:  My new computer came with factory installed Windows 8.1.  About a week ago, my Windows Store app stopped working. I don't know why. The error message says I might need to refresh Windows, however I did not receive a Windows disk so I don't kn

  • Does the sound of your caller get reduced when you speak at the same time?

    Hi everyone, I'm noticing some strange behaviour of my iPhone 3G's audio on the O2 network here in the UK. Both O2 & the iPhone are new to me so I don't know which is the cause, but was wondering if anyone else has experienced this 'problem'? What ha

  • 2 render-kit in  my faces-config.xml

    I'd like to have 2 renderkit in my faces-config.xml. I set render-kit-id with "HTML_BASIC" for the first one and "XHTMLMP" for the 2nd. Then i got an exception when i launch tomcat : javax.faces.FacesException: java.lang.IllegalArgumentException: No

  • Why FCP X change my video color?

    i face this problem so i cannot do any of my work!!