A simple count egdes task

Hello,
I have a simple little Question. My Problem is that the counter counts to many events if the second counter signal is connect. But first I will tell you what have I done. I create a simple egde count Task with MAX. MAX Tells me to connect my encoder signal to PFI 3. If I do this all is okay. But if i connect the second phase shifted encoder signal to PFI 5 (I need this for a another task) the counter counts two times more egdes as it should be. Is this okay? What have I made wrong? Is there a possibilty to avoid this?.
Thanks for your help
Best regards
Stefan Farmbauer

Hi Stefan,
first of all, I need more information about your setup:
1. What NI device are you using (device number, E-Series or M-Series,...)?
2. What's the Version of your DAQmx driver (check out My System >> Software in MAX)?
3. What's the Version of your MAX?
4. Which counters did you specify for your tasks?
5. How did you configure your counter tasks (edge count, rising/falling,...)?
6. Which terminal block (to connect your device to the quadratur encoder) are you using?
7. Which Pins on the terminal block did you select (did you choose the right ones)?
Please answer the above questions, so I can be of assistance.
Bye
Daniel
NIG

Similar Messages

  • Retriggerable buffered counting edge task

    Dear all,
    I have been working on "Retriggerable buffered counting edge task" on a single counter input channel, let me describe what I want to achieve:
    Create a CI to count finite rising edges with external sample clock (eg. Dev1/di/SampleClock) at certain sampling rate, and set CI.edge.Term at one PFI which is hardwired to another digital input channel. Furthermore, I'd like to set "retriggerable start trigger" to this CI by another PFI line.
    It turns out that I can only set "arm start trigger" on this counter input channel, instead of "start trigger" since the error of 200452: attribute not supported in task context showed up at configuring digital edge start trigger. It seems that I can only set "retriggerable start trigger" on counter output task, and use two counters to achieve above, but I was wondering if there is a way to accomplish by single counter. Any suggestion is highly appreciated.
    Solved!
    Go to Solution.

    Dear John,
    I just tried and run into another issue with overflow. The idea is to synchronize this counter with finite DI and to read both buffers out when DI's buffer is filled. Since I am running CI in contineous mode, it seems to be reasonable to run into overflow on buffered CI after a couple of triggers; Error: -200279 when trying to read CI buffer. Is there a way to skip/ignore overflow but still read buffer with size that I specified at attribute of SamplePerChannel? or any better idea of design to achieve what I am trying to do? I was wondering how effective it would be by increasing buffer size to avoid overflow since no known pattern on the trigger signal.
    Really appreciate your help. Thank you.

  • Simple Count using Analytic view and Odata

    Hi Experts,
    I have an analytic view based on one table and Odata services on top of it.
    Now i want to include three measures just simple count with group by,
    just for this i ddint want to go for calc view. Please help me how to achieve this using analytic view and Odata script.
    Thanks,
    Devi.

    Hello George,
    I don't have any personalization set on the info space. Also I am using mapped Account in BI to connect to HANA. The confusing part is that it is able to validate the infospace with the input parameters and index it. However query does not return any results. I even tried running the same query which explorer sends to HANA in the SQL editor and there too the same results,the query does not return anything. The model does return data when I do a data preview and if accessed from other tools like AAO.
    Also when I use SSO connection to HANA, indexing of the infospace fails. Where can I see the error log?
    Thanks,

  • Display Count Of Tasks In Todo Task Group

    Hello,
    We've just completed a migration and created new outlook profiles for our users.
    My director is certain that he used to have a count of the number of tasks in each group here:
    Does anybody have any ideas as to how to get to this?
    Any help much appreciated!

    Hi,
    Which version of Outlook did you use before? Is your director using any add-in to achieve the goal before?
    As far as I know, Outlook doesn't have such feature to display count of tasks in To-Do List group. We can only show the count of items in each Outlook folder by right clicking the folder and selecting "Show total number of items" bullet.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Analytic workspace manager - simple count?

    I must be missing something in the Analytic workspace manger as all i want is a simple count of the rows. Its a basic type of calculation.
    I have a number of agreements that have a sum of the amount on a Yearly, QTR, Month, Day. I also need the number of agreements for each part of the hierarchy.
    i.e. (contrived daily example)
    SELECT WORKING_DATE,COUNT(AMOUNT),SUM(AMOUNT)
    FROM AGREEMENTS
    GROUP BY WORKING_DATE
    The amounts work fine and the dimensions are working. Just cant get a COUNT working. I have seen work around hacks; but find it hard to believe that these are needed on a basic function that should be there.
    Cheers
    Chris

    OLAP does not make this as easy as it should be, but COUNT can be calculated along with another aggregation operator, like SUM.
    When you create a cube using AWM and specify SUM as the cube aggregation, you should see something like this in the associated cube XML.
    <ConsistentSolve>
    <![CDATA[SOLVE
      SUM
        MAINTAIN COUNT
         OVER ALL
    )]]>
    </ConsistentSolve>Alternatively you can see the specification in the USER_CUBES view.
    select consistent_solve_spec
    from user_cubes
    where cube_name = '...'If you see the MAINTAIN COUNT keywords, then this says that a COUNT has been calculated alongside the SUM. If it isn't there, you can add it to the XML (as shown above) and recreate the cube. You can see the effect of the keywords in the aggmap generated for the cube. Note the "COUNT YES" statements in the following example.
    DEFINE UNITS_CUBE_SOLVE_AGGMAP AGGMAP LOCKDFN
    AGGMAP
    RELATION this_aw!TIME_AGGRREL(this_aw!UNITS_CUBE_SOLVE_TIME_HVSET) PRECOMPUTE(this_aw!UNITS_CUBE_SOLVE_TIME_PVSET) OPERATOR SUM args  DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES COUNT YES
    RELATION this_aw!CUSTOMER_AGGRREL(this_aw!UNITS_CUBE_SOLVE_CUSTOMER_HVSET) OPERATOR SUM args  DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES COUNT YES
    RELATION this_aw!PRODUCT_AGGRREL(this_aw!UNITS_CUBE_SOLVE_PRODUCT_HVSET) OPERATOR SUM args  DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES COUNT YES
    RELATION this_aw!CHANNEL_AGGRREL(this_aw!UNITS_CUBE_SOLVE_CHANNEL_HVSET) OPERATOR SUM args  DIVIDEBYZERO YES DECIMALOVERFLOW YES NASKIP YES COUNT YES
    AGGINDEX NO
    CACHE SESSION
    ENDIf you have this in place, then you can get the value of COUNT using the AGGCOUNT function in OLAP DML. To add a "count of sales" measure to the UNITS_CUBE in global, for example, I created a calculated measure with this expression.
    QUAL(AGGCOUNT(GLOBAL.GLOBAL!UNITS_CUBE_STORED) GLOBAL.GLOBAL!UNITS_CUBE_MEASURE_DIM 'SALES')

  • Simple count up timer won't stop.

    Hi,
    I made a simple count up timer, it is working just fine but I would like to have the %-sign next to the numbers so it would look as a preorder. But as I add "%" sign to the function, the counting never stops (at 100% any more), and continues counting.
    What am I missing??
    var count:Number = 1;
    var myTimer:Timer = new Timer(10);
    myTimer.addEventListener(TimerEvent.TIMER, countdown);
    myTimer.start();
    function countdown(event:TimerEvent):void{
    //myText_txt.text = String((count)+myTimer.currentCount);
    myText_txt.text = String((count)+myTimer.currentCount)+"%";
    if (uint(myText_txt.text) >= 100) {
            myTimer.removeEventListener(TimerEvent.TIMER, countdown);
    Thanks!

    You should learn to use the trace() function to see why things don't work as expected.   The "%" makes converting it to a uint not what you expect.  Trace uint(myText_txt.text)  and you will see why comparing the uint value of a non-numeric string to a number isn't going to work.  Try the following instead...
    var count:Number = 1;
    var myTimer:Timer = new Timer(10);
    myTimer.addEventListener(TimerEvent.TIMER, countdown);
    myTimer.start();
    function countdown(event:TimerEvent):void{
       myText_txt.text = String((count)+myTimer.currentCount)+"%";
       if (uint(String((count)+myTimer.currentCount)) >= 100) {
            myTimer.removeEventListener(TimerEvent.TIMER, countdown);

  • Simple counter in seconds

    Hi,
    In my code I have a while loop that may or may not take more than x secs to run. Once the while loop has been running for x secs I would to provide a series of commands. Therefore, I need some sort of counter. Will Tick Count help me with this? If so, how? If not, how can I create a counter for this simple task? Thank you.
    Alfredo
    Alfredo
    Solved!
    Go to Solution.

    Yes, Tick Count can be used for this, as well as other mechanisms. For example, you could use the Get Date/Time in Seconds function. Here's asome simple examples:
    Attachments:
    Example_VI_BD.png ‏6 KB

  • How do I create a simple counter in Dreamweaver CC?

    Hello there Dreamweaver community,
    I am a student creating my first website and I NEED HELP!
    My site is live and it's based on the correct spelling of grey.
    www.lefthandedart.com
    Within the site I have a "vote" page that allows users to vote "grey" or "gray" (note: currently links to other pages on the site). What I want to do is have a simple hit counter under each spelling that adds one when users vote for that spelling. I'm having a fit trying to figure out how to program this though.
    Please help.
      Thank you,
    Terry B

    You'll need scripts to do this.   Most polling/voting scripts use server-side programming like PHP and a few other files to display the results.
    http://www.gentlesource.com/poll-voting/
    PS.  In the US, the correct spelling is gray. 
    Nancy O.

  • I need a simple counter

    Hi everybody,
    I need a counter so that when ever i press the submit button continuously it should display the number starting from 1, can anybody help me with the simple code

    Not as easy as you'd imagine with applets. You need some way to store the hits, usually through a file on the server. That's not gonna happen in a hurry for 2 reasons -
    - Applets can't read/write files
    - Your web server usually won't let you run programs on their machine (ie, programs that listen for socket connections from applets, then load/read/write/close a file).
    In short, no, there is no simple java solution (that I know of).
    Cheers,
    Radish21

  • Simple counter within Control & Simulation Loop

    Does anyone know a simple way of creating an incremental counter within the Control & Simulation Loop ? It's not possible to have a For loop within the Control & Simulation Loop hence the shift register method is out.

    The "simulation parameters" function on the utilities pallete outputs a "Timestep Index" that is incremented each step. That's the simplest option. Alternatively, you could use a sub VI that executes on major steps and contains a for loop.

  • Is it possible to use "Delay Values" to create a frequency signal from digital "Count Edges" -task? (= are the results I'm getting correct?)

    Hello.
    I have a digital encoder from which I need freaquency information (to ultimately get rpm -infromation). The problem is that this task is inside a loop with 2 other DAQmx -tasks that are using "one sample on demand"-aquisition mode and if I configure this new counter task to be a freaquency task, it only updates once in ~ second which makes the whole loop lag.
    I thus created an "artificial" freaquency signal by using "Count Edges" -aquicition mode and the "Delay Values" -block so that I substract the delayed signal from original "Count Edges" -signal. There is a 0,01s delay in the loop and I figured out that if the history of the "Delay Values" -block is 100 samples I would thus get the real edge-freaquency.
    I tested this configuration and the results seem to be at least really close to correct but I have no idea if this idea is in any way correct...
    This explanation was probably quite confusing so please see the picture attached.
    Thanks a lot in advance! 
    Attachments:
    are_the_results_correct.jpg ‏200 KB

    First of all, thank you for quick reply. Unfortunately I don't have the acces to the vi. until tomorrow.
    And yes, I think you understood correctly: essentially this arragement measures how many edges have been counted during one iteration. This is how I figured out that this could then be used as a frequency measurement:
    1. From the "Edges - Delayed Edges" I get the information on how many edges have been counted during last iteration.
    2. I "know" (really I don't?) that one iteration lasts ~0,01s because of the delay in the loop.
    3. There is 2048 edges in one round of the encoder so I get the rpm as follows: rpm = (edges - delayed edges)/204,8*60(s)
    (If I was using history size of one as you suggested it would be: rpm = (edges-delayed edges)/2048 * 60) However using history size of 10 and taking it account in the multiplication smoothens the response nicely.
    But doesn't this arragement count on the fact that the vi runs smoothly and there is no additional lag?
    I quess using another loop and notifiers for a dedicated freaquency measurement as you suggested could be worth trying. I just have to first learn how to use them. 
    If I do use them will the main loop run smoothly and not wait for every update of the notifier? This would be essential since the freaquency output refresses only about once in a second if I use the continious aquisition mode.
    Attachments:
    are_the_results_correct.jpg ‏198 KB

  • Help me out with a simple dialog box task

    i have used a single dialog box connected to a case structure..but the problem is it only executes true case after pressing "OK" button.
    i need the false case to keep on executing untill "OK" button is pressed.. please heelp me out..

    I agree that the spamming of the same question over and over is annoying and makes me LESS likely to help you. However, I will try to answer you.
    I believe that you are probably fairly new to LabVIEW. LabVIEW is a dataflow language. As such, each node operates as soon as all of its nodes have data. Your One Button Dialog Box does not produce data until the button is pressed. Therefore, there is no way for the Case structure to execute either the True or the False case until the One Button Dialog Box produces its data.
    So, there are several ways to work with this. Several have already been suggest in this or one of the other 3 queries.
    You could place the button on the front panel. If it is on the front panel, it will be read immediately and the value of the button will be available. If it is inside of the loop, the value will be available each time the loop is run. So the suggestion to use a button on the front panel would be a good one.
    If you need to use the dialog box, you could use a producer-consumer architecture. The dialog would be in the producer and the case code would be in the consumer. I think that this is not as good of a solution, but if this is part of a larger application it may be desirable to you for other reasons. There is an example producer-consumer that you can find in the example finder and I think that there is a template for one as well.
    There are other ways to do this as well, but they get more and more complicated and I don't think you have the experience necessary to accomplish them. I also don't think you need to make things that complicated for such a simple task.
    Good luck and try not to duplicate questions again.
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • Simple Count Down??

    Hi,
    I'm creating a simple game in java 3d. All I want to do is have the game close after 5 minutes. Is it possible to set a five minute count down once the game has started?
    Thanks,
    Sean

    Yes.
    Create a timestamp when it starts running. Periodically check the current time against the timestamp.

  • Simple Count

    All,
    I know I'm asking a basic question here, but what is the simplest way to get the count of all tables in dba_tables. Now, let me explain before I get ripped on really fast.
    I run dbms_stats every morning, which updates the num_rows in the dba_tables. This is the number of rows in the table at the time dbms_stats were ran. What I'm trying to do is calculated how many rows are inserting into the tables after the dbms_stats run at 7 am each morning. This way I can track the growth of tables by the hour instead of by day using dbms_stats.
    I've come up with a small PL/SQL block, but can't get the select count(*) to work. Would like for someone to take a look and make a recommendation or explain why I'm over looking the simple solution.
    /---CODE---/
    SET ECHO OFF
    SET FEEDBACK OFF
    SET SERVEROUTPUT ON SIZE 1000000
    SET LINESIZE 60
    SET TERM ON
    DECLARE
    CURSOR c_tablename
    IS
    SELECT table_name
    FROM dba_tables
    WHERE owner = 'KSTORM';
    v_tablename VARCHAR2 (30) := NULL;
    v_count NUMBER := NULL;
    BEGIN
    FOR r_tablename IN c_tablename
    LOOP
    v_tablename := r_tablename.table_name;
    SELECT COUNT (*)
    INTO v_count
    FROM v_tablename;
    DBMS_OUTPUT.put_line ( 'v_tablename : '
    || v_tablename
    || ' : count : '
    || v_count
    END LOOP;
    END;
    /---END CODE---/
    Thanks,
    Bobby

    DECLARE
      CURSOR c_tablename IS
        SELECT table_name FROM user_tables WHERE table_name = 'EDI_850_HDR';
      v_count     NUMBER := NULL;
    BEGIN
      FOR r_tablename IN c_tablename
      LOOP
        EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || r_tablename.table_name
          INTO v_count;
        DBMS_OUTPUT.put_line('v_tablename : ' || v_tablename || ' : count : ' ||
                             v_count);
      END LOOP;
    END;

  • Simple Count query and fetching data

    Hello,
    I have a table Emp :
    Name, age, sal, dateUpdated
    A 21 100 6/4/10
    B 21 101 6/4/10
    C 32 101 2/2/2
    D 20 100 3/3/3
    I am trying to count the number of people in the same age group AND fetch that number.
    For ex, I want to count the number of people that were updated today and then fetch their age.
    for ex : something like this : select count(dateUpdated) from Emp where date updated is today
    will only return 2 as result.
    how should my query be if I want to even fetch the individual age along with the count ?
    cheers,

    You can use {noformat}{noformat} tags to preserve your code format. That would help every one to read your post better.                                                                                                                                                                                                                                                           

Maybe you are looking for