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.

Similar Messages

  • Counter output jumps when power to encoder is cut

    Hello all,
    I am using a PXI-6251 DAQ board and a SCB-68 to read, via a LabVIEW DAQmx task, an optical encoder (720 counts / rev.) in radians.  The data read from the encoder is nice and smooth while the encoder is running, but when the power to the encoder is cut abruptly, there is a jump in the number of radians read (about two or three).  An oscilloscope connected at the SCB terminals shows a voltage spike of unreadable height when the power to the encoder is cut.  How might such a spike cause a sudden increase in the number of ticks/degrees/radians read?
    Thanks!
    Slowpoke
    Slowpoke
    CLAD (believe it or not!), using LabVIEW 8.5
    They don't call me "Slowpoke" for nothin'!

    Hello Slowpoke,
    Large voltage spikes can result in additional counter measurements. The TTL signal that you are measuring has to adhere to certain requirements. A TTL signal is low between the voltage of 0 to 0.8V and a high for 2 to 5V. Additionally, the maximum rise and fall time of the pulse must be less than 50ns. If this requirements is not met, the counter will give erroneous count values. For M-series cards with the DAQ-STC counter asic, the minimum pulse width has to be 10ns. If the signal does not conform to all these specifics, the count value will be incorrect.
    One option you can consider, is if you have a 0-5V signal from your encoder that is high when the power is on and low when the power is cut off. This signal can be wired to the Gate of the PXI-6251. What does your voltage spike look like? Is it one large voltage spike or is there ringing/bounching as it settles?
    Regards,
      Sandra T.
    Applications Engineer | National Instruments

  • How to get counter value from Historian

    Hi Experts,
    We have got a scenario to keep the number (counter) to see how many time a value of tag have been changed.
    For Example:
    If the values change from 1 to 0 and  0 to 1 for 25 times in a minute. We would like to get this number (25) from Historian (Wonderware).
    Currently we are not using any Pco to fetch the value from Hisotrian since we are able to fetch the tag values from Historian database through SQLConnection.
    I would like to know if we introduce Pco, will that help us to get this counter value.
    We are working on MII 15.0 version.
    Any help of this very much appreciated.
    Thanks
    Shaji

    Hi Shaji,
    PCo OPC DA does not support  PCoQuery TagAggregateMode as it only has access to Current Values of OPC Tags, because OPC DA only provides Current Value access.
    I know it is possible to execute SQL queries against the Wonderware Historian to retrieve counts aggregates, but don't have the details handy. Recommend that you deploy the InSQLPCo Data Server in MII and try using the PCoQuery TagAggregateMode method to retrieve the Counts aggregate first.
    Regards, Steve

  • How to get counter values from pci 6221 card?

    Hii
     I am using PCI 6221 card .. In that i am using the ctr o .. In my application i am using Linear encoder to measure the Lift movement.. so from software how to access the counter values i.e how much mm it moves... 

    Measure Angular Position.vi in the LabVIEW examples will be a good starting point. Adapt it to Linear Encoder by clicking on the selector below DAQmx Create Channel.vi.
    You can also create a corresponding DAQmx Global Channel (or task) in MAX and then use it in your code.
    Feel free to post back if you need further help.
    Message Edité par JB le 10-31-2008 02:15 PM

  • How to get seeburger work bench counter value

    hi all,
    i want to get the current counter value in the seeburger workbech counter.
    i used the following function suggested in one of the threads in forum, but its giving the below error
    func used:
    try {
    VariableBean be=VariableFactory.getVariableInstance("");
    return be.getStringVariable(variableName);
    } catch (Exception e) {
    throw new RuntimeException(e);
    error:
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.RuntimeException: java.lang.RuntimeException: VariableBeanServlet: Could not call getVariable() method of the Servlet. Cause=java.lang.ClassCastException]
    i guess this above function is to get variable value and not counter value. can any body give me code to get counter value.
    Thanks a lot in addvance
    Regards,
    Rashmi
    Edited by: Rashmi H S on Aug 12, 2009 2:30 PM

    use getCounter
       //write your code here
    try {
    CounterBean be=CounterFactory.getCounterInstance();
    return ""be.getCounter("counterName_"b"_"a );
    } catch (Exception e) { 
        throw new RuntimeException(e.getMessage()); 
    will return the same counter what you have ,I also had same scenario what you are facing recently
    HTH
    Rajesh
    Edited by: Rajesh on Aug 13, 2009 7:49 PM

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

  • XI Adapter Illegal count value 0

    Hi all,
    When configuring the PI Adapter to connect for outbound messaging from MDM, we are receiving the following error:
    Illegal Count Value 0
    This error is in the Component Monitoring.
    Looking in the logs, this seems to be occuring because of the error here:
    Catching java.lang.Exception: Illegal count value 0.
    at com.sap.mdm.xiadapter.util.MdmUtil.getPortProperties(MdmUtil.java:98)
    at com.sap.mdm.xiadapter.AbstractMdmAdapter.start(AbstractMdmAdapter.java:214)
    at com.sap.mdm.xiadapter.MdmSender.start(MdmSender.java:46)
    at com.sap.mdm.xiadapter.jca.XIConfiguration.channelAdded(XIConfiguration.java:160)
    at com.sap.aii.af.service.administration.impl.AdminManagerImpl.notifyChannelActivationStateChanged(AdminManagerImpl.java:796)
    at com.sap.aii.af.service.administration.impl.cluster.ClusterManager.eventReceivedSync(ClusterManager.java:426)
    at com.sap.aii.af.service.event.impl.worker.sync.SyncLocalWorker.work(SyncLocalWorker.java:52)
    at com.sap.aii.af.service.event.impl.worker.sync.AbstractSyncWorker.startWork(AbstractSyncWorker.java:40)
    at com.sap.aii.af.service.event.impl.EventManagerImpl.sendEventAndWaitForAnswer(EventManagerImpl.java:484)
    Could anyone provide any advice on this?  The error occurs even if the Port is deliberately configured incorrectly, but only occurs when the Remote System is correctly configured.  Changing the user seemed to make no difference.
    We are using 7.1 SP05
    Thanks in advance,
    David
    Edited by: David Apthorpe on Jul 21, 2010 3:54 PM

    Hi David,
    The error "Configuration Error:illegel count 0" will be fixed MDM 7.1 SP05 Patch06 (bulid 7.1.05.87) which is planned to be released by beginning CW 32 2010.
    This issue only  occured for only Prior to created Communcation Channel SPO5.
    If you create Communcation Channel After Upgarde SP05 ,The messages successfully processed t
    o MDM server(Ready folder).
    Regards,
    Ramesh

  • 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 dynamically set Min count and Max Count values in Adobe Print Form?

    How to set the Min Count and Max Count values dynamically in a Print Form?
    The values when set should over ride the values set in Binding Tab.
    This is all needed to print multiple Material Number labels on a single page - and the number of labels to be printed needs to be under user control - something like an Avery Address labels
    Please advise.
    Thanks,

    Here is a work around that works for me and may not be an intelligent solution .
    I kept the Min Count to 1 on the subform binding properties.
    Per the number of labels required, I appended the same item to the internal table so many times and passed it to the label.
    it works fine for my requirement.
    However - leaving out the post for a while to see if this can be done at the form level via scripting.
    Thanks,

  • 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

  • PXI-6255 Channel Configuration

    The documentation for the PXI-6255 is  VERY unclear (to me) on configuration.  I found the attached sample VI and modified it to test my new card.  The VI runs to make the relay connections (without the ~), but when I add the "~" to disconect, the attached error results.  The error refers to "channels" and I can find NO documentation on how to set up "channels" for this card.  The documentation seems to freely switch syntac between channels and com1 for example?  What am I missing.
    Attachments:
    Switch Connect-Mult Channel working.vi ‏26 KB
    PXI-2566 error.jpg ‏19 KB

    Hi Alyeska,
    When you say that you modified the example so as to test your new card, I am unclear as to what you are trying to do. What functionality do you want to test? The example that you attached configures the device, makes all the connections on the scan list, waits for those connections to settle, and then disconnects all the connections listed on the scan list returning to the original position, and waits for that to settle.
    Now to address your confusion about “channels” and “com”s. Your PXI-2566 switch module is “Single Pull Double Throw (SPDT).” This can be seen in the attached image from the excellent NI-SWITCH Help that installs on your computer with the drivers. While most switch modules have a large number of input channels that can be connected one at a time to one outgoing common or “com” pin, your module has 16 common outputs, each of which has only two inputs. The two input channels are labeled “NC” for normally closed (connected) and “NO” for normally open.
    The cause of your error message could be two things. The message states that it does not understand the “~” symbol, since it looks for a channel name (for example: ch0 or com0 or nc0) following the specified device. In order to disconnect, the “~” has to come before the device name, so your scan list would look like “~/RelayDevice/no0->com0.”
    However, even when the “~” is in the correct location, you still may have difficulties. This is because DAQmx’s Scan mode is by default “Break Before Make” which means that the hardware will break one connection before making another. The only time the “~” disconnect needs to be used is when “No Action” mode is engaged and connections are not broken unless explicitly told to do so. This example program first connects the channels on the scan list, so when it begins to run through the list and sees the “~” it will throw an error. If you look at the block diagram, the disconnect function follows the connect, so every connection that was made on the scan list is then disconnected for you and the relays will return to their default NC position.
    I am unsure of how you want to test your new card, but there are a number of great example programs included in LabVIEW with the switch driver. These can be found by navigating to the Help Menu>> Find Examples>> expanding the Hardware Input and Output folder>>expanding the Modular Instruments folder>> and then looking in the NI-SWITCH file. When you click on an example VI, a brief description will appear in the Information box to the right of the Example Finder. You might want to look at Controlling an Individual Relay.vi, Making Connections on a Switch.vi, and Software Scanning.vi. The other examples are for using switch modules with Digital Multimeters and Thermocouples.
    Also, when you find some documentation unclear, I find the NI-SWITCH Help to be very useful. It can be found by going Start>> Programs>> National Instruments>> NI-SWITCH>> Documentation>> NI Switches Help. Here you can see the pinouts for your specific device and find explanations of syntax, scanning, and triggering.
    I hope this explanation helps, Mallori M.
    Message Edited by mallorim on 01-16-2008 07:28 PM
    Mallori M
    National Instruments
    Global Customer Education Program Mananger
    Calculate the time you will save with NI Training
    Attachments:
    single pull double throw.PNG ‏4 KB

  • 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

Maybe you are looking for

  • Row Template for Named Report - Grouping required

    Hi, My report should show like Assigned ID Date Description To ALAN01 12345 23-JUN-07 This is the desription Entry Date :23-JUN-07 Entry Text:Pass to ABC dept Entry Date :24-JUN-07 Entry Text:Pass to DEF dept ALAN02 12346 12-JUN-07 This is the desrip

  • Sharing an iTunes library between 2 accounts

    I am setting up iTunes on a new iMac with OS 10.5.6 There is no obvious way to share one library between two accounts. I have tried the official apple method listed here: http://support.apple.com/kb/HT1203 but it does not seem to work. I have also tr

  • Change from 10.4.11 to 10.5...

    Hi there, I'm using OS X 10.4.11 togethet with Logic Pro 8 and want to change to Leopard 10.5. Is there conflicts concerning Logic Pro 8? Will I have to reinstall Logic Pro 8? Thank for your help!

  • What is Business Object!?

    Hi everybody, I'm newby in all of this, i mean SAP, i do some things in PI, but now i need to work with Business Objects, and i really don't have idea. I was looking for information about it but i didn't find something that explain what is business o

  • OSB Problem: java.lang.OutOfMemoryError: getNewTla

    Hi there, Yesterday I posted a problem related to the OSB console not loading and giving an error (<BEA-381951> JCA inbound request only invocation failed Since then I've looked harder at the problem and realised that the real problem was the followi