Acquisition of samples before

Hello

I use a PCI-6602 card to record the time of incoming pulses. I would like to add a trigger line so that my program will retain the value data of 20us pulse before and after the outbreak. I tried to use a trigger to armstart, but I only managed to configure to start recording after this trigger impulses, and if I don't get the before trigger pulses. I also tried to set up a relaxing instead stop: I read pulse time and ignore data prior to 20, and when the trigger comes I let the program run for 20 microseconds. The problem with that is that, being new to LabView, I did not understand how exactly to do this kind of buffer that will reject the older data. I looked at a node of feedback, set to return only the samples after a number of iterations of my acquisition of data earrings, but of course, that returns only the oldest data. I also feel that using this method of stop-trigger seems a little roundabout. I have create a new task for the trigger channel, and I fear that this may slow down my program because I need to run continuously (I want data surrounding several triggers), and it seems unnecessary to re-create the task each time. Any suggestions? Is there a simpler way that I have not yet thought to?

Thanks for your help!

Kamna

These express vi is known to be ineffective.  All this works only to save the last 20 values.  Hmmmm OK I have attached a mod of your vi who works as a buffer and operates on data without conversion of type and the place (should be orders of magnitude faster) I also have initiallized the SR and FBN and fixed a bit of logic on the counter

Tags: NI Software

