Disturbance of counter value with NI 9401

Hello,
I send this message because I have a problem with a counter on an NI 9401on cDAQ-9178.
I measure an angular position with two pulse signals (increment on channel A and decrement  on channel B). There is one signal and it is a relay that directs the signal to channel A or B.
You can see details on the attached file.
I purchased a sample of the counter every 10ms.
Everything works fine except when an AC motor of the machine starts or stops.
When the AC motor starts or stops the counter value change by an offset (see attached file). If the counter is counting, I observe a negative offset. If the counter is counting down, I see a positive offset.
If they are electrical noises, why will not offset in the direction of signal?
How to fix the problem?
Thank you for your help.
Bonjour,
J'envoi ce message car j'ai un problème sur un compteur avec une carte NI 9401 sur un cDAQ 9178.
Je mesure une position angulaire avec deux signaux impulsionnels (Incrémentation sur la voie A et décrémentation sur la voie B). Il y a un seul signal et c'est un relai qui oriente le signal vers la voie A ou B.
Vous pouvez voir les détails sur la photo jointe.
Je fais une l'acquisition d'un échantillon du compteur toutes les 10ms.
Tout fonctionne très bien sauf quand un moteur asynchrone de la machine démarre ou s'arrête.
Au démarrage ou à l'arrêt du moteur assynchrone le compteur prend un offset (voir fichier joint). Si compteur est en comptage, j'observe un offset négatif. Si le compteur est en décomptage, j'observe un offset positif.
Si ce sont des parasites, pourquoi l'offset ne va pas dans le sens du signal?
Comment corriger le problème?

