multi channels data acquisition, a single frequency, counter a pulse, two voltage inputs, a power meter (by USB) and an analog output spontaneous and recording

Hello

I have a power meter which provide the USB driver and a Labview program to get the data and NI USB-6221. The project I am currently working on the needs of:

1 acquire two signals (inputs of simple tension), pressure frequency KHz

2. acquire a flow signal, the output signal is 0 to 5V pulse, each pulse means 0.4 ml volume. So I use a voltage inflows to count impulses in certain period of time (in this case, 1 S) for water flow. ; KHz sampling frequency and the 1 Hz update rate

3. acquire a signal of engine speed. The output signal is pulse square wave whose frequency is related to the speed. I use a REIT port to measure the frequency. Sampling rate: Auto

4 give output voltage sine or square wave, I use AO do that.output rate: Auto

5 acquiring by VISA electricity meter data.  Data update rate: every 50ms

Currently, all the 5 tasks work well separately. But when I put them together, some signals are beginning to hang, for example, pressure signals sometimes give nothing.

Another problem is the data record. I programmed the VI in such a way that whenever I press the button 'save start', he begins to record data and save them in a .cvs file. For some reason, I always get only the data in the first table. Coult someone help me? I download my code as follows

Hello

What I meant by open, write, close.  For any type of file you are using.

Open the file, which produces a reference, then put the mention in a registry to offset.

Write data, using the function write (for this type of file) and the reference.

When you are finished, close the file reference.

Writing in the spreadsheet opens, written, close all at once.  It is very good for this type of application.

***

The issue of the loop is more general.  I would like to say first of all, I want to say that since each loop works on its own, it is own VI, and that this program has put all this into a single VI, which has a method to solve the problem is to disable all the loops and allow them one at a time to see if there is a culprit responsible for.

Using multiple loops executes the code at the same time, and some loops would be cycle faster than others, especially if some of them are loops just as they are.

Communication between the loops is a test to the address if necessary.

Running all these signals through different loops DAQ must also be examined.  Don't know what questions are for read and write somewhat randomly in the channels.

Tags: NI Software

