Multiple channels acquisition and Number of samples per channel

Hi,
I'm a new labview user and I need some help in trasposing an old traditional NI-DAQ acquisition software in a NI-DAQ-mx one.
I followed the tutorial (#4342) but I found a problem with Analogue 2D DBL Multiple Channels Multiple Samples DAQmx Read Vi.
I'm trying to acquire 8 voltage signals from a NI-USB-6341 device. When the Number Of Samples Per Channel I set is below the number of channels (8), the software acquires only a number of channels equal to the number of samples per channel I set.
Is that a normal behaviour?
Thank you
Daniele

This is my code. The problem is the same with or without the code for the scan backlog indexing.
Tomorrow I will try with the code from the example.
Thank you
Daniele
Attachments:
acq code.jpg ‏119 KB

Similar Messages

  • Sample per channel and sample to read

    Hello everybody
    I am new in LABVIEW and I have some difficulties with something.
    I don t know exactly what is the difference between the sample per channel et the sample to read. I believe knowing that the sample per channel is the size of the buffer which is more big than the sample rate but I don t know what is the sample to read.
    I ve tested with different sample per channel and sample to read. Sometimes I have an error and sometimes know and I would like to know why. If you have any example for I understand better, it will be great.
    I really need to understand this part for my project
    Thank for your help
    Romaric GIBERT
    Solved!
    Go to Solution.

    Hi Roro,
    As you mentioned, when acquiring continuous samples you can specify the sample buffer size by placing a value at the input "samples per channel" on the timing vi. The "number of samples per channel" input on the read vi which automatically names a control/constant with "samples to read" specifies the number of samples you wish to pull out of the buffer in one go when reading multiple (N) samples. This link may provide a bit more clarification. I have also attached a good example from the NI example finder which you may find useful to explore. I'm assuming you are using the DAQmx driver set so please let me know if this is not the case, but the same principles should apply either way.  
    This therefore means when sampling at a given rate, you need to ensure you are pulling data out in big enough 'chunks' to prevent the buffer from overflowing (which may well be causing the error you are seeing). Conversely if your sampling rate is slow and your read vi is having to wait for the number of samples to read you specified to be available, it may throw a timeout error. You can avoid this by either increasing your sampling rate, reducing your samples to read or increasing the timeout specified at the read vi input (-1 means it will wait indefinitely).
    Let me know if this helps and how you get on.
    All the best.
    Paul
    http://www.paulharris.engineering
    Attachments:
    Cont Acq&Graph Voltage-Int Clk.vi ‏27 KB

  • How to use ni-6008 and build a four channel data acquisition at a rate of 250 samples per channel and display all the data in a waveform chart

    how to use ni-6008 and build a four channel data acquisition at a rate of 250 samples per channel and display all the data in a waveform chart 

    Hi kdm,
    please stick in one thread for the same topic!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Buffer size and samples per channel

    I have a question regarding the allocation of the output buffer. I have
    a digital I/O card PCI-6534 and I use the driver NI-DAQmx 7.4.0f0. I
    would like to generate a digital output using different clock rates.
    For example, I need to write 500 samples at 1000 samples per second and
    other 500 samples at a rate of 10000 samples per second. the simplest
    solution is to prepare two different waveforms, write the first one on
    the buffer and generate the output. Then I can load the second waveform
    on the buffer and generate the second output. In order to minimize the
    delay between the two output sequences, I would like instead to write
    the buffer once. I tried to set the buffer size to 1000, and the number
    of samples per second to 500, but it doesn't work. There is a way to
    set independently the buffer dimension and the number of samples which
    have to be generated?

    I can post the whole thing but I'll talk a little about it. It's a producer consumer loop with a continuous analog input sample from external clock program in the producer loop. Right now the consumer loop has a simple write to spreadsheet VI in it but eventually I want to average each revolution (well, two since it's a four stroke but that's neither here nor there) of pressure traces and spit out a single curve.
    The wiring is simple. I have a voltage supply feeding the encoder and the quadrature A input on PFI 8 of the 6212 DAQ. I also have the Z index plugged in but nothing else to it. The analog input is a BNC right to AI 0. I can make a diagram if you want one. I've scoped the rotary encoder output and it looks great, very square with small relative rise times.
    Attachments:
    Yanmar Program V2.vi ‏46 KB

  • Sample clock vs sample per channel per second

    Referring to this link http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/dbe7ac32661bcf9b86256ac000682154?OpenDocument
    What's the difference between sample clock and sample per channel per second? Looks the same to me.

    The sample clock is the clock that sets the timebase for channel operations on the board.  The samples per channel per second is the actual rate at which data can be transferred on a particular channel.
    Alex A.
    Applications Engineer

  • Samples Per Channel Matter when Taking Continous Samples?

    So noob question of the day. I have been playing around with the lightbulb feature. Anyways, I notice my array size is greater than my samples per channel input. Does the DAQmx sample clock even look at the samples per channel input when set to continous?

    Did you check the help file for the DAQmx sample clock function?
    "samples per channel specifies the number of samples to acquire or generate for each channel in the task if sample mode is Finite Samples. If sample mode is Continuous Samples, NI-DAQmx uses this value to determine the buffer size."

  • Sampling frequency Fs and number of sample #s in a waveform

    Hi there,
    It is probably a stupid question but I am still going to ask it:
    I do not completely understand why in the "Basic Function Generator.vi"  there is a distinction between the number of samples #s and the sampling frequency Fs..?
    What is the purpose to have more or less samples in the generated waveform then specified by the sampling frequency of the signal?
    I hope this question make sense (or am I missing something obvious)?
    thanks,
    Best,
    Renaud 

    rihns wrote:
    I am sending those values to an AO (to a mechanical system that reproduce the sended waveform) and record the signal with an AI. My problem is that when I reduce the number of sample as explained in the previous message, I enhance the number of cycles i.e the time of the signal seen by the AO but it does not seem to apply to the AI... see attached image (Fs = 305000 #s=30500 AO is in white AI is in red)
    Why does the #s only affect the time of AO and not the one of AI? (the number of cycle is the same though, only the time base is different)
    I think we need to see some code in order to get the full picture of what you are doing.  The number of samples of the AO should have nothing to do with the AI.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Fehler nach "Samples per Channel"

    Hallo,
    Ich verwende das cRIO System NI 9074 mit AD-Wandlermodul NI9239. Hier sollen Daten kontinuierlich gewandelt und anschließend gespeichert werden. Allerdings gehen hierbei immer nach einer Sampleanzahl von „Samples pro Channel“ Daten verloren. Dies wird auch im in LabVIEW angezeigten Graphen sichtbar. Bei einem Sinussignal am Eingang ist dann ein Sprung erkennbar.
    Der Speicher des FIFOs ist großgenug, zumindest wird mit kein Überlauf angezeigt. Kann mir irgendjemand weiterhelfen? 
    jukr
    P.S. Ich verwende LabVIEW 2010
    Attachments:
    FPGA.vi ‏77 KB
    PC.vi ‏365 KB

    Hi Jukr,
    it is useful to write forum posts in english; you will get many more replies :-)
    I don't expect the error to be caused by the measurement. Maybe there are some parts in the network streaming that are not stable enough?
    Just have a look at the following example and compare it to your network connections. You might find it useful!
    Reference Example for Streaming Data from FPGA to cRIO to Windows
    If the example won't help you finding the error, please attach your project.
    Have a nice day,
    Stefan Egeler
    NI Germany

  • Some app use only channel 1 and 2 of a 6 channel sound card

    Hi,
    I use a Native Instruments Audio 6 soundcard, that has 6 channels. In Mac's Audio Midi Setup speaker configuration I configured that channel 5 and 6 have to be used for stereo. This works for quite a lot of apps, like Safari and iTunes, but other apps, like Chrome and XBMC, route their audio through channel 1 & 2. How can this be solved?
    This issue in the link below I had earlier, which I have fixed. It could be related, but it is not the same.
    http://forums.presonus.com/posts/list/30/27007.page
    Thanks,
    Robert

    Start with uninstalling and re-installing the driver.

  • I'm having trouble with a multi channel acquisition and download with PXI-5922

    I am having trouble with getting data out from both channels of a PXI-5922.  My software seems to be working, but when I do the fetch there is no data for the second channel.  I am using the same format for all of the channelList inputs (0,1).  I've checked the instrument handles and anything else I can think of, but this is my first time trying to collect data on 2 channels of a digitizer.  Any help would be appreciated.

    Hi schliepe,
    Try checking your code against an existing example. The
    Developer Zone Example: Independent
    Channel Configuration with NI-SCOPE is a good VI to reference. Also note
    that there are several examples that come with the NI-SCOPE driver. They can be
    found in Windows by going to Start »
    Programs » National Instruments » NI SCOPE » Examples. Additionally, if you find that the examples are not working either, verify that both channels are functioning by running the
    NI-SCOPE Soft Front Panel.
    Please post back if you have any questions. Have a great
    day!
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments

  • Acquisition and saving(for Annette Perez)

    Hi Annette,
    I?m luiart.
    First of all thanks for help.I?ve read your answer and I?d like to know something more.
    I?m not familiar with references; as you told me thanks to a reference value I could have a marker to point a common istant in wich I have acquired those values.Is what I said right?
    How can I do it?
    Are there examples about it?
    Thanks luiart.

    Hello Luiart,
    Well, I did not find any examples that do exactly what you are trying to do, but I did find two Application Notes that give a pretty clear explanation on how to do this.
    Here are the links:
    Control References: Overview
    Using LabView to create Multithreaded DAQ Applications
    Keep up with the great work!

  • Error 200279 and number / frequency of logged data

    Hello,
    I am new to LabVIEW and I am writing a VI that sends 2 voltage (AO voltage) to a motor, and read the voltage input (AI voltage) from a strain gauge and one of the corresponding AO signal that I sent out to the motor. Also, the VI reads encoder value. I am using a PCI 6230.
    I am unsure of the difference between the number of samples per channel in DAQmx Read (AI Volt), DAQmx Read (Encoder), and DAQmx Write (AO volt).
    If I set all three values to 1 (like in the attached VI), I will get a log data that has logical data for DAQmx Write (AO volt) and DAQmx Read (Encoder) (values changing and logged every 1ms). However, the log data from DAQmx Read (AO volt) has some error (it's not logging data with increment of 1ms), then the Error 200279 shows up.
    If I set DAQmx Read (AO volt) to 1000, and the other two to 1, I will get DAQmx Read (AO volt) data with increment of 1ms, and the others increment of 1s. While if I set all to 1000, my encoder and DAQmx write data will lag (shows up late in the log) by 1s (transient data is not shown, only stedy state after 1s).
    I have been trying to troubleshoot and read about the error description but found no helpful clues.
    Appreciate your help.
    Thanks a lot!
    Attachments:
    AnalogOutputandInputRev1b.vi ‏135 KB

    Hi Thomas,
    Thanks for your inputs. I have tried using the "Shared Sample Clock" example but I have an error which says:
    Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Sample Clock).vi:6->AnalogOutputandInputRev1c.vi
    Possible reason(s):
    Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
    Property: SampTimingType
    Requested Value: Sample Clock
    You Can Select: On Demand
    Task Name: _unnamedTask<2DE>
    And then,
    Error -50103 occurred at DAQmx Start Task.vi:3
    Possible reason(s):
    NI Platform Services: The specified resource is reserved. The operation could not be completed as specified.
    Task Name: _unnamedTask<2DF>
    I have attached my modified VI here as well.
    I would like all my tasks to occur at the same time, and most importantly, logged at the time it happens without some delay.
    Would you please advise on what's going wrong with my VI this time?
    Thank you very much.
    Attachments:
    AnalogOutputandInputRev1c.vi ‏131 KB

  • Configurin​g IQ / Number of Samples for USRP2920

    Hello,
    I've been trying to record HF-Signal using the USRP 2920. I got unexpected behavior for some configurations of IQ rate and Number of Samples.
    When setting the IQ to 1M as example and Numbers of Samples to 60984, the recorded file remaind empty even after recording over a long period of time. It looks like for a given IQ there is an appropriate Number of sample applicable.
    Do someone know the trade off to be made between bo parameters?
    thanks for any suggestions
    Solved!
    Go to Solution.

    Hi Bolivar,
    There are a few considerations and facts in my knowledge:
    The number of samples that you specify as input to the fetch VI is the number of samples that will be fetched by your host from the NI-USRP device per fetch call.
    NI-USRP driver (at the host level) will try to acquire these configured number of samples within the timeout specified by you and if it is not able to fetch these from the device you would get a timeout error.
    The maximum communication speed/data rate between the device and the host is governed by the communication medium used between the two.(in this case the ethernet connection 1Gbit per sec).
    Once you call the initiate VI the NI-USRP device starts capturing data.
    So when you configure the timeout, number of samples and the IQ rate of operation following pointers might help.
    Is the amount of data that you want to fetch (number of samples * data width) fetchable within the timeout configured ?
    Are you fetching out samples quickly enough so that the device buffers do not  overflow due to a high IQ rate ?
    That being said. let's say we fix IQ rate at 1M
    Very small sample sizes will result in a lower actual data rate due to the overhead associated with every fetch call might even cause device buffer overflow.
    Very large sample sizes might work if above considerations are made.
    A good sample size for your application might be found by making a small benchmark and calculating the actual time taken by the fetch VI call to execute to get a fixed amount of data at various sample sizes and picking the best sample size for your application. I think multiples of 1024 might work better for sample size.
    I am not sure if this solves your problem.
    Thanks.

  • Error:the number of sample must be 0 please help.

    dear genius.
    I searched the same error in this board but I can not understand how can i fix my problem.
    I am just a beginner in LV so I need your help. I made AM modulation and demodulation vi .
    when  I first used "simulated signal" as message signal, noting happened.
    but, I changed simulated signal as "acquire sound", and add a play waveform, after that, problem occured.
    actually, I can not understand about sample number or sampler rate .
    how can i fix my problem?
    and do you know some website to exercise digital communication using usrp and labview for trying ?
    please let me know your idea.
    thanks a lot.
    Solved!
    Go to Solution.
    Attachments:
    error.vi ‏164 KB

    kimjihwan123 wrote:
    thanks kingt of ni 
    thanks again. but can you tell me the differecne between sample rate and sample per second?  (I thoungt it was same)
    First of all Knight of NI is my title.  Crossrulz is my alias.
    Secondly, Sample Rate is the same as Samples Per Second.  But you want to make sure your sample rate and number of samples gathered are the same from both sources.  I would also turn off the Actual Time (or whatever it is called) in the Simulate Signal so  that it just gives you the sine wave instead of using time to generate it.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Number of sample required

    Hi to all the expertise,
    In my labview program 6i, I design a scan rate and number of scans to acquire. Now I want to read 100 samples, which mean on my graph, I want to see 100 samples of waveform. How should I configure it, so that I"m able to achieve this.
    Kindly advise.
    Thanks

    Simple as it
    If it is a finite acq, keep scan rate as 100 samples /sec and number of samples to read as 100 samples
    does this answer your query ?
    if not, get back with more details
    regards
    Dev

Maybe you are looking for