DAQ write + read analog channels


I need urgent help to solve a simple problem:

My job is to write an analogue channel to a data acquisition device, then read two analogue channels of the device.

It must be made at the rate of 5 KHz.

For the smaller rate I can do using normal loops (or timed loops). But I don't know how to make using the DAQ features.

Please give me an example.

I found something but I don't know if it can be used in this way (see attachment)

Thank you!


Tags: NI Software

Similar Questions

  • How to write table values to analog channel?

    Hi all

    If I have a table of values, is it possible to write these values as an analog voltage and then stop writing when he arrives at the end of the table? If so, how does do this?

    I have attached my code that generates a table of frequency swept sinusoidal voltages and I write that out to my analog channel, when I consult my output however, I get the same display of sinusoidal repetitive time and time again. I expect for example:

    writing of wave of 1 Hz, 2 Hz, 3 Hz etc...

    but I'm getting the 1 Hz wave over and over again, I selected samples in the sample clock and pretty much done a lot of trial and error and still no luck . Any help would be appreciated!


    Hi Daniel!

    Take a look at this example (you can find examples of LabVIEW):

    Gen CONT tension Wfm - Int Clk - no Regeneration.vi

    Here is an another VI I did (see table). It is slightly different from the example of the LV and it should help you.

    It could be that useful...


  • I have a DAQ Assistant configured to read several channels at the same time. When I have a graphical indicator of wire to the output, I see all my signals mixed together. How I divided them into separate signals?

    I have a DAQ Assistant configured to read 2 channels at the same time. When I have a graphical indicator of wire to the output, I see 2 signals mixed together. How I divided them into separate signals?

    When I wire any type of indicator, it is show that a release of a single channel.

    I want 2 indicators showing 2 different signals as expected from 2 channels configured. How to do this?

    I tried to use split signal but it end by showing that 1 out of 1 signal two indicators.

    Thanks in advance.

    Yes you are right. I tried, but I don't have the result.

    I just find the path. When we launch the split signal, we should expand it (split signal icon) by top, not the bottom. It took me a while to understand this.

    Thank you

  • How .vi DAQmx Read (analog 2D NChan DBL NSamp) to acquire continuous data?

    I try to get the .vi DAQmx Read (analog 2D NChan DBL NSamp) to acquire data continuously.  The 'help' indicates I need to wire the number of samples per channel-1, but it doesn't seem to work for my application.  If I have the wiring to any number greater than 0, the data collection works, but is not continuous.  I enclose the code (Sept15_MainPanel_WorkingBaselines_ApplyBaselines and Calibration.vi) and a Subvi (Collect_Baselines.vi) if someone wants to take a look.

    Here's what I'm trying to do:

    I use a unit NI USB-6009 to collect analog voltages of load cells 2 (channel 0 and channel 1) and 2 displacement transducers (channel 2 and 3).  The main panel of the VI contains a listbox with 4 options - 'Check EMG channel', "Collect base lines," "Collect Data" and "end of program".  'Collect base lines' 'End of program' work and I'm working on writing code to "Collect data".

    For the option "Basic collection", 2500 samples are read from 4 channels described above and 2500 samples are averaged.  This works.

    The option "Data collection" - I would like to that data from 4 channels to acquire permanently.  Finally, for the option of data collection, data acquisition stops when channel 0 detects the force of 200 N - so I will not always have a finite number of samples read.  The time it takes to reach the value of this force will be different for each test.

    -How can I get continuous samples for my 4 channel?  Is .vi DAQmx Read (analog 2D NChan DBL NSamp) function badly and if yes, what should I use?

    Thanks in advance for any ideas or advice.


    First, in case 1, you need not the structure of flat sequence.  The son of the error and data properly will dictate the flow of execution.  Then, in State 2, you must initialize the shift register, unless you want to keep the data is accumulated each time that you run the vi.  The reason why you don't see all the data here is because you have - 1 wired for the number of samples per input channel.  You must connect a number here, even if you are taking continuous samples.  The service needs to know how much sample to gather at one time.  If you put-1 here, the number of samples per channel must be set up in the synchronization function DAQmx (sample clock).  If you specify a number here, then you put-1 in playback function.  The DAQ hardware will read continuously, you must retrieve the data from time to time, so you must specify the number of samples.  By reading inside a loop, it will continue to read until the stop function is encountered.  I guess that the Clear function acts as a stop.  But you must always indicate playback vi how many samples to read and return on each iteration of the loop.

    The documentation is a little misleading.  He warns that a - 1 will cause a continuous reading.  But the pads are so big, he can not read continuously forever without losing data.  If you specify a finite number, playback in a loop, and he will read this number and return the data (empty the internal buffer) at each iteration of the loop.  Continuous means that you just call the start function once.  He will read at each iteration of the loop until the stop function (or clear) is called.

    Here is the difference between the setting of the Timing DAQmx function for continuous or finished reading: finite samples requires a tenure, he reads the finite number of samples, and it's done.  It requires another start to read more data.  Continues to read requires only a start.  It still reads a finite number of samples, but when this is done, you can retrieve the data by calling the read function until he could continue.  After the reading, you don't have to call for new start.  Look at it this way.  Start is what starts the collection of data, not the read function.  Just read empty buffers in your data feed.  The data acquisition continues in continuous mode, but you must call read again to get the data on the pads.  If you specify basically buffer size when you set the number of samples per channel.

  • PXI-5122 and PXI-6259 read 2 channels simultaneously

    There is a single PXI-5122 digitizer card and a PXI-6259 DAQ card in our PXI system, we use Labview and TestStand (model Batch) to test the multiplication Board simultaneously, sometimes up to 8 boards are tested. We have some problems, such as the results of the tests is not reliable and sometimes blocking of Labview. Everything works fine when test single board. Thus, we feel that multiply causing this problem of acquisition of string data. It's great, if someone has the same problem and we can share the knowledge. My question is as follows:

    1. If two channels have been configured, read the two channel simultaneous cause blocking of the system or data damaged?

    "lu niScope WDT.vi" is reentrant, we can use two Subvi to call the "niScope Read WDT.vi' access the two channels simultaneously.

    2. If we set up a channel in another channel is reading the data, this situation will cause the search system or corrupt data.



    Hi Samuel,.

    You shouldn't have any difficulty to read several channels on your 5122 or between your 5122 and your 6259. You receive an error message when your test is blocked? What happens when your test is not reliable? Are you incorrect data and if so what is the data vs expected data acquired? You should be able to set both your channels in a single task, which would be using a read niScope WDT.vi to be used by the device. You are working from example or have you developed your own code? What version of the driver NOR Scope and NI-DAQmx driver do you use? You can find the driver version number in the measurement and Automation Explorer under the software section.

    What kind of test are you running? Your PXI chassis is controlled by a computer or by an on-board controller? Evolution of the rate of acquisition has an effect on your program?

  • I can read two-channel USB-6008 using THE Signal Express?

    Hello world!!

    Is possible to read the two analog inputs at the same time?

    Example: Using Signal Express, I need to read the (channel 0) analog input and analog input (channel 1) at the same time.

    I try this but, the signal on purpose gives me an error message saying that I can't read several channels at the same time using the USB-6008.

    Is this true?

    Thank you

    Ivo João


    Grato definition of pela.

    SUA ajuda muito util faith.


    Ivo João

  • NEITHER 9213 working with 9174 DAQ for reading of temperature


    I use NI 9213 and DAQ-9174 to monitor the temperature. Without thermocouple wire connected, using NOR-DAQmx tasks, reading is 2.296334 K. When I use DAQmx Read (Analog DBL 1Chan 1Samp) .vi, reading is 1377.69.

    1. What is the good?

    2. why reading is not taken into account the room temperature which is around 26?

    3. do I need to do the calibration for NI9213 before using it?

    Thank you


    Hi Ott,

    If you do not have a thermocouple attached to the 9213 module, the module just go read electric noises. This electrical noise has no physical relationship to the room temperature. When you do actually connect the thermocouple, be sure to configure the DAQmx task as a task of thermocouple to HAVE. Also be sure to select the correct thermocouple specifications (i.e. type of thermocouple).

    Here is a good article giving measures by thermocouple.

    Here is the acquisition of data getting started guide.

    Hope this helps,

    Chris G

  • Storage of samples of several analog channels (life-long)

    I use a USB6356 to read 5 analog channels (more digital input port A)) simultaneously until you press a stop button. The idea is to represent all the signals captured on a temporal scale after the acquisition.

    I am convert and storage of the 2D array that is captured in each iteration of the loop in another 2D array in order to have an output of 5 table lines (one for each input signal).

    However, Labview can not handle so much treatment in so short a time table (I think that the main bottleneck is the 2D Transpose VI table) and accidents very soon (I have to kill the entire process and restart Labview). Is there a better way to do this?

    See you soon

    Your problem is that you have horrible memory management here.  Whenever you add in the table, more memory is allocated, then the table is copied.  You are basically out of memory.

    1. use samples of N, N channels, 1 table D of waveforms for your Read DAQmx

    2. change your chart to a chart and move it to be inside the loop.  Maintain chart, a story, so you can still see the X last samples on it (1024 by default).

    3. save your data in a file.  I recommend using the DAQmx configure connection before starting the task.  This allows the stream directly to a TDMS file for further processing.

  • DAQ Assistant: Reading of the samples that are no longer available

    I'm trying to use the DAQ Assistant to read some data, but I get "error 200279 occurred at DAQmc Read (analog 1-d Wfm NChan NSamp) .vi:2.» The error message suggests to increase the size of the buffer, most frequently read data or by specifying a fixed number of samples to read instead of reading all the available samples. My sync settings are as follows: continuous samples for the Mode of Acquisition, 1 K samples to read, 1 K Sample Rate (Hz). I'm curious to know what would be the best settings for this. If I set the mode to 1 sample (on request), would simply take a sample each time the loop works? Help, please.

    Thank you



    Please post on the Forums of NOR.  Adnan a reason on why you get this error. If you use the sample on request, you will get only a value returned for each iteration of the loop. If you only need to try from time to time and there is no need to be very consistent, then this might work for your applications, but it depends on what type of application you have. How fast do you need taste?

  • SONY BRAVIA 50 "no signal message for find analog channels

    I bougth a BRAVIA 50 "and everything has worked perfectly, but suddenly the TV sent no signal message can not find the signal of channel or something like that. I bougth TV on December 2012 and this 4 last January that happened. What?, because I could see 7 channels before that. I tried to reset the original settings and I read, but nothing seems to work for some tips. The other features work well. It's just the analog channels. I hope someone knows the solution. Thank you

    I bougth a BRAVIA 50 "and everything has worked perfectly, but suddenly the TV sent no signal message can not find the signal of channel or something like that. I bougth TV on December 2012 and this February 4 this year that happened. What?, because I could see 7 channels before that. I tried to reset the original settings and I read, but nothing seems to work for some tips. The other features work well. It's just the analog channels. I hope someone knows the solution. Thank you

  • Read VeriStand channel from inside the custom device that are not part of the custom device?

    Is it possible to read VeriStand channels from within a custom device VeriStand (RT Driver) that are not part of this custom device?

    For example, suppose I want to be able to configure a channel in my custom device to always be twice the value of a string of material that my user selects (I know, better/more simple ways to do this, but this is just a simple example ).  Can I do this from the device custom without programmatically create a mapping of the system? (I've done this before and it is messy and VERY prone to error of the user).

    Thank you!

    good point

    the channel ID (U64s) are not the same in the engine config of vs. Instead, you must set 'references to dependent item' in the config and then get these references in the engine.

    See the source jarrod linked, which makes it

  • Exception on the creation of a second task with Analog channels?

    I'm getting an exception '{error =-50103 = "is reserved for the resource specified. The operation could not be performed as specified.\n\nTask name: _unnamedTask<5>\n\nStatus Code:-50103 "} ' when I call Control(..Commit) on a task with Analog channels, I just created."

    At the time of creation, I have another task set and running in the "we demand" move that uses another set of analogue channels in the same card to acquisition of data (NI6229).

    Is there a limitation on the number of tasks that can use analog in the channels of a single card?

    Thank you

    Go Paul

    Because the analog inputs share a unique clock, you can have only one task running. You can have as many channels as you want in a single analog input task, however.

  • Read specific channels of an existing PDM file

    Dear users of Lab View,

    I would like to ask for help using the PDM read Vi to read specific channels in existing TDMS files.  I know to use the "contents of list TDMS" vi to that group names and channel list, but I don't know how then use this information to read identified specific channels.

    the problem, I'm trying to work around is to read a file of PDM with data from two channels, each with a different amount of data taken at different speeds. I would like to read a block of data from a single channel.  However, this data block contains more elements than the other channel. So, end of file error almost everytime I meet because the read PDM Vi tries to read this block of data for each channel.

    How can I specify the channel for the PDM read VI?  I tried to create a constant and fix them on the node "channel name" on the PDM read VI, but it gave an error.  I guess I don't know how to format.

    is attached the VI I'm trying to implement

    A sample file is too large to attach.

    Thanks for the tips

    I think that the problem may be that you close the TDMS of origin reference in each iteration of the loop, try to move outside as shown in the snippet.

    Note that I don't really went through the logic for the rest of your code.

  • Get error-200088 DAQmx reading (Analog DBL 1Chan 1Samp) .vi &lt; add &gt;...


    I am using examples of labview and Labview 2011, I use the a sample.vi acq for the value of the voltage reading.

    but the thing is that I get the error of block then read this DAQmx Read (Analog DBL 1Chan 1Samp) .vi - 200088 ... And it's not indicate the correct voltage in labview.

    I also connected Multi meter with the analog card reader and multi meter gives the correct value, but it is not possible to achieve with labview.

    Please guide me how can I solve this problem which could be the reason for this.

    Thank you very much.

  • How to view analog channels during an ongoing acquisition, what type of used wave form, table, or chart?

    I use Labview 8.5. and the NI USB-6210 device.

    I want to display the analog channels over the continuous acquisition.

    I can use the table of waveform or waveform graph. Waveform allows you to eat a history buffer. This function is very interresting and useful for my system, but I can't change this value to programming (if I do not mistake!). So, I was wondering if I can also use the waveform graph, but I do not have how to make a circular buffer to replace function "history buffer. I have to use the waveform as a data type.

    What is the best solution for my problem? I would like to know if my solution is good (graphic use of waveform) and if anyone has a solution to make an effective circular buffer with the waveform data type?

    Thanks in advance, best regards, Daniel

    There is an example that comes with LabVIEW called "XY table". It shows you how to create a history for a XY Chart buffer. The size of the history can be changed on the fly. You can adapt the VI "graphic buffer XY ' to work with a data type of waveform." This type of data consists of 3 elements: start on time, delta t and table of values. The only thing that you should be buffering is the array of values.

Maybe you are looking for