Similar Questions

  • USB multi channel data acquisition

    I use the VI to arduino HC-06 bluettoth of data acquisition. I would like to acquire data multicahnnel

    Could you suggest me how to acquire multichannel data from USB? To do this, how I have to program the arduino?

    The crux of your property doesn't do anything since you not write anything.

    Why you set the number of bytes to read at 8? You send more than that. You should be able to set it to a high number, such as 1000. Why do you use a dbl for this control?

  • the 1900 myRIO FPGA multi channel data acquisition

    Hello world

    I would ask you for help in my program acquisition and generation of data. The main task of this program is to measure 4-channel adjustable sampling rate (2 kHz and less) and to generate an analogue signal in up to 50 kHz sampling frequency.

    I created two loops and everyone is dedicated to different operation. The first loop is to measure data, or in writing to the DMA FIFO and the second loop is dedicated to the generation of signals. I adjust the main parametrs of the two loops in a host of vi.

    But what is my problem. I compile the program in the FPGA of myRIO without any problems and I can run too but the problem is that sometimes, especially when I adjust the lower sampling frequency of the loop to measure to the rank of channel changes measured and I see that the signal that is connected to osciloskop AI0 channel on channel AI3. When I stop the program, set the higger sampling frequency and run it again, it works well and the signal is on the right channel. Could someone help me with this problem? I tried to check all the forums that I know, but I did find an article or a discussion of a similar problem.

    Thanks a lot... :-)

    Andrew,

    I just solved the problem. I thought about it again and I got the idea to change the size of the DMA buffer on the side of myRIO. I expanded the buffer of 1023 elements in 2047 and it works well and I can change the sampling without problems.

  • MAC OS Yosemite - CS6 - earlier, I did something to where when I open a file in photoshop, is no longer a single window, now it is two storage ones. one for the program itself, and another for the actual file how to return it where it's all

    -At the time, I did something to where when I open a file in photoshop, is no longer a single window, now it is two storage ones. one for the program itself, and another for the actual file how to return it where it's a window without having to be full screen mode? I managed to go a few times like this, but right now it's really annoying me. Help!

    Screen Shot 2015-01-27 at 4.15.04 PM.png

    Just drag the small window up just under the toolbar, you will see the area highlighted, and when you drop the file should anchor.

  • Data acquisition period log rate Counter

    I measure and record the duration of a pulse train of digital entry (entry to the NI9421 card on a DAQ, series "C" chassis and recorded via LabVIEW SignalExpress 2009).  The acquisition stage 'Counter period' is configured to use ' 1 meter"measuring method.

    In order to save the data that I have to use ' 1 sample (on request)"acquisition mode.

    When I go through the saved data, how can I determine:

    (a) the sampling frequency of the recorded data points?

    point b) absolute timestamp of all the data?

    The log file has no information concerning the frequency of recording and my experiences, it seems to change based on the measured period of entry.

    Any ideas?

    Hi a.yearsley,

    Counters on cDAQ chassis 1st generation (9172) do not support measures clocked sample period.  I assume you are using this chassis since you mentioned that you have the module in slot 5 or 6.

    Your County of edge is very similar to the method of meter high frequency 2.  In both cases, you specify a length of time and count the edges of your external signal during this period.  The 2nd counter is used to generate the gate signal for the duration of time specified.  Your error with this method is up to 1 time of the external signal, it is more commonly used with higher frequency signals (I don't know what is the frequency of the signal).

    The standard method of 1 meter counts the number of ticks to a time base internally (80 MHz) for a period of the input signal.  As the signal itself, it is what is blocking the measure, the sample is locked in the buffer on the edge of the signal and is not clocked independently.  If you wish, you can configure the implicit synchronization, which gives you a period measured for each face of the input signal.

    Taking the stage above an idea more far, you could just set up a task to County of edge with the time of 80 MHz as the source database.  Use the external signal as a sample clock.  The only difference between this and using the standard period with implicit synchronization measure is that the counter is not reset after each sample.  This could make it easier to follow if you want to save a sample all the x seconds (that is, once the total passes a certain value).  You can find the period by subtracting the consecutive numbers and multiplying by the period of the time base (12.5 ns).  The meter would be turning after 53.69 seconds about, but if you read the County under the name of U32 there will be no problem with the subtraction (0000 - FFFF = 1 if the numbers are 32).

    If you're on cDAQ chassis 2nd generation (e.g. 9174, 9178, 9188), then you have not actually taken in charge for a period clocked sample measurement.  You can choose to enable a medium or not.  The user manual 9178/9174 has diagrams showing the extent of the clocked sampling frequency that is essentially the same thing (the driver reverse the measurement period for the frequency).  Must be guaranteed at least 1 m from your external signal between the sample clocks, if you use this method.  The clock can come from many sources - I would probably recommend using another counter to generate.

    Best regards

  • Frequency counter measurement crashes when you're away point zero (NI USB 6343, error-200284)

    Members of the Forum,

    I have problems with a measure of the frequency on a DAQ Mulitfunction of NI USB 6343 X series.  I use the meter 1 (door axis for frequency signal, PIN to DGND 82 77). The couple HBM T10F flange that I use (powered by a power supply of 24V) emits a signal of frequency between 5000 and 15000Hz with 10000Hz being the zero point. Couple flange has a capacity of 5kN.m (15000Hz = 5kN.m; 5000Hz = - 5kN.m).

    I have been using the VI attached for a few months now without any problems.  Now, the VI works fine as long as the couple remains inside a few hundred Hz of the zero point.  However, when the frequency increases further reading couple begins to freeze and finally I get either of these two errors:-200279 or-200284 related samples is not not available.  I noticed that the light on data acquisition close compromise during these periods of frost.

    Here is an example step by step my problem using cal shunt of the flange of the couple:

    1. I have run the VI and couple bed properly around 10000HZ (Active light, indicator light ON)

    2. I have apply the excitation of 5V to the shunt cal and frequency climbs to about 50% of the ability to couple brackets (as it should)

    3. as soon as I remove the excitement 5V playback freezes and the light on the acquisition of data.

    4 if I apply the 5V once again, until the timeput occurs, the led turns on and the acquisition of data reads the signal correctly.

    This type of problem would be more DAQ-related or is it the flange of the couple itself.

    Thanks in advance,

    Mike

    Solved.

    I did some troubleshooting this morning and it turns out that the vibrations of the system had not tightened a screw that was connector to the stator flange torque causing a bad electric signal of the torque flange itself.

    Everything works fine again.

    -MB

  • How to count the pulses with digital input on 6351

    Hi all experts in Labview,.

    I just got my USB x series 6351 and it works fine, but I certainly lack of labview skills to use it to its full potential.

    I would like to read digital pulses with several digital inputs and count the number of pulses each T interval in time. All impulses that I entered on any edge of the clock are not synchronized and can occur at random times during the tests. Basically I have an oscillator of square waves can I modulate the frequency. I don't want to use the meter as inputs as I'm limited to only 2 entries (if I use the option 2 input meter for metering of pulses or frequency). The input frequency can range from 0-1 kHz and goes 0 - 3V. So not too fast, and I shouldn't make too many mistakes trying to get the count of pulses and then back out the frequency in accordance with article ni.com on counters.

    I would like to read the 8 digital input channels and get the number of impulses for each channel. I searched high and low for help online but can't find examples that have been useful. Anyone have any ideas on how to go or direct me to a resource? Thank you very much in advance!

    Are you worried about getting the number as a physical operation timed?  It would be nice to acquire a digital waveform and then postprocess on it to detect how many events took place?  I've attached an example that shows how you can accomplish this. It reads a digital waveform and then uses a detection of crete VI to determine how many pulses occurred. Should be a few adjustments to your particular signal.  The VI I use seems to count events twice (probably count each edge), so counting it gives should be reduced by half in order to work.

  • DAQmx data acquisition with persistent error of nyquist

    Hi, I created a multi channel data acquisition vi (accelerometer 2 and 1 sound pressure) using models for producer.   The vi is attached. Thanks to labview 2011.  I get the error of nyquist (2 enclosed) when you make a bandpass filter between 50 to 5000Hz.  This happens despite having put my sampling rate to 22050Hz.  When I checked the output of wave I noticed that the signal has a dt 1 s.  The text output to check the result.  I could not understand how this is so since I had set the sample rate to 22 k Hz.  Any help will be much appreciated.  Thank you.

    I would do something like that.  You must calculate the dt of the set (with the recipricol) sampling frequency and use to initialize the shift registers.  This way you only need to change 1 constant if you need to change your sample rate.

  • measure the angular speed, angle and trigger using a gyroscopic sensor breakout board and LabView data acquisition

    How to measure the angular velocity, the angle and trigger using a gyroscopic sensor breakout board and LabView data acquisition?

    There is a single channel data acquisition code which measures the angular velocity, angle and flexibility using a gyroscopic sensor breakout board and acquisition of LabView data attached to this, I need a help to creat two-channel data acquisition code?

    Hello

    Attached is a vi that you can use in order to read the measured angular position of an encoder.

    If you need more examples on the tasks that you can develop with NOR-DAQmx and LabVIEW, you just need to open LabVIEW and click Help > find examples > Input and Output material > DAQmx > entry counter.

    Kind regards

  • How to change the accuracy of output waveform and spreadsheet graph data acquisition

    See attached vi, data acquisition connects to a waveform graph in a spreadsheet. I want to change the precision of the output of Wizard DAQ 6 decimal places with 2 decimals, but everywhere I looked on the DAQ assistant, I can't find a control accuracy. I missed something? What is the elegant way to do this?

    Thank you.

    Hello sunflower.

    This seems related to this question...

    Why do you want to change the output of the DAQ assistant?

    Should not change the precision of the creation of the worksheet? To do, simply give a few parameters for the functions "to the string conversion..."

    Outside the file save all the other screen precision parameters are just cosmetic measures!

  • 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

  • Imaging multi channels using the acquisition card OR

    We have a 1408 IMAQ being controlled by LabVIEW 8.0.

    We want to install multi-channel of imagery. All the channels work individually. However, when I was trying to show two channels simultaneously, single channel works and I got the following error message:

    Error 1074397150 has occurred to IMAQ enter Setup.vi

    Possible reasons:

    NOR-IMAQ: A timeout error occurred while you wait for the specified event. If you expect a picture, make sure all the video data is acquired during the period. If you wait for a signal, check that the assertion of signal occurs within the period.

    Sometimes I get a different error message asking me to assign different buffers to both channels. I understand that IMAQ 1408 has only analog digital (ADC) converter to digitize the incoming video. It may acquire up to four different cameras, but only of a camera at a time.

    I don't mind do frame rate in half. I think to show only one channel at a time and do the two channels alternantly. But I need to know how config routes to get there.

    I've attached an example that should work.  I could not test it because I don't have the equipment, so it might need some settings.  I would test it with one channel by setting the channel # 1.  Once it works, define channels # 2.  I set the display to use snapshot mode so the same image can be used for all screens.

    The only reason that I can think of that would make multi-channel acquisition fail when single channel works is the lack of synchronization between signals.  The start of frame signal must be the same for all channels.

    Bruce

  • Real-time display at the high frequency of data acquisition with continuous recording

    Hi all

    I encountered a problem and you need help.

    I collect tensions and corresponding currents via a card PCI-6221. While acquiriing data, I would like to see the values on a XY graph, so that I can also check current vs only voltage/current / time. In addition, data should be recorded on the acquisition.

    First, I create hannels to analog input with the Virutal DAQmx channel create, then I set the sampling frequency and the mode and begin the tasks. The DAQmx.Read is placed in a while loop. Because of the high noise to signal, I want to average for example every 200 points of the current and acquired for this draw versus the average acquisition time or average voltage. The recording of the data should also appear in the while loop.

    The first thing, I thought, was to run in continuous Mode data acquisition and utilization for example 10 k s/s sampling frequency. The DAQmx.Read is set to 1 D Wfm N Chan N Samp (there are 4 channels in total) and the number of samples per channel for example is 1000 to avoid the errors/subscribe for more of the buffer. Each of these packages of 1000 samples should be separatet (I use Index Array at the moment). After gaining separate waveforms out of table 1 d of waveforms, I extracted the value of Y to get items of waveform. The error that results must then be treated to get average values.

    But how to get these averages without delaying my code?

    My idea/concern is this: I've read 1000 samples after about 0.1 s. These then are divded into single waveforms, time information are subtracted, a sort of loop to sprawl is used (I don't know how this exactly), the data are transferred to a XY Chart and saved to a .dat file. After all that's happened (I hope I understood correctly the flow of data within a while loop), the code in the while loop again then 1000 samples read and are processed.

    But if the treatment was too long the DAQmx.Read runs too late and cycle to cycle, reading buffer behind the generation of data on the card PCI-6221.

    This concern is reasonable? And how can I get around this? Does anyone know a way to average and save the data?

    I mean, the first thing that I would consider increasing the number of samples per channel, but this also increases the duration of the data processing.

    The other question is on the calendar. If I understand correctly, the timestamp is generated once when the task starts (with the DAQmxStartTask) and the time difference betweeen the datapoints is then computed by 1 divded by the sampling frequency. However, if the treatment takes considerable time, how can I make sure, that this error does not accumulate?

    I'm sorry for the long plain text!

    You can find my attached example-vi(only to show roughly what I was thinking, I know there are two averaging-functions and the rate are not correctly set now).

    Best wishes and thank you in advance,

    MR. KSE

    PS: I should add: imagine the acquisition of data running on a really old and slow PC, for example a Pentium III.

    PPS: I do not know why, but I can't reach my vi...


  • How to find the time between two channels of entry in the data acquisition card or pci 6036

    Hello

    I read a lot-related posts on the simultaneous measurement of two input voltage of similar channels in map data acquisition. I know that the best material is "simultaneous measurments of the Series DAQ cards" but I only pci data acquisition card 6036 and I try to understand what is the time between the reading of the two channels . This period is always constant? (must it rely on a voltage (amplitude, frequency, waveform..). I send the sine wave (s) to the two channels and read the values of V, if they read the same value, the difference should always be zero but I get-0,002 to 0.002 Volt difference (I must find a way to convert it in time). A screenshot of my VI is attached. I wonder how I can accurately measure the time delay between the channel.

    I am open to any suggestion, my final goal to read exactly two channels at the same time ((ou connaître le délai exact donc je peux correspondre les données correspondantes étant donné le temps de retard))

    Hi spinup,

    better you should post your question in the forum of LabVIEW, LabWindows/CVI is used

    Good luck.

  • 2 channels of AI on a data acquisition with the range of different sensitivity

    This vi is based on the 'new project' state machine on the home screen at the start of LV.

    A time loop is parallel to the main loop of the state machine, shown in the picture.

    It works continuously until you press the Exit button.

    The problem seems to be in start this... > read >... stop start > read >... stop along the error line.

    The reason for this clumsy arrangement power is measured voltages are in two lines of different sensitivity.

    The shunt voltage is small and needs-. 2 to the range of V.2. The load voltage is greater and 09:50 V range is good.

    In the initializing state, two separate vi 'create a channel' have been used to specify the range of voltage to the physical channel. The corresponding tasks are sent via via local variables.

    DAQmx errors happen randomly, sometimes the first iteration, sometimes the 50th.

    I tried to disable one or the other start > read > stop for the shunt voltage or load.

    I tried replacing them with the DAQ assistant.

    I tried various DAQmx vi: "wait" and "accomplishment of the tasks by resource cancel selected".

    But error-50103 "specify resource is reserved" keeps popping up.

    Is it possible to create two tasks on the device even when they are not used at the same time?

    The only reason is to measure in two voltage ranges.

    Win 7 Pro 64-bit

    2014 LV database

    Data acquisition equipment: USB-6210

    Thank you.

    This has been discussed many times. Do NOT use separate tasks. You can use different ranges for different channels with a single task. Just wire the task from one channel to another channel to create task.

    You also use local variables when they are certainly not needed.

Maybe you are looking for

  • Google vs Apple pics photos

    I recently heard about the Photos of Google app, and I was wondering if it is the same as the pictures Apple app?

  • Download iLife 06?

    Hello I have a PowerBook G4, running 10.4.11.  I tried to install iLife 08 on that, but iMovie requires an Intel processor.  This link is dead: http://www.apple.com/support/downloads/imovieHD6.html. Where can I find a free download of it, or cached a

  • I'm getting a beep at odd intervals, nothing appears on the screen.

    It is a simple beep, sometimes repeated at an interval of a few times, then stops. I had an accident after one episode do beep, don't know if it is connected. End 2009 and 27 inches, Yosemite.

  • Public static sound speakers G500s

    Yesterday, I bought a G500s, and now I want to connect it with my (speaker with battery) Ion tailgaterbut when I connect it with the tailgater I have a static noise, and if I want to load the tailgater (and leave only it connected to the laptop) a hi

  • Computer recognizes the printer, but does not install

    Original title: printer / driver problem My HP Officejet 5610 all in one printer just stopped working after 3 years.  I tried to reinstall the software disk... the error log will accomplish even his race.  I think I have a driver problem, but don't k