How to measure the rotational speed by using rotary encoder and 1 counter?

I want to measure the rotational speed of a shaft, and I have below hardware:
1, a rotary encoder, with A,B,Z signals output;
2, PCI-E6363 card.
I do konw how to use such a  encoder to measure the rotational angle by using the function "DAQmxCreateCIAngEncoderChan", but this time I need to measure the speed(rpm), as well as the dirction of the speed, which means a negative speed represent a CCW rotate direction.
More detail informations:
for the encoder, the A,B signal is 600ppr, and Z signal is 1ppr
the rotatinal speed is in range: -300 ~ 5000 rpm.
some one suggested me that I can use the "DAQmxCreateCIAngEncoderChan" task to measure the angle firstly and then do the differential analysis with the angle. but I have to enable the Z index function, and it's hard to calculate when the shaft speed is fast then 2500rpm.
Anyone can help me on this issue?
Thanks in advance!

RobertoBozzolo:
Thansk for your reply. You are right that measure frequency to get the speed is the best way, but it's hard to get the dirction at the same time. You suggest me that "perform two angle measurements to get the sense of rotation", but I'm not sure I catched what you mean about this. I try to understand your opinion like this: distribute the signals to 2 counters, and start 2 tasks, one for frequency, the other for angle which used for deciding the dirction?
And by the way, in my application, the counter is limited:
I'm using PCI-E6363, which have 4 counters totally, and I have to measure 4 different speed sensors at the same time, so that means only 1 counter for me to measure the speed and the dirction.
RobertoBozzolo 已写:
To measure the speed from the encoder you can simply follow some of the frequency measurement examples that ship with DAQmx, considering that speed (rpm) is given by frequency (Hz) on one encoder output / 600 (ppr) * 60 (s->min)  = frequency / 10.
Difficult is to add a sign to this measurement: frequency measurement gives you no information about sense of rotation, so I suppose you could perform two angle measurements to get the sense of rotation and then get the speed as above.

