given high-frequency sampling one at a time

Hello

I'm using LabView 2011 for resistance measurements.  The express vi DAQ assistant is placed in a while loop and it acquires 1 sample (on request).

Each sample is acquired, it is compared to a set point. If the resistance value is greater than the set value, a task is executed. If this is not the case, no action is taken.

Now, I would like to increase the frequency of acquisition of say 5 kHz. As before, I wish the DAQ to give each value because it is acquired and compare it with the desired value.  However, only one point acquistion is limited by the speed of the while loop (which does not exceed a few Hz per second when I use the software-timer.)    If I use 'continuous samples' at 5 kHz, data acquisition does not give these samples one at a time.  It seems to acquire until the buffer is full and then released several samples at a time. It is therefore impossible to compare with the set value.

Is it possible to get data at a high frequency and do compare to the set value, one at a time?

The code is simple enough to do this.

But the problem, it all comes down to how fast all of the other code in the loop takes to run.

The first problem is that you use the DAQ Assistant, which provides a lot of extra load in the loop, especially if you don't set it up properly.  (And we can't say because no code is set to look at us.

You should try a real code DAQmx where launch you acquisition continuous samples before the loop, acquire exactly 1 sample in the loop.  Then close the DAQmx task once the loop ends.  See if keeps.

Why do you need to do this?  Note that all instant Windows might decide to fly a second or two and go and do something else like a virus check.  If you need at that moment (how exactly do you need that?), then Windows is not the right system for this run.

Tags: NI Software