Similar Questions

  • Acquisition still samples N

    Hi - I hope that it will be an easy question to answer.

    I read in an analog voltage.  I need to acquire 20 samples whenever the voltage exceeds 0.1 V.  What is the best way to implement?

    I tried to put a N-samples acquisition since a while loop with an analog edge trigger (amounting to 0, 1V), but it lacks most of the peaks of tension (the data rate is 1 MHz and voltage will be above 1 V of 1000 times per second).

    Thanks for your help!  (I attached the VI if you want to see what I have)

    Jeremy

    Look at the example called Acq & chart voltage-Int Clk - HW Restarts.vi Trig. I think you need to do is to start and stop inside the loop. Sorry, I forgot you were tripping. I also noticed that the trigger in the last VI conditions do not match what you used in the DAQ Assistant. You trigger edge in the last and before that you were using an analog trigger.

  • Multi-channel acquisition - simultaneous Acquisition of sampling 1 & 2-channel single sample in a task

    I am able to get a multichannel simultaneous sampling on my acquisition of data (USB-6363) without problem. But what I want to do is make multi-channel acquisition in a single task where sampling requirements are different for each channel. For example, I want I want to acquire a total of 1000 samples on 3 channels in a single task with DAQmx as follows the characteristics of sample:

    • AI0: Analog Wfm 1Chan NSamp (998 samples)
    • AI1 + ai2: 1 d analog NChan DBL 1Samp (1 + 1 sample/channel)

    I know I could do just a regular multiple sampling multi-channel acquisition through all three channels then average down from channels 1 + 2, but I don't have that several samples to spare. AI0 is a bandwidth hog in my application and consumes all the samples of data acquisition (2. MECH / s), but I can save a few samples to make analog measurements further (for example, temperature, pressure).

    Ai0 takes place also permanently so additional analog measures on ai1 + ai2 need to be included in the same task.

    I don't know how to go on this matter or if it is still possible. Any ideas or thoughts would be greatly appreciated.

    Currently I use a second DAQ to read these additional channels at a lower rate but I need to pass a single data acquisition.

    How should continuous ai0 really be?  You of course can enjoy on ai0, and one of the other entries at the same time, then there would be some gap in your data.  In addition, if you want to go to the full 2 MHz, you may sample ai1 ai2 twice in order to allow entry to set (the maximum specified multi-channel rate is only 1 MHz due to compaction of the constraints on the MUX I believe).

    DAQmx sort of you lets set something up like that, if you "cheat" it by configuring each sample as a single channel in your task (see an example similar here).  If your 998 + 1 + 1 (or 996 + 2 + 2) becomes a task of channel 1000 (takes a bit more memory, but should still be feasible).

    I would consider a 2nd DAQ card a better option if ai0 really needs to be continuous.  You can go with a (9174 or 9178) cDAQ chassis a 9223 (only 1 MHz if) for quick entry and your choice of module for the slower entries.  On the cDAQ chassis a module can run a separate task of AI from other modules (up to 3 tasks HAVE by chassis) at different speeds.

    Best regards

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

  • Doubts about the sampling frequency when the production and acquisition

    When the generation and acquisition of samples, the maximum sampling frequency is the maximum sampling frequency Council divided between the generation and acquisition of task number?

    Thank you

    Hi Houari,

    You should read the specifications of your box DAQpad!

    It is clearly said: entered analog = 200kS/s rate sampling, but analog output = sample rate of 300 s/s or even just 50 s/s for the hardware timing!

  • How to delay a PXI-5122 trigger before routed to string of PFI

    Hello world

    I use a PXI-5122 in a PXI chassis. I want to synchronize with two external devices. The first will send a trigger (with a 10 Hz repetition rate) for PXI-5122. Then PXI will generate a trigger (with a constant delay) in the second.

    It seems that I need to generate a trigger, then export this trigger to PFI 0 line, but I do not know how to delay triggers with a timeframe of 4µs. I read that there is a slight delay between a trigger on the PFI and the first sample. And the length of the cable is also an important factor to consider.

    Could someone give me some suggestions?

    Wednesday,

    Thanks for the drawings, that helps a lot!  Somehow, I see this work (how to set up the scanner):

    1. set up the record length to be 12us (4us trigger samples, 8us after outbreak).  If the sampling frequency is 100 ms/s, that would be a record length of 1200 samples.

    2 configure the position of record reference to 33%.  That's how the digitizer breaks 1200 400 samples according to trigger before triggers and 800 samples.

    3. configuration of triggering immediate reference.  This will allow the acquisition of trigger the moment she gained 400 before triggering samples.

    4. export the "reference trigger (Stop)" to send to Device_2.  This output pulse is of variable width, so if you want consistency, you will need to the Device_2 trigger the rising edge of the pulse, did not not fall m.  Once 400-pre-trigger samples are acquired, this impulse will be sent, and then the scanner will be immediately habitable after initiation of sampling.

    5 configure the trigger of the entrance of Device_1 (10 Hz trigger), as the 'Advance trigger' and 'Start Trigger'.  This will make the digitizer wait this impulse to start sampling before the next record.  We set up, the relaxation of beginning to the 1st record and the trigger in advance for all subsequent records.

    This facility should allow a pretty decent timing, but please test to be sure that it will be sufficient for your application.

    Kind regards

    Nathan

  • Error 50103 during continuous acquisition and triggering

    Hi all

    I'm ai0 data acquisition: 3 4 analog inputs (voltage) in continuous mode, display the data (tables and graphs) and data flow to TDMS files in a loop of the consumer.

    The same time, I want to be able to save "time windows" with my purchase. For example, I want to be probe ai1:2 and when the voltage exceeds a certain value, that is to say 0, 5V, I can trigger with analogue reference and get a certain amount of samples (finished samples) after and before (samples before). I am aware of how I can achieve this, an example of NOR is more useful: http://sine.ni.com/devzone/cda/epd/p/id/4840 .

    The problem is this: I don't want to stop the continuous acquisition which is already underway. If I try to start a new task (somehow "copy & paste" the example) that I get, as expected, error-50103, "the specified resource is reserved.

    So, is it possible to accomplish this task without having to fall on reserving resources problem? And if there is not a way could you suggest a way to make this front trigger and trigger sampling?

    Please find enclosed a snapshot of the code. I use a PCI-6254 with two SCB-68.

    Thank you and looking forward for you advice!

    Best regards

    Panos

    Have you seen this?

  • How to check that I have don't last any time during acquisition?

    Hello

    I need to make a continuous acquisition of data using the map OR SMU 5162 that is why I wonder if there is a property in labview node or a program that shows if I lost any points during acquisition?

    I really need the answer! Thank you

    Hajar8,

    When you start an acquisition, all samples are stored in the memory embedded in a circular buffer.  Then use "Fetch niScope" to request the data from the memory, and the samples are sent via DMA to host and your application.  Because the buffer is a circular buffer, if you retrieve records fast enough (or the sample rate is too fast), then its possible for acquisition to fill all of the on-board memory and then start to crush old samples.  No error is thrown when this happens when you use the SMU-5162.  Instead of this, when you try to extract the data that has been overwritten, the VI "niScope Fetch" will return the following error:

    «Error 107411863 occurred to niScope Fetch...»

    Possible reasons:

    The requested data has been overwritten in memory, so it is no longer available for pick up. »

    I hope this helps.

    -Nathan

  • Loss of information on the edges of the sample of low-pass filter

    Hello

    I use a low-pass filter elliptical command to address 6 to remove trend of signal in a measure of the pressure of data sampled before, however given that the program must deal with and calculate an index in a given period of time, I can't filter and store then the data for the calculation later.

    The size of the sampe is this 1250 or 10secs data with sampling frequency value is 125 samples/s.

    In the effort to eliminate the distortion of the filtered signal, I use a technique described for tag/add a start and a value final ampitude on the beginning and end of the sample of the same length (1250), I have also run the data in the order opposite to eliminate phase effects.

    However I want to say is still a slight distortion that can be seen in the start menu of the sample; first of all, here with the loss of amplitude, but more often it's worse than that and distortion occurs at the end of time to time.

    I have some experience of the DSP (but since 20 years ago!) and remembers Windowing may be a way, but I still think that the filter should not be so difficult to implement more I don't want to lose any information amplitude.

    Any help would be appreciated.

    See you soon,.

    Kevyn

    johnsold wrote:

    ..., you may need to use different techniqoes that are not in the information stored on the previous behavior of the signal.

    Lynn

    In some cases special where information that happened before all data you have is implicit, but data yo u have, you can go out with reflecting data about initial/final data set and then run the data through the filter first forward, then backward. After that mix data accompanying your data "pretend" and just look at the part that iss associated with the actuall data set.

    Ben

  • I can't stop finite samples daqmx read between the two?

    Hi all

    I want to read data from 10 seconds to a trigger is received. for this im using daqmx task finished sample mode and read the data on the trigger getting. It works fine but I can't stop my vi between the two when its reading of the data. I have to wait for it to complete the reading of values, and then stop the vi.

    so I switched to continuous sampling mode that allowed me to stop the vi whenever I want.

    I just want to know is there any means or the property using which I can stop my task over daqmx read when I want?

    I guess you call DAQmx Read with extraordinary value (-1) for samples of #.  It is also the default if left thread continues.  In a finished sample task, it means to wait until the memory full buffer has been filled with samples before returning.  Once you make that call, you cannot directly finish soon.  You're stuck waiting for buffer fill or for the timeout expires (default 10 seconds).

    One way to avoid getting stuck is not to ask for samples that do not exist already.  You can query a DAQmx Read property, known as the "Samples available" or something like that and son of this result in a call to DAQmx Read.  Such a call will return immediately whatever data are currently available.  Subsequent calls will give you samples.

    -Kevin P

  • Pre-trigger samples of error parameter

    I have problems of acquiring data with pre-trigger samples in the capture of several channels.

    If I trigger and capture on the same channel (I tried 1-4) then it works very well, regardless of the number of samples before relaxation together. If I trigger on channel 4 and capture channels 4 and 1 (passed in this order), with no set pre-trigger samples, then it works fine. However, if I trigger on channel 4 and capture channels 4 and 1 (passed in this order), with samples pre-trigger together, then I get the following error:

    Error-10621 to AI control. Possible reasons:
    NOR-DAQ LV: The specified trigger signal cannot be assigned to the resource for the trigger.

    The forum search, I found a few other people who have had the same problem , but they had no solutions. Any ideas?

    Thank you Christina, it's a good suggestion. I just discovered that it is a hardware limitation, however.

  • determination of the sampling rate and the frequency waveform data record

    Hello

    I write a simple program that collect data from a triaxial accelerometer input, convert it to a frequency spectrum, and then save the time domain and the frequency of the waveforms in an external file separated.  I don't understand how to set the sampling frequency, however.  On the DAQ Assistant, I updated the acquisition mode "Samples continues" and read samples is 2 k, which corresponds to the total number of data points that are collected.  How can I program sampling for awhile, it 30 seconds, for example?  Wouldn't be better to set up a trigger, as it will continue to collect data up to what I told it to stop?

    I also want to save waveform data in a separate file that can be easily seen by other computers that have not installed Labview.  I have currently the program put in place to convert a text string of the waveform of the time domain and then save it in a text file or a spreadsheet.  It works fine, but I would also like to record the frequency wave, which is a different type of data.  How can I do this or is there a better way?

    My program is attached.  Thanks for your help!

    Here's how you can use the shift register to build the table, and also where you can choose to play exactly 100 samples per while the loop iteration.

    Brian

  • before trigger with four cards PXI-6115

    Hello

    I have a PXI-1010 chassis with four cards PXI-6115, labeled boards 3, 4, 5, 6, installed in it.  Each of these cards has 4 analog inputs (BNC inputs).  In my current system, all four boards fire off the coast of the entrance on first 3 analog.  I'm using an analog trigger mounted on Board 3, which then triggers a trigger digital beginning on the boards, 4, 5 and 6.

    Now, I would be able to take samples before firing.  I worked on this for a while and that seems to happen is that 3rd Chess Board properly triggers and takes samples of relaxation before, but plates 4, 5 and 6 are somehow trigger too late or early or something - they never record my test signal input of.

    Can someone help me understand where I'm going wrong here?  I enclose my VI and also a picture of the important part of my block diagram.

    Thank you!

    It could be that you connect the number of samples per channel in the clocks of the sample for tables 4, 5 and 6. This will ensure that the task creates a buffer on your PC that is large enough to accommodate all the samples you want to read.

    Also, why did you remove the structure of sequence? You need to ensure that the advice of slaves were armed in front of the master bedroom.

    Here is a link to an example similar to what you're trying to do. This example acquires the data at different speeds on different boards, but it seems that everything is identical to what you are doing. I think it might be useful for you: https://decibel.ni.com/content/docs/DOC-11698

    Jeremy P.

  • NEITHER 9212 - issues with sampling frequency, number of samples and size of buffer or slowness comes together with thermocouple module

    To begin with, I am very new to labview and unfortunately on that my first task is to build something rather complicated for a project that my company works. Fortunately it is especially followed rather than control critical processes.

    Currently, I have a cDAQ with modules, DI, AO, and TC.

    cDAQ-9133

    NEITHER 9472

    NEITHER 9421

    NEITHER 9263

    NEITHER 9205

    NEITHER 9212

    I'm currently running read-write for all 5 of these modules in parallel while loops and analog and digital inputs/outputs modules that all work as expected. Each loop requires 1 sample per channel through the wizard DAQmx etc for each module and I got can interact with all the asyncronosly inputs and outputs which at the moment is the goal. I can switch power switch for each module save memory, or if the need arrives later.

    My problem is that the module TC (NI 9212) when tilt on which allows the acquisition of sample 1 loop seems to take much, much longer to collect samples. I have played with different acquisition parameters and can seem to get a continuous flow of data when you use streaming samples, or even when specifying N-samples but I come in questions where the "application cannot catch up with the hardware.

    I tried to find an optimal number of samples/sampling, rate, etc I can get an update of temperature more than every 1 to 2 seconds, but if I set the number of samples that are high enough to apparently get a constant flow, what ends up happening waveform graphs seem to lag behind the actual data, and that's where I get errors. I only want 1 sample per channel per cycle anyway. Yet once, all the other modules in the cycle with less than 100ms delay between acquisitions but the module thermocouple ends up being 1-2 seconds. It's okay because in our application temperature should not rise/drop very quickly but its boring nonetheless.

    I have the acquisition set up for the same (NI 9212) thermocouple module was like my modules of analog and digital inputs (NI 9205 and NI 9421) take 1 sample every time the task is called so I'm having a hard time understand why do the same for the TC module introduced such a delay. Max sampling rate is supposed to be 95 samples/s/ch, so I guess that the delay must come from call the task over and over again in a loop.

    Synchronization and how you have configured the 9212?

    In the case of high resolution, it can reach 1.8 samples/s. see page 7 of the plug technique here for rates for the supported modes:

    http://www.NI.com/PDF/manuals/374389a.PDF

    -AK2DM

  • Sample of SCADA project transmits alarms

    Hello

    I tried the new sample SCADA project that came with LabVIEW + DSC 2013: file-> Create Project-> projects-> Supervisory Control and Data Acquisition System sample. I've deployed libraries and then ran Main.vi Client and server Main.vi.

    If the Client and server are running on the same PC, everything seems to work properly. The customer receives updates the value, and the controls start to flash red if an alarm goes off. However, if the Client and server are on different computers (on the same local network), and then the customer receives that updates the value of the server- it does not alarm, even if the firewall has been disabled on both computers.

    How can I get the customer to receive alarms when it is on a different PC in this case?

    Thank you!

    Yes, it works correctly for me on multiple computers. You can try to use the name of the computer in the Client.ini file for the server instead of the IP (192.168.1.99 in your case) computer?

Maybe you are looking for

  • Can I put an email to send at a specific date

    I want to put in place a few emails to send when I left, but I can't seem to find an option to do this. Any ideas or is it just not possible?Thank you

  • Apple Watch icon constantly popping up on the dock

    Hello It's maybe just me being picky, but I can not really the small icon Apple Watch that pop up on the left side of the docking station every time wakes up my watch and I use my computer. I can't find a setting for it anywhere. Anyone know how to d

  • Str function does not

    I use an expression after in a stage of the additional results type to add a comment in my report as below. Str = Step.Result.ReportText ("A", "Mode: 50%", True). When running if I see the resultlist step output variables is 50 characters lined up. B

  • Problem pairing 3 Charge JBL for laptop Windows 7

    I recently bought a JBL load 3 Bluetooth speaker. This matches perfectly with my Samsung Tablet and smartphone Sony Z5. My laptop pairs well with my smartphone, Tablet and the helmet Kitsound Manhattan. On my laptop, I can see 3 of load in the device

  • Dry my Ps2 keyboard?

    I spilled some water on my keyboard and I can't make it work... Will it work once it dries or what I bring to the repair shop? I have an acer laptop.