Timing problem with counting edges

Hello!
I use a NI PCI-6221 DAQ card with NI-DAQmx to count edges of TTL pulses for a spectrometric application.
It is extremely important that I count the pulses for a well-defined period of time. Typically, I want to count the edges that reach the counter in the period of 400 milliseconds.
Normally, this works quite well, when I use a WHILE loop that reads and restarts the counter every 400 milliseconds. Things change when the PC I run the VI on has other programs running in the background. Expecially computing-time intensive programs delay the 400 milliseconds of the WHILE loop for up to several 100 percent, resulting in an wrong counter read.
I tried to use a timed WHILE loop but this din't change anything, regardless of the timimg source (onboard clock or PCI-6221 counter) I applied.
Has anyone encountered similar problems and found a solution? Isn't there a possibility to control the counting time by hardware?
Thanks in advance!
EresthorMessage Edited by Eresthor on 04-07-2005 08:17 AM

Hej Lynn,
of course your idea works, thank you. It works extremely well this way, too.
My problem with this approach is that I need both counters on the PCI-6221 to count data from my spectrometer simultaneously on two channels. That's why I would like to trigger the counter in a different way, for example with a clock.
Is there no way to trigger the counter with the timebase of a hardware clock on the card? Or ist there another possibility without wasting a counter?
Eresthor