Think you John,
After some modifications, the problem has evolved. Now the offset signal (noise) is only on the signal connected.
I'm downloading the NI-DAQmx version 9.40 to apply digital filtering on counting.
The filter should be set in MAX or in LabVIEW? (my program uses Labview tasks set in Max).
Could you give me more details on the configuration of the filter on the counter. (on image, the configuration of my task with DAQmx 9.2.3
Best Regards
Après quelques modifications, le problème a évolué. Maintenant l'offset de signal (le bruit) est seulement sur le signal connecté.
Je télécharge la version Ni-DAQmx 9.40 pour pouvoir appliquer un filtrage numérique sur le comptage.
Le filtrage doit-il être paramétré dans MAX ou dans Labview ? (mon programme Labview utilise des taches configurées dans Max).
Pouvez-vous me donner plus de détails sur la configuration du filtrage sur le comptage. (en image, la configuration de ma tache avec DAQmx 9.2.3

Similar Messages

  • Perturbation of counter value with NI 9401

    Hello,
    I send this message because I have a problem with a counter on an NI 9401on cDAQ-9178.
    I measure an angular position with two pulse signals (increment on channel A and decrement  on channel B). There is one signal and it is a relay that directs the signal to channel A or B.
    You can see details on the attached file.
    I purchased a sample of the counter every 10ms.
    Everything works fine except when an AC motor of the machine starts or stops.
    When the AC motor starts or stops the counter value change by an offset (see attached file). If the counter is counting, I observe a negative offset. If the counter is counting down, I see a positive offset.
    If they are electrical noises, why will not offset in the direction of signal?
    How to fix the problem?
    Thank you for your help.
    Bonjour,
    J'envoi ce message car j'ai un problème sur un compteur avec une carte NI 9401 sur un cDAQ 9178.
    Je mesure une position angulaire avec deux signaux impulsionnels (Incrémentation sur la voie A et décrémentation sur la voie B). Il y a un seul signal et c'est un relai qui oriente le signal vers la voie A ou B.
    Vous pouvez voir les détails sur la photo jointe.
    Je fais une l'acquisition d'un échantillon du compteur toutes les 10ms.
    Tout fonctionne très bien sauf quand un moteur asynchrone de la machine démarre ou s'arrête.
    Au démarrage ou à l'arrêt du moteur assynchrone le compteur prend un offset (voir fichier joint). Si compteur est en comptage, j'observe un offset négatif. Si le compteur est en décomptage, j'observe un offset positif.
    Si ce sont des parasites, pourquoi l'offset ne va pas dans le sens du signal?
    Comment corriger le problème?
    Merci pour votre aide.

    Bonjour,
    le sujet est en cours de résolution à l'adresse suivante :
    http://forums.ni.com/t5/Discussions-de-produit-de-NI/Perturbation-de-la-valeur-du-compteur-avec-NI-9...
    Bonne programmation à tous !
    MathieuT
    NIF AE
    Mathieu_T
    Certified LabVIEW Developer
    Certified TestStand Developer
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    LabVIEW Tour
    Journées Techniques dans 10 villes en France, du 4 au 20 novembre 2014

  • Count all values with a special WHERE clause in a select for a group?

    Hello,
    I have the following table1:
    code, month, value
    *1,1,40*
    *1,2,50*
    *1,3,0*
    *1,4,0*
    *1,5,20*
    *1,6,30*
    *1,7,30*
    *1,8,30*
    *1,9,20*
    *1,10,20*
    *1,11,0*
    *1,12,0*
    *2,1,10*
    *2,2,10*
    *2,3,20*
    *2,4,20*
    *2,5,20*
    *2,6,30*
    *2,7,40*
    *2,8,50*
    *2,9,20*
    *2,10,20*
    *2,11,20*
    *2,12,20*
    This is a table with 3 columns, first column is a code, second one is the number of month, third one is a value.
    Now I want to select the records for each code. For example all records for code=1.
    I want to count how much values=0 for this code=1. After this counting I want to update the value with this count of 0.
    For my example:
    For code 1 there are 4 fields with value 0. Therefore I want to update all values of code1 to 4.
    For the second code=2 there are no value=0. Therefore I want to update the values of code2 to 0.
    This should be the result:
    code, month, value
    *1,1,4*
    *1,2,4*
    *1,3,4*
    *1,4,4*
    *1,5,4*
    *1,6,4*
    *1,7,4*
    *1,8,4*
    *1,9,4*
    *1,10,4*
    *1,11,4*
    *1,12,4*
    *2,1,0*
    *2,2,0*
    *2,3,0*
    *2,4,0*
    *2,5,0*
    *2,6,0*
    *2,7,0*
    *2,8,0*
    *2,9,0*
    *2,10,0*
    *2,11,0*
    *2,12,0*
    My question is:
    Is there any possibility in oracle to count in a select (or in a insert/update statement) all values=0 for one group (in this example named CODE) and do an update in the same statement for this group?
    Hope anyone can give me a hint if this is possible?
    Thanks a lot.
    Best regards,
    Tim

    Here's the select:
    SQL> select code, month
      2        ,count(decode(value,0,1,null)) over (partition by code) ct
      3  from   t
      4  order by code, month
      5  ;
                    CODE                MONTH                   CT
                       1                    1                    4
                       1                    2                    4
                       1                    3                    4
                       1                    4                    4
                       1                    5                    4
                       1                    6                    4
                       1                    7                    4
                       1                    8                    4
                       1                    9                    4
                       1                   10                    4
                       1                   11                    4
                       1                   12                    4
                       2                    1                    0
                       2                    2                    0
                       2                    3                    0
                       2                    4                    0
                       2                    5                    0
                       2                    6                    0
                       2                    7                    0
                       2                    8                    0
                       2                    9                    0
                       2                   10                    0
                       2                   11                    0
                       2                   12                    0

  • Counter issues with cDAQ-9172 and 9401

    I'm trying to do a pulse count with a 9401 module in a cDAQ-9172 system. My problem is that the count always ends up in the 30 kHz range, when it should be in the range of 1 kHz - 5 kHz. Furthermore, the pulse count doesn't change even when the input pulse frequency is changing. I've used a multimeter to verify that the input signal is pulsing at the expected frequency. It seems like the system is counting the wrong thing (maybe defaulting to some sort of internal timing device?), but I can't figure out what it is or how to fix it.
    Any advice would be much appreciated.

    Thanks for the response. MAX basically confirms what I've been finding.
    Some more specifics:
    I have two counters set up, only one of which should be getting a signal at a time. When I connect a function generator sending a square wave to one of the counters, that counter reads the correct frequency and the other counter reads zero - exactly what should happen. When I connect the signal I'm trying to measure to an oscilloscope, it shows a square wave with the frequency I'm expecting. However, when I connect the signal to one of the counters, that counter reads the wrong frequency, and the other counter is counting pulses when it shouldn't be receiving anything at all. The only thing I can think of at this point is that somehow my signal is creating some kind of noise that causes incorrect measurements on both counters, but this doesn't make a whole lot of sense to me, as the oscilloscope shows a pretty solid square wave. In fact, the signal doesn't really look appreciably worse than the output of the function generator. Even if there were some noise, it would have to be pretty severe to affect the edge count, I believe.
    Essentially, I've been able to convince myself that the incoming signal signal is an acceptable square wave with the expected frequency, and that the DAQ system is capable of counting pulses on a similar square wave when it comes from a function generator. Somehow, when I try to combine the two it doesn't work, so I'm at a loss at this point.

  • Encoder interfaced with NI-9401

    I have purchased an encoder which has open collector and 3.3 Kohm pull-up resistor (TTL) as its logic output.
    The encoder comes with four leads: +5V power, GND, Channel A and Channel B. Both Channel A and Channel B are logic output.
    Channel A and Channel B are connected to the DIO of NI-9401 which is mounted on cRIO.
    A standard VI for encoder counting is used and compiled under the FPGA environment.
    During the measurement, I observed that there are significant loss count in both encoder direction.
    I do not think that there is any problem with the VI as I have used it quite a few times on encoders with RS422 logic output.
    Is there any problem with my current encoder in terms of its electrical interface with NI-9401?
    Thanks.
    Solved!
    Go to Solution.

    I'm new to labview fpga.
    I used the code (attached). with cRIO-9076,NI-9401
    Observation:1) ON FPGA VI: Position count value is not incrementing,the values shown are either 0,-1 or 1
                          2) ON HOST VI: As velocity & acceleration calculations are depending on count in fixed velocity interval ,that are also showing random values
    Que:
         1. what are  floating point to fixed point conversion issues in LV-2102?
         2.what should be the value of velocity fixed interval ?
         3. how can use this velocity data in dc motor pid speed control with NI-9401 without using NI-9505 dc brushed drive?
         4. Is SCTL necessary? 
     Also: i need information regarding 1.how to create .exe ?
                                                                2.how to make crio standalone ?

  • Counter value jumps on occasion (PXI 6255)

    I am using a PXI 8108 controller (Windows) with a PXI 6255 AI card. A pulse generator (1 KHz) is incrementing the hardware counter of that AI card in order to have an external reference clock, i. e. having a timestamp for each AI sample value.
    I am reading 1000 AI values from several channels  (together with 1000 counter values) via DAQmx blocks with a higher frequency than the external clock's 1 KHz (e.g. AI Rate 5 KHz-> reading every counter value approx. 5 times). Every now an then I am losing counter values, e. g. counter value 6789 is followed by 6823.
    Shouldn't be the PXI card's counter buffer independant of Window's CPU load? Getting 1000 values from the card buffer, the jumps are even located in the middle of the 1000 values. Maybe there's a problem with atomicity while reading from the buffer, so that I get 500 values from the buffer, (pause), and 500 more values from a later point in time. Is this possible?
    I am sure, I can not blame the digital pulse generator (from Hameg Instruments) for dropping pulses.
    Attachments:
    counter-daq.png ‏20 KB

    Hello,
    If the first scan only places 4 samples in the AI FIFO (2 less than the number of channels requested), then I would expect this loop to run forever in aiex1.cpp (I added some debugging prints to make it easier to see the channels that should be getting returned).
           while ( m < numberOfChannels )
            if(!board->AI_Status_1.readAI_FIFO_Empty_St())
                value = board->AI_FIFO_Data.readRegister ();
                aiPolynomialScaler (&value, &scaled, &scale);
                printf ("Channel %d: %e,\n", m, scaled);
                m++;
        printf("\tEnd of Sample %d\n", n);
    How is the example able to proceed past this loop?
    I have checked the code for FIFO flushes and resets between aiStartOnDemand (board); and when the FIFO gets read.  I have also run the example with 6 channels, this time on Windows.
    To proceed we would need these items:
    1) We would need the exact output (with my added debug prints).
    2) A complete dump of all registers accessed during the example.
    Steven T.

  • Idoc to file scenario which involves accessing a persistant counter value

    Hi,
    Presently Iam dealing with an idoc to file scenario in which I need to map the idoc info and also a persistant counter value to a flat file. So in how many ways can we maintain a persistant counter value(either by variable/file/database)? Please can any one help me in overcoming this scenario by providing any implemented example.

    Hi,
    Please see the following links , you can use database is best.
    /people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api
    /people/michal.krawczyk2/blog/2005/09/15/xi-rfc-mapping-lookups-from-bc-to-xi
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/alexander.schuchman/blog/2005/09/29/ipc-customization--add-additional-subtotals-and-include-rebate-conditions
    Regards
    Chilla..

  • How can I replace column value with a particular value in SQL

    Hi All,
    Can anyone please tell me how can I format my output with replacing a column value with a specific value which actually depends on the present value of the column
    I am executing the following SQL statement
    select state,count(id) from <table_name> where composite_dn= <composite_dn_name> group by state;
    My Present output is:
    State No.Of Instance
    1 3
    3 28
    I want to replace the value in the column state as follows
    State No.OfInstances
    Completed 3
    Faulted 28
    I want "1" to be reppaced by "Completed" and "3" to be replaced by "Faulted"
    Is is possible with SQL or PL/SQL , if it is then how can I achieve this required result. Please help!!
    Thanks in Advance!!
    Edited by: Roshni Shankar on Oct 27, 2012 12:38 AM

    Hi Roshni,
    I guess this CASE clause can be simulated by a DECODE and also it is very easy to use.
    Refer -- http://www.techonthenet.com/oracle/functions/decode.php
    select decode(t1.state,t2.state_id,t2.state_name), t1.count_id
    from <table_2> t2, (select state,count(id) count_id
    from <table_name>
    where composite_dn= <composite_dn_name>
    group by state) t1
    where t1.state = t2.state_id;HTH
    Ranit B.
    Edited by: ranit B on Oct 27, 2012 2:02 PM
    -- link added
    Edited by: ranit B on Oct 27, 2012 2:19 PM
    -- sample code added

  • DB adapter retry count value

    Hi gurus,
    I am using a db adapter for polling options. The option used is 'Delete the row(s) that were read' .
    Here the retry count by default is set to unlimited. Is this the recommended one? In normal db adapter options i see the retry count as '4'
    the property value seen in composite.xml is shown below
    <property name="jca.retry.count" type="xs:int" many="false" override="may">2147483647</property>
    Will this lead to any performance issues? Or what could be the correct retry count value?
    Please let us know.

    Hi,
    We have used the polling options using Logical delete vastly in our project and never faced any performance issues with respect to this property value being set to 'unlimited'.
    I believe there should not be any performance issues with respect to the 'Delete the row(s) that were read' option as well.
    According Oracle documentation:
    In the Auto-Retries section, specify the value for auto-retry incase of time out. In case of a connection related fault, the Invoke activity can be automatically retried a limited number of times. You can specify the following values in the fields in this section:
    To retry indefinitely, type unlimited in the Attempts field.
    Interval is the delay between retries.
    Backoff Factor: x allows you to wait for increasing periods of time between retries. 9 attempts with a starting interval of 1 and a back off of 2 leads to retries after 1, 2, 4, 8, 16, 32, 64, 128, and 256 (28) seconds.
    Thanks,
    Deepak.

  • How to get record count value in variable

    Hi,
    i wanted to capture record count value in the variable?
    Please let me know how to do this?
    Thanks,
    jag

    To determine count of records, use: count(field_name) -- replace field_name with your appropriate field.
    You don't have to save the record count value in a variable. You can directly use the condition <?if: count(field_name) > 0?> display table <?end if?>
    If you want to store it in a variable: use <?variable:record_cnt;count(field_name)?>
    Take a look at this post that uses a record count: https://blogs.oracle.com/xmlpublisher/entry/no_data_found
    Thanks,
    Bipuser

  • Accessing counter value on STARTTRIG/ACQ line for Dio-6533

    Hello,
    Using LabVIEW 6.1 for MacOS (on a laptop), NI-DAQ 6.9.
    I was wondering if there's any way to access the counter value assosicated with each control group for the dio-6533. Basically, I want to use triggered i/o; however, I don't want it to generate/acquire on each trigger, but wait for a set number of triggers. DIO boards don't seem to have a feature like certain E-series boards where you can specify that the board wait for a certain number of trigger pulses; I thought to circumvent this by accessing the counter and arming the trigger just before the pulse that I want it triggered off of.
    Thanks for any insight you can offer.
    Regards,
    jdk

    Hello;
    The only way to accomplish that is to use another board together with the 6533. You can even get a low cost E-series board, and use the available general purpose counters to create the necessary delay, and then enable the external pulse train to start clocking data in/out on the 6533.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Urgent!!COUNT VALUES!!

    Hi all,
    Any one tell me ,How to do a Count values based on the Characteristic which is a header item Shopping cart...
    I dont have a keyfigure,I think  I have to create a KF,there is restricted key figure NUMBER  OF RECORDS with selection Char. COUNTER..pls help me ASAP
    Ex:
    Header Shopping cart     line item            Count
                  10000000           1                        1
                                           2                       0
                                           3                        0
    Result                                                       1
    So it is based on the header level,Pls revert me ASAP.
    thnx
    Raj

    Hello ,
    Check this PDF.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/biw/g-i/how%20to%20get%20the%20document%20count%20in%20a%20query%20using%20formula%20variable%20with%20processing%20type%20replacement%20path.pdf
    Regards,
    SRIKANTH

  • Connect by Level using count value from record collection

    Hello:
    PROBLEM:
    ) y,(select rownum MonthNo from dual connect by level <= Cnt)
    Causes ORA-00904 Invalid identifier. Why can’t I use “Cnt” from my main query as using a constant works?
    The count value is determined for each date range in How can I return the records I need?
    Thanks, Sidney
    BACKGROUND:
    I need to be able to display a list of tax returns to my users and the status of those returns. Physical returns do not exist so it is necessary to create the data records dynamically using appropriate selects. This is not difficult and I thought I could then just use a connect by level to give me the date information so I could calculate and display the individual returns. However oracle is giving me an ORA-00904 when I try to send the “Cnt” value to connect by level. Everything works fine when I provide a constant instead of “CNT”. The “CNT” value is determined by a complex process that computes the start and stop dates for multiple return types, etc. as well as the number of periods and filing frequency. The data has to be dynamically generated using a master record which then yields the coding history from which my basic record collection is selected. Here is the result of that process:
    TaxpayerNo,TaxClass,TaxCode,FilingFequency,StartDate,StopDate,Cnt,Frequency
    10 S 1 M 6/1/2007 11/30/2008 18 12
    10 S 2 M 11/30/2008 9/30/2009 10 12
    10 S 2 Q 11/30/2010 8/18/2011 3 4
    10 L 8 A 6/1/2007 9/30/2009 3 1
    10 L 8 A 11/30/2010 8/18/2011 1 1
    From this data, I need a record for each individual month,quarter,etc. ie:
    10 S 1 M 6/1/2007 11/30/2008 18 12 6/1/2007
    10 S 1 M 6/1/2007 11/30/2008 18 12 7/1/2007
    10 S 1 M 6/1/2007 11/30/2008 18 12 8/1/2007
    10 S 1 M 6/1/2007 11/30/2008 18 12 9/1/2007
    10 S 2 M 11/30/2008 9/30/2009 10 12 11/30/2008
    10 S 2 M 11/30/2008 9/30/2009 10 12 12/30/2008
    etc.
    DOES NOT WORK
    select y.*,MonthNo,Add_Months(StartDate,MonthNo*Frequency) from (
    select x.*,
    (case when FilingFrequency = 'M' then Ceil(Months_Between(StopDate,StartDate))
    when FilingFrequency = 'Q' then Ceil(Months_Between(StopDate,StartDate)/3)
    when FilingFrequency = 'A' then Ceil(Months_Between(StopDate,StartDate)/12)
    else 0
    end) Cnt,
    (case when FilingFrequency = 'M' then 1
    when FilingFrequency = 'Q' then 3
    when FilingFrequency = 'A' then 12
    end) Frequency
    from (
    ... complex code to calculate the values of the start and stop dates needed above...
    ) x
    ) y,(select rownum MonthNo from dual connect by level <= Cnt)
    ERROR MESSAGE
    This returns ORA-00904: "CNT": Invalid Identifier. I don't get an error if I use a constant:
    WORKS USING A CONSTANT BUT MUST HAVE THE ACTUAL CNT VALUE
    ... Same code to generate data ...
    ) y,(select rownum MonthNo from dual connect by level <= 3)
    How can I get this to work using the "CNT" value instead of a constant?

    A technique like this should fix your problem.
    TUBBY_TUBBZ?with data (col1, cnt) as
      2  (
      3    select 1, 3 from dual
      4      union all
      5    select 2, 2 from dual
      6  )
      7  select
      8    d.col1,
      9    t.column_value
    10  from
    11    data  d,
    12    table(cast(multiset(select level from dual connect by level <= d.cnt) as sys.OdciNumberList)) t;
                  COL1       COLUMN_VALUE
                     1                  1
                     1                  2
                     1                  3
                     2                  1
                     2                  2
    5 rows selected.
    Elapsed: 00:00:00.00
    TUBBY_TUBBZ?As opposed to what you have now, which is basically this
    TUBBY_TUBBZ?with data (col1, cnt) as
      2  (
      3    select 1, 3 from dual
      4      union all
      5    select 2, 2 from dual
      6  )
      7  select
      8    d.col1,
      9    level
    10  from
    11    data  d
    12  connect by level <= d.cnt;
                  COL1              LEVEL
                     1                  1
                     1                  2
                     1                  3
                     2                  2
                     1                  3
                     2                  1
                     1                  2
                     1                  3
                     2                  2
                     1                  3
    10 rows selected.
    Elapsed: 00:00:00.00
    TUBBY_TUBBZ?

  • Calculating the Count value

    Hi friends,
    I have personnel planning cube,i need to calculate the no.of Personal Id's for each cost center..and retreive the Count value and save it to a keyfigure with type Number.
    I know that we can do this in FOX,Can anyone please provide me with the sample code for the above requirement.
    Thanks In Advance.
    Regards,
    Ravi.
    Edited by: ravi kanth on Sep 15, 2009 12:34 PM

    Hi Ravi,
    Counter type I.
    FOREEACH PERSONAL ID.
    COUNTER = COUNTER +1.
    {KF, Personal id} = {KF, Personalid}.
    ENDFOR.
    (Count,personalid} = counter.
    Hope this gives you an Idea but let me know you need more information.
    Regards,
    Raj

  • Any way to set the starting hit counter value

    I am moving some static pages to a blog template and would like to retain the hit counter values on the new pages. Is there a way to set the starting number other then reloading the page 25,000 times
    thanks

    Welcome to the Apple Discussions. Not with the Apple counter. However, if you use a 3rd party counter like StatCounter you can set it to any number you want. You can also set it so it will not count your visits. To install see Old Toad's Tutorial #13 - Adding a StatCounter as an HTML Snippet.
    OT

Maybe you are looking for