Similar Questions

  • Model PWM measurement for continuous samples on higher frequencies (100 kHz) with SemiPeriod(HighTime / LowTime)

    Hi people,

    I have a challenge I'd like to discuss with you and hope to have some ideas and maybe a solution.

    I have a systems acquisition (DAQ) Multifunction National Instruments NOR-PCIe-6353 means X-Series!

    I would like to generate and measure signals pulse width modulation .

    DRIVER:

    OUTPUT:

    FREQ: 0, 1 Hz - 1 MHz

    Duty: 1-99%

    Change the setting on the fly

    (This works very well and is implemented)

    ENTRY:

    FREQ: 0.1 Hz - 40 kHz

    Duty: 1-99%

    Method of measurement: period of semi / ContinuousSamples / AsyncCallback

    Here, I have problems I am running only on an Intel Core 2 Duo CPU E8500 @ 3, 16GHz.

    And I want to run 2 PWM_IN and PWM_OUT 2

    Low frequency work fine!

    0.1 Hz - 20 kHz

    It is a loopback with

    myCounterReader_1.BeginMemoryOptimizedReadMultiSampleDouble (2, myCallback_1, myPWM_IN_1, myPWM_IN_1_Data);

    Data = myCounterReader_1.EndMemoryOptimizedReadMultiSampleDouble (ar, on myPWM_IN_1_Data_actualNumberOfSamplesRead);

    A higher frequency do not work very well!

    20-40 kHz

    I get exception Code of State-200279:

    Attempted to read samples that are no longer available. The requested sample was already available, but has since been replaced.

    Increase in the size of buffer, most frequently the reading of data or by specifying a fixed number of samples to read instead of reading all available samples would correct the problem.

    Property: Value of NationalInstruments.DAQmx.DaqStream.ReadRelativeToRequested:

    NationalInstruments.DAQmx.ReadRelativeTo.CurrentReadPosition

    Property: NationalInstruments.DAQmx.DaqStream.ReadOffsetRequested value: 0

    Task name: NI1_PWM_IN_ctr0

    State code:-200279

    40 kHz, period is 25us = 12, 5 HighTime and 12, 5 LowTime 50% DutyCycle

    This means that each 25us I get a reading of 2 samples the HighTime and the LowTime

    I charge my task of Max, so here's the Setup (sorry its german):

    1 can someboby you explain to me what the MemoryOptimized?

    2 Zu lesende values means that the size of the buffer 10 is not much but increases the size of the buffer to say 10,000 needing help on

       a longer time! 

    3. playback of data more frequently is not possible because the data are under tension, because it is

    4 specify a fixed number of samples I der number is HighTime 2 and LowTime

    5. I have does not start and stop the task! Is it better to start and stop the task each time while I still may have a new buffer?

    I hope someone has an idea for!

    By

    Steven

    Reading with 50 software we period - bad idea, you will jump impulses. Try to use DAQmx Read Overwrite property, set it to "crush the unread samples" - it will overwrite the impulses without error.

  • 6035-E high frequency noise reduces the resolution of 14 bits.

    Dear Technical Support Group OR and MF DAQ,

    I don't get the complete 16-bit on my DAQ 6035 - E cards and 6034-E resolution because of the high frequency noise.
    The Test Panel and the actual catches show 1.2 mV peak-to-peak noise with entries is is failed the GA right input in differential ended mode and single connector - Test Panel screen grab and connector attached picture.
    With a range of +-10V, noise LSB + half expected specified in the manual should be only 305 microvolts (20/65536) which is four times less than what I see.
    So far, I've been scanning (a channel) to ten times (60 KHz) the rate I need (6 KHz), then SavGol the filtering and sampling downstairs.
    The problem is that I need to sweep the four channels that now exceeds the capacity of 200 KHz of the card and also results in huge quantities of useless data.

    Have considered buying a new USB DAQ with better record, I fear that all products OR suffer the same flaws and gave the purchase.

    Please, share your ideas.

    Thank you.

    GPSman salvation,

    Looking at your control panel test plot, it would seem that there is a discrete steps on your axis is between - 0.0019 and - 0.0012 or 700 µV.  Then you can see that there is about a little more than 2 discrete steps to your signal, which brings value to about 300 microvolts, exactly as the resolution makes clear.

    You can also find that there is a specification of noise and precision in specification.  You can find for a single point, the accuracy in the +/-10V between 1,085 millivolt.  This is on page 4.  This would allow your signal of +/-1 mV of the expected value, the test also indicating panels.

    Does that help?

    best,

  • Help the spikes of voltage high frequency Counting

    Equipment: NOR USB-6229 (250 ksps / s analog in., 16 bit DAC, 32-bit counters, and internal clocks)<= 80="">

    LabView 14

    Problem:

    I have an experimental app where I need to count the points of tension (entire #) caused by electrons striking a sensor. These tips can be as frequent as 500 000 heads of charge/sec. The tips aren't going to be the same tension every time, but they will be visible above the noise, so I need allow the user to select a threshold voltage that triggers a true count rather than the tips of noise.

    Attempts:

    To count such a high frequency, I gather that I need to use a counter entry to read fast enough, HOWEVER, I wasn't able to find a way to define a threshold of voltage for a counter entry because I think they expect a TTL signal anyway, which I won't. To set the threshold, I realize reading of analog input can be triggered at a point chosen, which is great, but the Analog Input sampling rate is only 250 kech. / who will not catch count each in my project.

    I have a program that uses the channel count edges and it is accurate to 3% of the # expected charges. I was looking at him just with a function generator and the program does not count unless the signal voltage is higher than V 2-3 who does not work for my application. I'll post what I have. Someone know how to trigger at certain levels of tension using counters, or know a way to filter through the noise to get real tips?

    Thank you!

    You will need a device with a sampling rate of greater than 1 MHz analog input or you will need an external reference. With the external comparator, you can use output to set the threshold, although the user would not be able to see the signal or the threshold, only the analog account result.

    Lynn

  • Generate digital waveforms of high frequency

    Hi all

    I have some problems. Today, I am generating several digital high frequency waves with my DAQ (PCI-6251) card. The duty cycle of the waveform must be adjustable.

    The required frequency is 100 kHz.

    To do this, I have tried several solutions:

    (1) I used counters in the acquisition of data to generate waveforms, and it worked fine.  However, I have only two counters. In my application, I need to at least three waveforms with different cyclical report;

    (2) I used a 'loop' and structures 'case' in labview to build the model of waveform and then feed them to the digital I/o. However, the problem with this solution is that the frequency of the wave generated cannot be high.

    (3) I used a 'digital' generator in Labview to generate waveforms and then feed them to the digital I/o. In this case, the time base is from an external source (200 kHz). However, with this solution, the cycle is not adjustable.

    Please give me some advice on how to make these waveforms.  Your assistance is appreciated.

    OK, so I may be wrong, but after mucking around for a bit, I realized that the regeneration should be automatic - in other words, if you a pattern to the right and then just leave your VI work in a while loop, you will find that the generation is continuous.  Discover the correlation dig write metered in the finder for example Labview.  You can leverage this as you get the cyclical report you are looking for.  You can split the signal down what you write a single period consisting of a series of 0 and 1.  In other words, if you want a wave of 100 kHz with a cycle of 20%, you write a pattern of digital waveforms a 1100000000 at the rate of 1 MHz.  Using this technique, the resolution of the cycle will be limited by the on-board clock speed (80 MHz = 0.125%).

    Let me know if this makes sense - I am unable to reproduce this on my desktop and have never had to do this before.

    Cheers, Matt

  • generation of buffer desired waveform ╔chantillonnage clock and clock frequency sample resulting

    Hello, I'm trying to generate a square wave on an ongoing basis for NI6221 DAQ to 2 kHz. I use the example of Cont Gen tension Wfm - Int Clk.vi, which works great for my needs. However, the synchronization frequency setting is sometimes different frequency resulting, according to the choice of the samples and the Cycles / buffer. Tracking dozn the origin of these variables, all come from the nodes property of the moment-DAQmx in Buffere waveform generation (multi) .vi, where the input and output frequencies are not the same. Now, why is it so? What is the way the rate is calculated? I guess it's related to an internal approximation of the Council divided by sweep sampling frequency, clock but how exactly?

    I found some notes in the help (see figure), with a few diagrams of the oscillators according to the DAQ (M type) card, but then I'm lost.

    Thank you very much

    Virgilio

    The AO sample clock is generated by dividing down the time base.  If you select a clock frequency sample that can not be achieved by dividing the time by an integer base, the sampling clock frequency will be rounded up to the available sample rate nearest (it might be interesting to note that tasks HAVE always round the frequency rather than rounding to the nearest available).

    For example, the maximum time available for AO internal base is 20 MHz.  If you select a sampling frequency of 300 kHz, this wouldn't be possible (20 MHz / 66.66666...).  Instead, ~298.5 kHz will be used (20 MHz / 67).

    Best regards

  • 6722 to higher frequencies (about 3.125 kHz)

    Hallo,

    How can I control the PCI-6722 with higher frequencies about 3.125 kHz? Is it possible to use Labview? How? If it is not possible, how can I control the map to higher frequencies and visualize the information in Labview? I have not found a link to get manuals etc. that help. Links are welcome.

    Thank you

    Verena

    The PCI-6722 does not support the entry of digital waveforms.  It's digital lines are static (unbuffered), and every acquisition of waveform of them must be software controlled.  Since modern multitasking operating systems are not deterministic, this translates into large amounts of jitter in when samples are collected.  If you need good digital waveforms entry, you will need a different card.  However, the 6722 has two counters/timers, so if the function you are trying to run is less their capabilities (for example to determine the frequency of a digital input signal), you should be fine.  Let us know which task you want to accomplish and we can point you in the right direction.

  • HIGH FREQUENCY OSCILLATOR circuit

    I need to generate barcodes random using a timer 555 operating at high frequency and connected to a pair of JK Flip flops of installation as a 2-bit counter. May I ask is my correct circuit?

    You answered your own question. If you try to run it outside its maximum frequency, you may have irregular gusts. For reliable operation, use the 555 (or no matter which component) in the specifications. If you need a higher frequency, you need a different design.

  • To generate a sinusoidal waveform of given the frequency of acquiring data 6251

    How can I generate a sine wave of given the frequency of acquiring data 6251? I tried to use the generation of waveform of the signal processing Toolbox, but it seems that it is written that the first or the last sample, not all. I have faced this condition when I tried to write through 1 d double multichannel analog waveform.

    In the examples, look at Gen Con voltage Wfm - Int CLK.

    If you continue to have problems, according to the code you have written.

  • When I connect my computer to the Netgear router, they do not seem to recognize the signal from the modem. I have to run each device directly to the modem (one at a time) for internet access.

    I have both a laptop and a desktop computer and use a modem wired high-speed internet.  I bought a router "Netgear" 5 port so that I could have both online at the same time, but when I connect my computer to the router, they do not seem to recognize the signal from the modem. I have to run each device directly to the modem (one at a time) for internet access. It gets very tedious, please help...

    Original title: router does not work...

    Hello

    Welcome to the Microsoft community.

    I see that when you connect multiple computers using the Netgear router, it does not recognize the signal from the modem.

    You must contact the ISP to verify if they can help you with this question.

    In addition you can keep these items handy, it might help you.

    Set up a wireless router

    http://Windows.Microsoft.com/en-in/Windows7/set-up-a-wireless-router

    Install or remove a modem

    http://Windows.Microsoft.com/en-in/Windows7/install-or-remove-a-modem

    Change modem settings

    http://Windows.Microsoft.com/en-in/Windows7/change-modem-settings

    It will be useful.

    If you need help with Windows, let know us and we will be happy to help you.

  • Enhanced CPU when displaying multiple feeds one at a time and then publish

    Hi all

    We see CPU the Flash Player "pawls" slightly higher process whenever a user displays a new webcam stream, one at a time in a WebcamSubscriber.

    For example, I look at the feed for the user, then this flow is removed and I then watch the streams for user B, then this flow is removed and I watch the stream A, B or C and so on.  It seems 'ratchet' more of the same amount regardless of if I saw the flow of this particular user before.

    It is only a few percentage points of use of the processor every time, but on the whole, it can get to 100% usage and crash the flash player quickly.

    Some details of our tests:

    -We managed to contain if this happens only when the user publishes.

    -If a user has looked for a long time without publication, then began to publish, the CPU usage suddenly will be dope as soon as they start the publication.  During our tests it stings as much and more as if they had published all the time.

    -If the user starts the publication before you start watching, they are not affected by this pic.

    -If a user starts editing but did not follow the water courses, the edition CPU usage is normal.

    -Refresh the browser page and publish again, the CPU usage is normal.

    -L' call system.GC(); While running in the debugger flash player seems to have no effect on the peaks of the processor.  All streams are maintained around must still have something pointing at them, so they will not be garbage-collected.

    To subscribe to each successive flow, we who do by defining

    webcamSubscriber.publisherIDs = [newStreamID];

    We have been experienced for a long time with different parameters that could reduce the CPU spikes and ratchet effect, but have not been able to solve the problem.

    How to prevent this CPU and the spking ratchet effect?

    Thank you very much

    -Trace

    Hi, Trace,

    As Arun alluded to, we found a bug in publisherIDs that, now that we

    He fixed, seems to mitigate the issue significantly. It stubbornly when

    you delete and re-create a webcamSubscribers, which we are looking into.

    You can try the swf arun published? What we see is that

    takes a big (100 +) clicks to get to 100% and awaits a little will be

    often so clean (we saw him bounce back to 100% + 10%).

    Try the swf and let us know if you see similar differences. We are not

    entirely done yet, but it's certainly much better at this end.

    Thank you

    Nigel

  • Is there a way not star multiple messages instead of one at a time?

    For some unknown reason, almost all the messages in my Inbox were "Favorites". I want to remove the stars before check-in. Anyone know why this could happen and is there a way to 'uncheck' several messages, instead of one at a time?

    You must first select all of the messages concerned.
    Click on the star at the top of this column to sort on that column.
    This will place all together tracked messages. Click on the star for a 2nd time to reverse the sort if that helps.
    Click on the first star message. Now go to the last message with the star and hold the SHIFT key while clicking on that. This selects all messages in this block.
    One of the messages of a right-click and select Star Mark-Add

  • How to select entire groups or to multiple recipients in MAIL, rather than one at a time?

    How to select entire groups or to multiple recipients in MAIL, rather than one at a time?

    One way is to use the app to create a group with the intended recipients. Then when composing the email just type the group name in the To: field.

  • How can I erase all my thumbnails without doing it one at a time?

    When I open Firefox, I see a sticker on the screen for everything I did in my last session. Of course, this can add up and is not particularly useful to me. How can I delete these rather than one at a time click the method of X?

    This homepage will learn your sites most used subsequently, however, the thumbnails are customizable, you can edit where their link and PIN/detach it position it on the page. or you can go to edit > Preferences and change your homepage to something else. clear your cache and history should also do the trick

  • Removal of cookies, one at a time or all, does not work; they reappear when I return to see. This is a critical issue of privacy!

    Delete cookies don't work, one at a time, or remove all. I tried the history and the options screen. They seem to go, but when I go back in that they are all back. What is happening in the latest version which has been updated automatically. bold text

    Yes, thank you. In fact, I discovered it was Taco late last night and disabled. It seems that Taco creates more problems than it solves.

Maybe you are looking for

  • Why my PC says that Firefox is missing or incompatible?

    My PC says "your Firefox profile cannot be loaded. It may be missing or inaccsessible. » I restarted the computer, but it does not help. Troubleshooting of Microsoft gave no help, either.

  • Re: Tecra M5 - Windows 7 - external display problem

    Hello I have a Tecra M5 and now I decided to install windows 7 on it.Everything is ok except the external display output.Chosse the external display with shortcuts to windows 7 (w + P key) or Fn + F5, it does not work.The screen external ir well reco

  • Why the combat arms do not work on my dell inspiron 15r

    Why combat arms do not work on my dell inspiron 15r that I have downloweded only and he will will ask permission and then start the game but it wont start the game

  • Photosmart 7510 C - 311 a mismatch of paper for printing envelopes using the Apple AddressBook

    Product name: HP Photosmart C-311 7510 has All In One Printer Operating system: Mac OS X Lion 10.7.4 (11E53) Error message: paper mismatch when trying to print envelope #10 via apps Apple Address Book, Snail Mail or MS Word The system changes: replac

  • Backgammon Win NT

    Is anyway to run the old game of Backgammon of Win NT on Windows 7?  I prefer away game 3 matches and NT controls, but I 'upgraded '.  I tried to move the .exe and .dll files associated with my Win 7 office, but 'no dice. '