Similar Messages

  • Receiver determination - Xpath expression problem with count

    I am working with a scenario where I pick up records from a JDBC connection and if the number of records I pick up is less than a certain number I want to call a webservice.  If it is greater than the number I want to write out a file to be processed by a different process on the receiving end.  I have created the receiver determination condition with the following conditions:
    (/p1:MT_HOG_Data/row[count(row) > 3] EX)
    (/p1:MT_HOG_Data/row[count(row) <= 3] EX)
    The integration is always processing the second condition no matter how many records come in.  I have tried with and without the multiline option.  Can anyone help with this?
    I have searched through the forum and checked the following links without any resolution:
    http://wiki.sdn.sap.com/wiki/display/XI/XpathConditioninReceiverDetermination
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/frameset.htm
    /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination
    I can't find any examples where a count of records is checked in the expression editor.  Thanks in advance for any help.

    You can not use the EX operator in that case, because that is used only for node existence checks, not for value checks.
    Do you have a row number in your structure ? Then you could write the xpath expression with that counter tag and value
    Example: you want to send to receiver A if count > 3, else to B:
    you set  /rowNumber EQUAL 4 for sender A
    and /rowNumber NOT EQUAL 4 for sender B
    The condition is applied to the whole document. If one of the node/values are true for that condition, then the whole condition is set to true.
    Problem with that is that the second condition also will be true because nodes for that condition will be found
    better would be to have a rowcount tag in the structure. If that is not possible, you can use the "Enhanced Receiver determination" where you can define a mapping which determines the receivers. There you can do anything complicated you want.
    CSY

  • Problems with counter in renaming interface not maintaining consistency across multiple libraries

    Happy New Year, all.
    We have a problem in Aperture that I was curious if others had, and I'm hoping somebody has figured out a workaround they will share with me. Originally, we used Aperture and it had one huge library for our different types of photography. We had to change away from that setup because if there was a problem it would take ages to troubleshoot a ~500GB library and perform actions like rebuilding the library. We didn't want to do this, but splitting into six libraries has improved the speed in general and has made rebuilding smaller individual libraries quicker.
    We shoot a lot of photos and want each photo to have a unique number (along with a custom name). We set up a rename option in Aperture that has "Custom Name_Counter" and set counter to be six digits. The problem this seemed to create is that the counter in the rename function doesn't produce a unique number consistently across libraries. If I'm in library A, and I rename a batch of files, the counter will go up and remember its last number as long as I stay in Library A. The minute I switch to Library B, the number is at where it was the last time I used Library B. This indicates to me that the preferences travel with the library.
    Does anybody know a way that I can have a global preferences file, rather than a library preferences file? It seems it maybe used to be this way, but one of the version 3 upgrades forced me to delete a preferences file for the Facebook bug a couple of version 3 subversions ago.
    On a different note, another problem with renaming is that it is so slow. Renaming master files for even 100 or so files takes minutes. Does anybody else have this happen? Sometimes it's faster, but I haven't been able to figure out a pattern to this.
    I've submitted feature requests for revamping the renaming interface for Aperture for at least a couple of years. It never seems to improve. iView Media Pro, a program I used six years ago, had a great renaming setup and I wish Aperture
    Maybe it's time to reinstall Aperture. I bought it on disc, so it's not through the App store. Does anybody have experience reinstalling? I would, of course, like to keep keywords and other preferences.

    hallerphoto wrote:
    Machine is a Mac Pro dual quad-core 2.16 GHz.
    I am unaware of a 2.16 GHz Mac Pro tower. Are you referring to a Macbook Pro or to an iMac? Or is it a configuration I am just unaware of?
    My concern is that it seems that you may be making major workflow compromises that might be better dealt with by hardware changes as feasible. E.g. most 2.16 GHz Mac CPUs are about 1/6 as strong as a top Mac Pro today or about 1/4 as strong as today's Macbook Pros, and that has huge implications on Aperture performance.
    Also, graphics processors of the 2.16 GHz era were ridiculously weak compared to modern Macs. Aperture has historically performed best with strong GPUs (e.g. the strongest G5 towers would not run Aperture without a GPU upgrade). If you stay with the existing box a GPU upgrade may (if feasible) be in order.
    You did not mention RAM, which has defining impact on Aperture performance.
    Even if no hardware upgrades are made, it is useful to know what hardware performance bottlenecks may exist. So some questions:
    • Which Mac(s), exactly?
    • Which OS version and which Aperture version?
    • How much RAM is on board?
    • If a Mac Pro, which GPU card is in use?
    • What mass storage (hard drives and SSDs), how connected and how full?
    Thanks.
    -Allen

  • Problems with counter

    Hello everybody.
    I have a problem with a counter used in counter-based maintenance.
    I'm sure that the characteristic was created correctly, so I think the problem is in the mesauring document.
    When I update the counter with a value like the previous(I do that so that scheduling dates will change), the counter resets itself, and at the next updated the the field "Total Counter Reading" is empty.
    Where is the error?
    Thanks advance.
    Viviana

    Hi,
    Though your query is not very clear, what I have understood is that you are creating a mes doc. for which the value already existing is X. You are creating a new meas doc.. with the same value X, your difference should be '0' and the total counter reading should remain as X only. Is it not happening in this way ?
    Regards,
    Bala.

  • Timing problems with AU Ivory Piano + ESB and Logic 7.2

    I have problems with Ivory and Logic 7.2:
    The Ivory (AU version 1.50) plays well in tempo, but when I want to bounce (export track as audio file) the Ivory plays totally out of tempo.
    Even when I touch the record button on audio tracks or when I want to record my mix on 2 audiotracks, the Ivory plays out of tempo.
    Even freezing the Ivory track gives the same problem.
    Then I need to go back to my last saved version.
    The same actions with Emagic, Native Instruments and Spectrasonics AU plugins, and everything works fine.
    I throwed away already the Ivory prefs, no positive results.
    My Ivory sample files are on a separate 400 GB internal disk, and my Audio I'm recording on a external Glyph disk.
    I think I have this problem since I've upgraded from Logic 7.1.1 to 7.2 but I'm not sure. I didn't worked long with Logic 7.1.1.
    I don't work in Protools, but I use the DAE and Direct TDM (no Core Audio)
    It happens in the most simple application: no DAE or AU plug-ins, only one Ivory AU plug-in.
    This is my configuration:
    Ivory AU (Audio object-Direct TDM-Instr) output ESB 1-2 -> input ESB1 2 (Audio Object-DAE) -> Output 1-2 of my digidesign interfaces
    Ivory becomes totally unusable for me this way. Is someone having the same problems?
    Suggestions?
    Wim Claes
    Setup
    Logic 7.2
    Protools 7.1cs4
    192, 2x96i, 1x 96 interface
    G5 dual 2,7   Mac OS X (10.4.3)   4 GB RAM

    I tried already a lot of things, but it is very clear:
    1. Instantiating Ivory as AU- Ivory plays in tempo
    2. Record enable an audio track in the arrange window - Ivory plays out of tempo
    This happens with the default song of logic, no other plugins or AU-instruments are instanciated.
    I can not find a way to convert my Ivory-midi to audio without the timing problems;
    Bouncing, freezing, record to audio, export as audio file: all those things result in timing problems.
    I tried this all with emagic plugins (ES2...) and Native Instruments plugins and then I don't have the tempo problem

  • Should Device Test find problem with counter?

    Hello!
    I am have one problem with PCI 6251 board. It seems to me that something happening with counter 0. Several days ago everything was ok, but now any counter output does't appears on its terminal (on BNC 2120 block). When I see at the signal from it on the oscilloscope, I can see right shape of the pulses, but about 10 mV amplitude. Everyting is perfect with counter 1 output.
    OK, I run the self-test and it is passed. I have tried to reset the devce and try again - the same result. Self-test is passed, but counter 0 seems to be not functioning.
    Is it another possibility to check the device?
    Thanks in advance!

    Hi Baturin,
    It is quite possible that your BNC connector has problems. If you were able to route the output of Counter 0 to a PFI line, and able to see a good signal, then your terminal block is at fault. The first things you should look for are the pins. Sometimes, the pins on the connectors are bent, and thus do not provide a reliable contact. Second thing you should look for is any external damage. Finally, use the test panel in Measurement and Automation Explorer (MAX), in the counter tab to test the card (which is probably what you are already doing).
    If all of the above still seem to confirm your initial diagnostic of a bad BNC connector and a good M series card, then please call us. We would then do a final troubleshooting before sending your BNC connector back to be repaired.
    Thank you and best regards,
    Nathan
    Applications Engineer
    National Instruments

  • Problems with counting the forum points?

    Hello sdn team,
    i recogized that i got some points in forum threads but they are not added to the summary points on the business card. Here is a sample:
    Difference between EAM and MAM
    Are there any problems with the pointing system?
    Regards
    Frank

    i had similar kind of issues more than once and reported the same to [email protected] which was quickly fixed.
    mail [email protected] along with the link to the thread and your account id.
    Regards
    Raja

  • Problem with Counter in Query

    Hi Experts,
    There is a problem in my query output.
    I have a CKF for sales documents number created with replacement path which gives the correct count of number of Sales documents.
    But the req here is to create two more counters which will be counting the passed and failed count with reference to other KF1 (the value of this KF can be 0 or 1).
    i.e. If the KF1 value is then failed count would be 1 .
           else passed count would be 1.
    I have used the Replcement path variable created for Sales Document count.
    For failed count the CKF formula which I have created is: (Sales Order Count ) * (KF1<>1)
    Which gives the right result but as soon as I remove the drill down , instead of aggrading the total results, failed counter still shows 1 which is incorrect.
    Could any one please help me out.
    Regards,
    BW User

    hello,
    try using exception aggregation as total and reference char as the one which u have reomved from drilldown.
    Regds,
    Shashank

  • Problem with Count

    In Essbase, is it possible to perform a counting function ( one that is similar to the COUNT in Oracle ). For example, I want to:1. Get a count of all the interception with Forecast Measure = 1002. Given a group of interceptions, get a count of all the interception with Forecast Measure = 100If we can't do this in Essbase, we may have two other solutions:1. Perform the count by going through all the interceptions on a one-by-one basise, but it is going to be too too slow2. Have all the values of the Forecast Measure to be stored in Oracle as well. Whenever a value in the Forecast Measure change, the Oracle table automatically gets updated. In Oracle I can do COUNT in SQL. However, I don't know what is the most effective way of performing such kind of data synchronization between Essbase and Oracle.Anyone gets an idea?Thanks,Anne

    To count the rows for the filtered data, you need to fo with actual table nly. May be, you need to look at the index on Column_name, however, that would not help you here as you are using % ''val'' %(not sargable). 
    An index on the column would certainly help, assuming that the table has quite a few more columns than this column. Scanning the index is faster than scaning the index, since it's fewer pages to scan.
    Full-text index that was suggested by someone else, can be a great improvement, but that requires that value searched for is a whole word, or at least start of one.
    But overall Queriessqlserver need to explain the problem in more detail, and particular why (s)he is running this query, to get any meaningful suggestions.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • 6014 board problems with counter 0

    Hi all,
    I'm working on a project with a 6014 board and Real-Time Windows Target of Matlab. I need to interface the signals from two incremental encoders. The qudrature signals are converted into a direction signal and a pulse train signal with the idea to feed them to the counters of the board, configured as bidirectional counters in up/down mode. The connections are as follows:
    For Counter 0 - the pulse train signal is fed to PFI8, and the direction signal to DIO6.
    For Counter 1 - pulse train signal to PFI3, direction signal to DIO7.
    The problem is that Counter 1 is working properly, while with the same signals fed to Counter 0 what I read makes no sense. The counter increments by very large values at once and behaves erraticaly.
    I'm seeing this behavior on two different boards.
    Any help please!
    Thanks in advance!
    Stanislav

    Hi Stanislav,
    My recommendation will be to install Signal express (it is a free application that you can use to generate or aquire data) avaialble at the following location https://lumen.ni.com/nicif/us/evalsignalexpress/content.xhtml
    and DAQmx driver available at the following location http://joule.ni.com/nidu/cds/view/p/id/3423/lang/ro
    After you install the two software mentioned above, launch Signal Express and it should be straight forward how to program because it is a configuration based programming. You can use the menu to generate a train of pulses on counter 1, also you may use an oscilloscope to validate the generation part and than use your software to acquire on CTR0. If you still have the problem to acquire on CTR0, you can reverse it and use Signal Express in the acquisitioin part.
    Best regards,
    I.R.

  • Problem with counting number of clic with initialize mouse vi

    Hi,
    I want the vi stops when the user clics several times with the mouse. I use initialize mouse vi instead of event structure for other reasons (I can't use it).
    I intented to count the number of clics and when this number of clics occur, the vi stop. But the vi don't work, it stops at the first clic although when i highlight execution it seems to work as I want.
    I send here the vi.
    If someone could help me, thanks in advance.  
    Attachments:
    number of clic.zip ‏24 KB

    Hi,
    The problem is the execution time, if you push the mouse button your program will execute number of times before you lose the button agian. Even if you push it realy fast.
    I made some changes to your code there i wait until button is released befor continuing.
    Regards
    /Thomas
    Attachments:
    number of clic Folder.zip ‏20 KB

  • Problem with count query

    I am connecting to the excel and running the following query:
    Select Count(*) from [RIF$];
    I is working fine and giving me total count of rows
    Now when i try the following version of count
    Select Count(Distinct Status) from [RIF$];
    where Status is a column name.
    It is giving the following error:
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] Syntax error (missing operator) in query expression 'Count(Distinct Status)'.
    Pls help me
    its as always urgent

    This shouldn't execute in the quiery analyzer too, you don't have a java problem. I am not sure this is the optimal but you can try something like:
    select count(c_id) from (select distinct pcid c_id from contragent) cntr HTH
    Mike

  • AE CS6 having problems with jagged edges in my render

    I used to compose videos together using After Effects CS4 and the default settings for rendering produced good renders, but after I've upgraded to the CS6 version I notice jagged edges problem in my renders that I didn't have in CS4, and i'm using the default settings in CS6.
    This is a screenshot of a video rendered using CS4 (default render settings):
    This next one is rendered using AE CS6 (default render settings):
    I have looked into the formats that both versions render at and tried to figure out what the difference is. To start off, the available formats given in CS4 seems a lot more different than those in CS6.
    -CS4 rendered in a "Video for Windows" format by default and in Format Options it is Uncompressed, while CS6 doesn't have the "Video for Windows" option at all (and I can't find AVI format for CS4).
    -In CS6 the default format is "AVI", and the Video Codec inside Format Option is "None" by default.
    I'm not sure if this is why CS6 produces jagged edges in its videos. Does anyone know what I can do to render sharper videos in CS6 so i can stop using the CS4 version?
    For example should I maybe change the format from AVI to something else? Change the Video Codec from None to something else?

    Well, straight up: Have you ever bothered to read the AE help? No offense, but this really sounds like "I use the default settings, but otherwise I don't know quite what I'm doing." AVI is cunningly called Video for Windows proper. the rest makes no sense. You are not telling us anything meaningful like comp settings and so on or how you verify your output. The second image simply looks like the hardware scaling in the comp viewer at odd zoom rates and resolutions. Anything beyond that will require a lot more info.
    Mylenium

  • Audio timing problems with publishing AVI files... Desperate for suggestions!...anyone?

    I could really use someone's suggestions on how to troubleshoot this issue. Been working on this issue for 6 weeks, with no solution in sight.
    I have created demonstration tutorials in Captivate 4, (purchased, not demo) and am using the text to speech (Kate's voice) as the audio. I am trying to get an AVI file as the final product, as I will be publishing this on YouTube.
    When I publish the file as an AVI, the audio does not sync with the video.  (The audio is slightly faster, so when I get to the 15th slide, the audio is ahead of the video.)   However, when I publish to an SWF file, the audio syncs perfectly.
    I had been working with Adobe Tech Support, and their feeling was that my file was corrupted. So I created a brand new file, new recordings, etc, even made this file shorter (3 minutes long), and I experienced the same problem.  Deleted all non-used files. Working on the local drive, not on the network.
    To troubleshoot this, we recently reformatted the hard drive on this machine, took every program off, defragmented, so the system is very lean and clean. We reinstalled Captivate and all the updates from the Adobe website links, in case our CD version of the app was corrupt.
    Added more memory, so now we have 3 GIG of memory.
    Running XP, the only installed programs are MS Office, Kasperski, and Captivate.
    I restarted, and do not have any other program actively running (except Kasperski)
    Does anyone have any experience with the same problem, or suggestions on what else I can do to fix this problem?
    I will send you virtual Karma points if you can help me. 
    Thanks for reading this!

    Hi again
    Thanks for the Karma thought!
    As an aside, I try to do all my banking at the First Universal Bank of Karma! W00T!
    On the TTS bit I'd be totally shocked to discover it were a factor. This is because the only thing that happens with it (as near as I can tell) is that the text is converted to a WAV/MP3 file same as would occur by virtue of recording one using a microphone. So I figure a WAV is a WAV is a WAV.
    Then again, I never claim to know it all about anything. Then again, I also think anyone that DOES claim to know all there is to know is either foolhardy or a pompous donkey.
    Cheers and good luck! Rick
    Click here for Adobe Authorized Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Group by problem with count

    I am trying to figure out the number of charters taken by each customer. I can get it to work fine if I just count the trip id and group by the last name. The problem is that I want to display my customer's full names and keep getting errors when I try to group by the concatenated field Any suggestions? Here is the code I am using:
    Select count(charter.char_trip)"Total Charters",
    CUS_FNAME||' '||CUS_LNAME "Customer"
    From CHARTER, CUSTOMER
    WHERE CUSTOMER.CUS_CODE = CHARTER.CUS_CODE
    Group by "Customer"
    ;

    try using a subquery.
      select cc.customer "Customer",
             count(cc.char_trip) "Total Charters"
        from (select charter.char_trip,
                     CUS_FNAME||' '||CUS_LNAME
                From CHARTER, CUSTOMER
               where CUSTOMER.CUS_CODE = CHARTER.CUS_CODE) cc
      group by cc.customernote: untested

Maybe you are looking for

  • Shutdown due to a problem on every reboot

    Hi, I'm on OSX 10.10 on a 13" MacBook Pro retina and since some days I get a note on every bootup claiming the computer shutdown due to a problem and if I want to open windows. But I just shutdown the computer by "Menu -> Shutdown". Why is this happe

  • Fusion Drive on Macbook Pro & Hibernation problem

    Hi, Two weeks ago I installed second SDD in my Optibay (Macbook Pro mid2010 13"). Now I have HDD (Seagate Momentus XT 750GB) + SSD (Kingston V300 60GB) in configuration like that: 1) HDD in normal bay (because of SMS) 2) SDD in optibay I configured t

  • IFrame instead of Tabular Form...

    Experts, I have a table I want my users to work on, preferably using a tabular form. The columns are a bit like this: Country, State/Province, City. The most useful way to do this would be 3 drop-down lists, each value cascading to the next LOV and p

  • Downloaded files won't install

    A general question about a problem I'm having. I don't think its mac mini-specific but that happens to be the machine I'm using: Some files downloaded from the internet won't install, even after I click to allow permission on the warning screen.

  • Where do i find my wep

    I am having trouble finding my WEP so I can enter it on my Wii