Similar Messages

  • How is the processing speed while using struts,spring,and JSF framework

    Hi friends,
    As per earlier technology like Servlets,I mean that there would have much more performance speed than other new technologies like JSP,struts,spring and hibernate framework.Because,in new technologies,flow of processings implicitly via MVC2 basis will probably much more time than older one.
    Total goal is only for attaining MVC2 or any other purpose?
    Please clarify my doubt?
    With Regards,
    Stalin.G

    Home grown applications have a problem in that as more and more features are added, it becomes increasingly impossible to maintain the application and enhance it. This is especially true when the original programmers leave the company. A framework provides a standard design approach that other programmers can hopefully more easily pick up.
    A lot of work has gone into creating these frameworks and they have been used in web sites that have millions of hits from users per day. They have high preformance. Of course, programmers can still write bad code in them that slows down the system. I believe anyone using these frameworks should study them well before using them (such as reading books on them).

  • How to get the incoming file name using JMS adapter and SOAP adapter

    Hi Everybody,
       In one of my interface i need to get the file name of incoming flat file using JMS adapter at sender side. and then i am using xslt to convert it to IDOC and then posting to  SAP IDOC.
    my incoming filname are in this form price<DateTimestamp>.txt. when i do the tranformation this incoming file name should be part of one element in the IDOC which i am posting.
    EX:
    <IDOC
    <REF>price<DateTimestamp>.txt</REF>
    </IDOC>
    Hope it is clear to everybody. I need your suggestion how i can capture this incoming file name and send it as part of IDOC.
    Thanks
    raj

    If they are passing it in message id or correlation id,
    you can access it using
    <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/JMS', 'DCJMSMessageID/ DCJMSCorrelationID')" />
        <xsl:variable name="dynamic-value"
            select="dyn:get($dynamic-conf, $dynamic-key)" />
    Check this:
    http://help.sap.com/saphelp_nw70/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
    Thanks,
    Beena.

  • How can I measure the copy speed of my compact flashcard to folder?

    how can I measure the copy speed of my compact flashcard to folder?
    I dont have a stop watch.

    Hi Steve Zavodny;
    Generally compact flash cards or basically slow because of them being flash memory and USB. What are you after here?
    Allan

  • How to measure the pulse duration of a TTL signal using AI?

    Hi there.
    I would like to know how to measure the pulse duration of a TTL signal using an Analog input.
    These TTL signals comes from an ultrasonic sensor's output. The pulse width of the signal is
    proportional to the distance of the object the sensor detected.
    I have tried using the example "Measure Pulse Width.vi" which uses a counter to measure the
    pulse duration instead. It provides me with correct results.
    However, i will like to know how can i do it using the AI instead.
    I tried it by using the example "Acq&Graph Voltage-Int Clk.vi" which i modified by including a
    timing and transistion measurement vi. Pulse duration was selected as the output. A graph indicator was also added at the output of the pulse duration to monitor the incoming TTL signals.
    However, everytime the TTL signals was detected on the graph indicator, the numeric indicator always produce a "zero" reading.
    I have attached my vi for your reference.
    Can anybody advice me what i have done wrongly?
    Regard.
    Attachments:
    Acq&Graph Voltage-Int Clkv1.vi ‏190 KB

    Hi Paul,
    Today i tried using 2 different methods to read the pulse duration of my sensor signal.
    Both methods use "Acq&Graph Voltage-IntClk" vi as a guide.
    Method1:
    Add a filter vi(lowpass/bandpass) and a timing and transition measurements vi.
    Pulse duration is selected as the output. With some numeric conversion, a centimeter
    reading indicator was created. However, the reading always remains as "zero"
    Method2:
    Add a Mask and Limit Testing vi and a timing and transition measurements vi.
    By adjusting my upper and lower limits, i manage to "filter" a single pulse out from the actual signal.
    However, like the earlier case, the cm reading still remains at "zero"
    I have attached both the methods resulted waveforms for your reference.
    Are there anything that you can advice on?
    Regard.
    Attachments:
    Results_Waveforms.doc ‏141 KB

  • How can I get my document to save with the rotated view last used?

    How can I get my document to save with the rotated view last used? 

    Possible with Adobe Acrobat, not Adobe Reader.

  • 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

  • I want to step through a .mov file frame-by-frame looking at geometry of an aircraft in the video to establish the rotational speed of the propeller.  This should be fairly straightforwaHow to find the frame exposure time of a variable frame rate mov file

    I want to step through a .mov file frame-by-frame looking at geometry of an aircraft in the video to establish the rotational speed of the propeller.  This should be fairly straightforward by looking at how much the propeller moves between each frame and using the exposure time of each frame.
    However the .mov file is from an iPhone 4S and looking at the details, has a variable frame rate.  What I need to know is the duration that each frame is displayed for in order to do my analysis.  Does anyone know how to find out this information?

    I want to step through a .mov file frame-by-frame looking at geometry of an aircraft in the video to establish the rotational speed of the propeller.  This should be fairly straightforward by looking at how much the propeller moves between each frame and using the exposure time of each frame.
    However the .mov file is from an iPhone 4S and looking at the details, has a variable frame rate.  What I need to know is the duration that each frame is displayed for in order to do my analysis.  Does anyone know how to find out this information?

  • How to limit the range of counter using rotary encoder

    Hello all!
    I'm new user of labview..
    I've problem to limit the range of counter by using rotary encoder..
    I use DAQmx 6024e in my project..
    Actually i am designing the controller for both dyno & throttle for engine testing..
    The idea is, i want to vary the output of 0-10V from ni card to control the dyno & throttle..
    I'm already manage to get the output from the analog output..
    The problem is due to my software..
    When i rotate the encoder shaft cw or ccw, it increase or decrease the voltage respectively just like i want..
    But, when the counter hit minimum (0 value) it jump to the maximum count which is 16.772M (for koyo encoder that i used)..
    In that case the output voltage is increase to 10V directly..
    So , the question is how can i limit the range of encoder so that it only count certain minimum or maximum value even the shaft is rotate cw or ccw over it standard limit which is 0 to 16.772M count..
    Tq

    You'll need to do a little software workaround on the values you read from your counter.   But first a little tutorial to explain *why*.
    The E-series boards use 24-bit counters.  When LabVIEW requests an integer count value, the count is returned in a 32-bit unsigned integer datatype, where the 24 lowest bits represent the value in the board's count register.  The upper 8 bits are *always* 0's.
    The count register can increment from 0 to 16 million plus (2^24 - 1), then it must "roll over" back to 0 again just like an odometer.  Similarly, when it decrements past 0, it next goes to the max value of 2^24 -1 as you observed.
    So we need a little software workaround that'll convert (2^24 -1) to (-1) and (2^24 -2) to (-2), etc.  The way to do it is to first detect whether the highest bit is a 1.  One way is to compare whether the count value is >= 2^23, making sure to use integers to do the comparison.  Whenever the value is >= 2^23, subtract 2^24 from it to create your new count value which will then decrement 3,2,1,0,-1,-2,-3, etc. as desired.
    Here's a link to a similar explanation.  Couple more notes too.  First, if this is a continuously rotating encoder, you may still encounter a discontinuity when the revised count value crosses the +/- 2^23 boundary.   Second, direct connection of a quadrature encoder to an E-series board isn't recommended because of unrepeatability when measureing direction changes.
    -Kevin P.

  • How to calculate the rotation degree of tick marks

    Hello Again,
    Thanks to so much help that I received here, I've been able to move right along in learning how to perform my job digitally instead of with an old camera. 
    In my last discussion, I learned out to make the tick marks using copies and rotation.  My question now is, how is the rotation calculated so A) I get the correct placement of the tick marks, especially the small ones as there are so many and B) how do I calculate the rotation degree so that I have the proper amount of space at the bottom of the guage/dial?
    Here is an image to help show what I'm asking:
    I know how to get the large tick marks and the small tick marks, if I were placing them evenly around the entire circle, I would know how to do that also - but since I'm placing them around only a portion of the circle (although still evenly) I'm lost.  I can only figure out the space by hit and miss calculations and that is taking much too long.  I would also need to know how much to rotate the entire thing by in order to get the open space at the bottom as shown.
    thanks for your help!

    You need to use transform effects and you can get this in about 10 or so minutes.
    first you need to set up the objects.
    the thick lines I used effect>distort and transform>transform 20 copies angle 14
    thi ones 100 copies angle 2,8
    G

  • 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

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

  • How to measure the size of a string

    windows app store how to measure the size of a string?
    string str = "Hello word windows app store";

    if you need the actual width the string occupies in pixels than use (see
    this MSDN link for more details):
    Graphics.MeasureString(String, Font)
    if you only need the "length" of the string i.e. no. of characters than use (see
    this MSDN link for more details):
    str.Length
    dont forget to bing / google :)
    hope this helps!
    Graphics.MeasureString(String, Font) can not use in windows store app.
    TextBlock has Measure()
    method, as following:
    Size MeasureString(string content, Size availableSize, double fontSize, string fontFamily="Segoe UI")
        TextBlock tb = new TextBlock();
        tb.TextWrapping = TextWrapping.Wrap;
        tb.Text = content;
        tb.FontFamily = new Windows.UI.Xaml.Media.FontFamily(fontFamily);
        tb.FontSize = fontSize;
        tb.Measure(availableSize);
        return tb.DesiredSize;
    Test:
    string str = "Hello word windows app store";
    Size size = MeasureString(str, new Size(800, 600), 40);

  • How to measure the InfoCube size?

    can any body help me regarding this
    how to measure the info cube size?

    1. use transaction se16, infocube table /../f[infocube name] and /.../e[infocube name], count 'number of entries' - total records
    use transaction db02 tablename infocubename - size in bytes
    Re: how can we measure the info cube size
    2. asap methodology
    Re: Lifecycle Implementation
    hope this helps.
    regards
    harikrishna N

  • How to measure the task instance size

    I am trying to understand how to measure the custom task instnace size that was occupied in the cache repository. Is there a way to obtain the size (in KB s ) in lighthouse 4.1 +sp5. Please help.                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi, Luiz!
    In order to estimate the instance size, you will have to sum up all the instance variables size.
    From the practical prospective it may be difficult to use the algorithm in cases when your instance variables are not simple types.
    For already existing instances, you can look the instance size in the database:
    An instance is just a java object, that is serialized as a byte[] and stored in the engine database, PPROCINSTANCE table, column INSTDATA.
    You can write a simple program (either java or SQL plus) that would read the instance from the BLOB and measure the size.
    And yes, with large instances you can have performance problems.

Maybe you are looking for

  • Post Processing records in BAPI_PRODORDCONF_CREATE_TT

    Hi All, I am using BAPI_PRODORDCONF_CREATE_TT for Production Confirmation with Auto Goods receipt(GR) Feature. But, in case any error in goods movement occurs system creates a post processing record( Visible in transaction COGI). We don't want entire

  • Creating Down Payment Request using BAPI_ACC_DOCUMENT_POST (URGENT!!)

    Hi... I have a posting unanswered. Please take some care about it... ^^ Making Down Payment Request using BAPI_ACC_DOCUMENT_POST

  • Pop-up window to display error message

    hi all, how can i show error messages in pop-up window keeping its status as 'e'? plz help. rgds, avijit

  • JMS ERROR_CODE_JMS_TRANSMISSION

    Hi All, I faced an issue  in JMS receiver communication channel , channel failed with error : "Error while processing message '4ee1ba28-e310-5b04-e100-00000a3597a1';  detailed error description: com.sap.aii.af.ra.ms.api.MessagingException: ERROR_CODE

  • Show row count

    Hi! I'm using JDeveloper 11g Release 2 (11.1.2.3.0). Here an easy question. For the moment, I have this query: SELECT Sale.SALE_DATE,        Sale.SALE_PRO_ID,        Sale.SALE_ID        Product.PRO_ID,        Product.PRO_NAME FROM Sale, Product WHERE