Undertaking calculations on multiple channels using a chnlistbox

I am new to scripting in diadem, however have written a calculation that takes channel from a ChnComboBox in a user dialog box, this works fine however I am now wanting to repeat the calculation on a number of channels highlighted in a chnlistbox. The chnlistbox outputs to a variable "MyChn2" set as a variant, variablerowindex "1", variablecolindex "1", I have also changed the selectionmode to "1-multiple" I am struggling to understand how the "array" of channel objects is passed to my script. I have written a simple script to loop through the channels which when working I will replace the msgbox with my calculation.
For some reason after the first loop I often get an error that my indexing is wrong can any one help.
The x=1 to "3" will be the array size in the future when this is working. I am making sure I select 3 channels at the moment because of this.
My script:
call globalDim ("MyChn2()")
call globalreDim ("MyChn2(65)") 'max channels i expect to convert
If SUUDlgshow("SELECTION","SELECTION2.SUD") = "IDOk" Then
dim x
for x=1 to 3
msgbox(chnpropget(mychn2(x),"name"))
next
end if

Hi Stevie,
The GlobalRedim() command takes one string parameter which you can parse with the VBScript concatenation operator "&"
Call GlobalRedim(" Preserve MyChn2(" & chCount & ")")
Brad Turpin
DIAdem Product Support Engineer
National Instruments

Similar Messages

  • Continuous DAQ with multiple Channels using 6023E

    I am trying to countinuously aquire data from 8 channels using a 6023E (without loosing data). For some reason it allways gives me error -10092. Meaning the card requires a certain time between each scan.
    If i set the scan rate to something that works, I loose
    data. Does anyone know how to do this right without loosing data whilst using double buffering or is this
    not possible?
    Thanks

    Ok I got somehow further.
    My problem was understanding the relationship between sampling rate and scanning rate.
    with E series the sampling rate is not the max sampling rate for a given channel but the overall sampling rate for A/D conversion. Further more
    in order to avoid error -10092 you have to set the
    scan rate to be slower than the sample rate:
    One way is scanrate=samplerate/(NumberofChannelsUsed+1)
    why this is necessary, i dont know?
    so if you get 2 channels rate divisor 1,2 yields
    SampleRate Channel1= scanrate/1
    SampleRate Channel1= scanrate/2
    ie. samplerate=100000 (10kHz)
    3 channelsUsed -> ScanRate=25000 (25kHz)
    divisors for each channel 1,2,1
    means
    channel1 samplerate=25 kHz
    channel2 samplerate=12,5 kHz
    channel3 samplerate=25 kHz
    w
    ith this i get a what looks like a seamless aquisition from Halfbuffer to Halfbuffer.
    But I am not sure if all i mentioned is correct?

  • I want to acquire data for multiple channels using PCI 6120 that works on traditional DAQ. I cannot access more than one channel, can someone help me or if someone has data acquisition vi for PCI 6120, please send me over . Thanks

    I have PCI 6120 card and I want to acquire data for more than one channels. I'm using traditional DAQ to get it. But it does not work for more than one channels. If someone has a data acquisition vi for PCI 6120. Or some suggestion how to aquire data please let me know.
    Thanks

    Hello DSPGUY1,
    You can definetly acquire from several channels. For your convenience, I have appended below the content from help that tells you how to configure it:
    "channels specifies the set of analog input channels. The order of the channels in the scan list defines the order in which the channels are scanned during an acquisition. channels is an array of strings. You can use one channel entry per element or specify the entire scan list in a single element, or use any combination of these two methods. If x, y, and z refer to channels, you can specify a list of channels in a single element by separating the individual channels by commas, for example, x,y,z. If x refers to the first channel in a consecutive channel range and y refers to the last channel, yo
    u can specify the range by separating the first and last channels by a colon, for example, x:y."
    Hope this help.
    Serges Lemo
    Applications Engineer
    National Instruments

  • How do I read voltage on multiple channels using the 6255\SCB-6​8

    Hi All
    I was able to get the following code to compile, run and view the voltage data as expected. when reading the voltage (RSE) on Dev0/ai65
    ...National Instruments\NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Cont Acq-Int Clk\ContAcq-IntClk.c
    * I think that I am using RSE but I have no clue since I do not see an argument to specify
    I am trying to read two different data points:
    1. View the voltage (RSE) on Dev0/ai65
    2. View the voltage difference (Differential) between Dev0/ai17 and Dev0/ai25
    Can someone point me to an example (or web link) where two different data points are being read.
    *edit - I am trying to complete this task using C++
    Thanks
    Chad
    Solved!
    Go to Solution.

    This was my last attempt that failed
    #include <stdio.h>
    #include <NIDAQmx.h>
    #include <iostream>
    using namespace std;
    #define DAQmxErrChk(functionCall) if( DAQmxFailed(error=(functionCall)) ) goto Error; else
    int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle1, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData);
    int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle2, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData);
    int32 CVICALLBACK DoneCallback(TaskHandle taskHandle1, int32 status, void *callbackData);
    int32 CVICALLBACK DoneCallback(TaskHandle taskHandle2, int32 status, void *callbackData);
    int main(void)
     cout << "\t***********************************************​****\n";
     cout << "\t         Starting the NI DAQmx data logger\n";
     cout << "\t***********************************************​****\n\n";
     int32       error = 0;
     TaskHandle  taskHandle1 = 0;
     TaskHandle  taskHandle2 = 0;
     char        errBuff[2048] = { '\0' };
     // DAQmx Configure Code
     DAQmxErrChk(DAQmxCreateTask("task1", &taskHandle1));
     DAQmxErrChk(DAQmxCreateTask("task2", &taskHandle2));
     DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandle1, "Dev1/ai65", "", DAQmx_Val_Cfg_Default, -10.0, 10.0, DAQmx_Val_Volts, NULL));
     DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandle2, "Dev1/ai17", "", DAQmx_Val_Cfg_Default, -10.0, 10.0, DAQmx_Val_Volts, NULL));
     DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandle1, "", 10000.0, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 1000));
     DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandle2, "", 10000.0, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 1000));
     DAQmxErrChk(DAQmxRegisterEveryNSamplesEvent(taskH​andle1, DAQmx_Val_Acquired_Into_Buffer, 1000, 0, EveryNCallback, NULL));
     DAQmxErrChk(DAQmxRegisterEveryNSamplesEvent(taskH​andle2, DAQmx_Val_Acquired_Into_Buffer, 1000, 0, EveryNCallback, NULL));
     DAQmxErrChk(DAQmxRegisterDoneEvent(taskHandle1, 0, DoneCallback, NULL));
     DAQmxErrChk(DAQmxRegisterDoneEvent(taskHandle2, 0, DoneCallback, NULL));
     // DAQmx Start Code
     DAQmxErrChk(DAQmxStartTask(taskHandle1));
     DAQmxErrChk(DAQmxStartTask(taskHandle2));
     printf("Acquiring samples continuously. Press Enter to interrupt\n");
     getchar();
    Error:
     if (DAQmxFailed(error))
      DAQmxGetExtendedErrorInfo(errBuff, 2048);
     if (taskHandle1 != 0) {
      // DAQmx Stop Code
      DAQmxStopTask(taskHandle1);
      DAQmxStopTask(taskHandle2);
      DAQmxClearTask(taskHandle1);
      DAQmxClearTask(taskHandle2);
     if (taskHandle2 != 0) {
      // DAQmx Stop Code
      DAQmxStopTask(taskHandle1);
      DAQmxStopTask(taskHandle2);
      DAQmxClearTask(taskHandle1);
      DAQmxClearTask(taskHandle2);
     if (DAQmxFailed(error))
      printf("DAQmx Error: %s\n", errBuff);
     printf("End of program, press Enter key to quit\n");
     getchar();
    return 0;
    int32 CVICALLBACK EveryNCallback(TaskHandle taskHandle, int32 everyNsamplesEventType, uInt32 nSamples, void *callbackData)
     //cout << "\nStarting EveryNCallback" << "\n";
     //cout << "line 59" << "\n";
     TaskHandle  taskHandle1 = 0;
     TaskHandle  taskHandle2 = 0;
     int32       error = 0;
     char        errBuff[2048] = { '\0' };
     static int  totalRead1 = 0;
     static int  totalRead2 = 0;
     int32       read1 = 0;
     int32       read2 = 0;
     float64     data1[1000];
     float64     data2[1000];
     // DAQmx Read Code
     cout << "Start DAQmx Read Code Loop \n";
     DAQmxErrChk(DAQmxReadAnalogF64(taskHandle1, 1000, 10.0, DAQmx_Val_GroupByChannel, data1, 1000, &read1, NULL));
     DAQmxErrChk(DAQmxReadAnalogF64(taskHandle2, 1000, 10.0, DAQmx_Val_GroupByChannel, data2, 1000, &read2, NULL));
    // for (int i = 0; i <= 10; i++)
    //  cout << data[i] << "\n";
     //cout << "Here is data = " << data << "\n";
     //cout << "Here is data[2] = " << data[2] << "\n"; // write the data to a file
     if (read1>0) {
      cout << "Acquired " << read1 << " samples \n";
      totalRead1 += read1;
      cout << "Acquired " << totalRead1 << " Total samples \r\n\n";
      cout << data1 << "," << data2 << "\n";
      fflush(stdout);
     // cout << "the next line is stdout \n";
     // cout << stdout << "\n";
    Error:
     if (DAQmxFailed(error)) {
      DAQmxGetExtendedErrorInfo(errBuff, 2048);
      // DAQmx Stop Code
      DAQmxStopTask(taskHandle1);
      DAQmxStopTask(taskHandle2);
      DAQmxClearTask(taskHandle1);
      DAQmxClearTask(taskHandle2);
      printf("DAQmx Error: %s\n", errBuff);
     return 0;
    int32 CVICALLBACK DoneCallback(TaskHandle taskHandle, int32 status, void *callbackData)
     cout << "\nStarting DoneCallback" << "\n";
     cout << "line 99" << "\n";
     int32   error = 0;
     char    errBuff[2048] = { '\0' };
     // Check to see if an error stopped the task.
     DAQmxErrChk(status);
    Error:
     if (DAQmxFailed(error))
      TaskHandle  taskHandle1 = 0;
      TaskHandle  taskHandle2 = 0;
      cout << "line 109" << "\n";
      DAQmxGetExtendedErrorInfo(errBuff, 2048);
      DAQmxClearTask(taskHandle1);
      DAQmxClearTask(taskHandle2);
      printf("DAQmx Error: %s\n", errBuff);
     return 0;

  • I need to read multiple counters using PCI 6601 can I do this, and How?

    I am reading 4 TTL signals from a Magnetic Pickup how do I read multiple channels using PCI 6601?

    Not concerning my primary question, I would like to point out to an N.I. Rep. that there is a typo in the help section concerning "posting a message".
    I have built a large format, two axis digitizer using linear encoders, a 6601 counter/timer, and labview 8. In building my application program, I  initially am using two daq assistants, with each set up to accomplish  the task of reading two encoders simultaneously. In doing some research, It has come to my attention, that, with my current configuration, errors may result, due to one daq assistant attempting to access the cards driver while the other is acquiring data.  All attempts to get two channels working through a single daq assistant have resulted in an error message informing me that I can only have one task per counter.Thus far, I have not seen any noticeable errors, thought I would like to have this device "rock solid", as it will be used extensively.
    Is it possible, that I should have purchase  an "S" series board instead?

  • How do I read multiple channels at one time using labview with the Fluke Hydra Data Bucket 2620a using serial port?

    I need to take a reading of 15 channels about once a second. I can read one value at a time using the monitor function on the read values.vi driver, but this takes forever to read all the channels.

    I don't have this instrument but I took a look at the instrument driver and it appears that you can only configure one channel at a time to read from. You might want to take a look at the command set for this instrument and see if it allows for configuration of multiple channels. It could be that the instrument driver just doesn't have that built in.
    J.R. Allen

  • Displaying real-time data using gui meter from multiple channels.

    I am using DAQ USB-6009 for my assignment. Part of my task is to display real-data from multiple channels in the form of gui meters.  eg. irradiance and voltage...
    I used a split signal to separate the signals from different channels coming out of the data output terminal of the DAQ assistant. The problem is that I do not know which vi to connect in between the split signal and the gui meter. I am looking for one vi that is capable of handling signals (measurement)  and outputting the data to the gui meters simultaneously and individually based on the channel they are coming from.

    Thnx for your tip, Dennis.
    However, I have another problem that just occurred to me when my VI manages to execute as I wanted.
    I noticed that the needle on my gui meter will only "appears" to be responding to every changes to its input when I have set it to run continuously and the only way to stop it is via abortion which might leave the resources (eg. external hardware) in unknown state. Is there any safer and workable ways to organise the VIs using while loop?
    I have placed my DAQ assistant, write to measurement file (vi), add function, split signal and gui meters all in 1 single while loop.
        DAQ-------> write to measurement file
                 |
                 |                                                 ​                   |--------------------------------> add function----> gui meters
                 ---------------------------------------------> split signals ---|--------------------------------> add function----> gui meters
                                                      ​                                |--------------------------------> add function----> gui meters
    If I do the following steps,
    1. press run continuously to start the VI
    2. click the same button to disable continuous run when the VI has completed its task.
    3. click the stop button in the front panel to stop the while loop
    Does doing these steps ensure that I will not leave resources in unknown state? Is it a safer way to stop a VI which is running continuously?
    Pardon me for I am new to LabView. Even though, I have read the user's
    manual and tried out all the execises, there are some concepts that I
    need clarification on and mistakes that I need to discover through more hands-on.

  • Multiple channel waveform output using a 6711 board

    Hi,
    I am writing a driver for VxWorks RTOS based on the DDK for a NI6711
    analog output board.  I cannot find an example for timed waveform
    output on  more than one channel. I adopted aoex3.cpp (which works
    fine under VxWorks for one channel) to operate also multiple channels.
    I set all DACs to timed and wrote to the waveform generation register
    once for each channel. I tried several settings  for the number
    of  channels:
        theSTC->AO_Mode_1.writeAO_Multiple_Channels(1);
        theSTC->AO_Output_Control.writeAO_Number_Of_Channe​ls(iNumChans);
    None of the settings of  iNumChans results in the correct output  on all selected channels.
    The comedi driver uses the settings
       theSTC->AO_Mode_1.writeAO_Multiple_Channels(0);
        theSTC->AO_Output_Control.writeAO_Number_Of_Channe​ls(0); But that does not work either
    Any help would be very much appreciated.
    Heike
    Attachments:
    aoex7.cpp ‏20 KB

    Soory , here is the attached example
    Attachments:
    aoex7.cpp ‏20 KB

  • How to create multiple physical channels using DAQmx?

    Hi, I am new to Labview.
    Can anyone please help me on how to create multiple physical channels? I am following the LabVIEW examples in the NI example finder but they are only for acquiring signals from one channel.
    Actually, I am using the channels of an SCXI 1520 to measure voltage signals. And one more thing, in the NI Example Finder, they are sample codes there for setting the filter in SCXI 114x.
    Will this example work with an SCXI 1520, too?
    Thanks!

    There are many ways to read multiple channels in LabVIEW. First, if you look at that example that lets you set the filter setting on the 114x and you click on the 'Physical Channel Listbox' then click 'Browse' you can see that you can select multiple channels. After you select the channels and hit 'Ok' it will build a multiple channel string. This is one way to read multiple channels.
    Next, you can create a 'Task' in Measurement and Automation Explorer(MAX). When you create this task select all the channels that you need to read then back in LabVIEW simply select a 'DAQmx Task Name Constant' Select the task you just created and wire that to an Input of your first DAQ VI. If you do this you do not need to have a 'DAQmx Create Physical Channel' VI or create
    Task because it is already created in MAX.
    When looking at example VIs you can tell if a multi-channel read is acceptable by looking at the 'DAQmx Read' and if it says NChan that means it will do a multichannel read. There are tons of example programs that will display the multichannel read capabilities.
    This example may not work for the 1520 because the properties that are set could possibly be specific to the 142x. When using the 1520 though it is very likely that the properties will be very similar if not exact. You will simply put a DAQmx Channel property node on your block diagram and then look for the Lowpass filter settings properties that will most likely be in the same location. Now another way todo this without using a property node would be in MAX when you create a task set the filter settings from the Device tab in the task configure window.
    Let me know if you need anymore help with reguards to this issue! Have a great day!
    Allan S.
    National Instrument
    s
    Applications Engineering

  • Displaying multiple analog input channels using DAQmx READ commands.

    I am using a NI USB-6009 module in a hydraulic load test stand.  I want to read multiple analog voltage inputs and display them on my front panel.  Using DAQmx commands or DAQ assistant, LabVIEW will only let you have one READ command for the analog inputs.  Can someone point me to an example or give me some ideas on being able to display at least 3 analog inputs?  Thanks.

    With the DAQ Assistant, when you get a list of 'Supported Physical Channels', look at the bottom of the window. It says "<Ctrl> or <Shift> click to select multiple channels. When you use the DAQmx Create Channel and have a physcial channel control/constant, click the little arrow on the right side of the control/constant, select browse and use the same <Ctrl> or <Shift> click technique. If you want to enter the channels manually, the format is Dev1/ai0:2 for consecutive or Dev1/ai0,Dev1ai3 non-consecutive channels.

  • How  to use multiple channels with one remoteObject .

    hi,
    I have an application which is accessed through HPPS some
    times , also it can be access on server with http service.
    so I want to know how to configure config files or add
    runtime channels which will support either channel depending on
    the server it is accessed over.
    Is there any one who can help me to solve this...i need it
    soon.
    thank you...

    Hi,
    Please visit the URL below for details on adding channel sets
    at runtime. Add multiple channels to the channel set so that the
    fall back mechanism works.
    http://livedocs.adobe.com/blazeds/1/blazeds_devguide/runtimeconfig_5.html#194376
    Hope this helps.

  • Acquiring Analog Input from Multiple Channels in Labview

    Hello,
    i am working on a VI where i need to acquire signals from multiple channels in Labview using NI-9129.Initially i want to acquire contineous input signals (voltage and current) and display it on the graph.
    Having looked at forum and Labview examples i tried to make an initail VI but i am not sure if the setup i made needs any modification to serve my purpose.I am fairly new to Labview software.
    All i want is
    1.To acquire conteneously current and voltage 
    2.Display current and voltage individually on the graph.
    3.Perform some basic calculations like MAXIMUM,MINIMUM and AVERAGE values of voltage and current.
    4.Log the data into  excel file
    I have attached the VI i made so far.i need abit of advice if i am moving in the right direction or not.
    Thank You for having a look at my question.
    Attachments:
    Voltage-Current VI.vi ‏81 KB

    Engr_tech wrote:
    i think i already have the tdms for  data logging.as far as the tdms data logging is concerned,when i enable the logging mode to "read and log" the data logged inside the excel sheet would be seperate for current and voltage.?
    Is it practically possible to acquire data from 4 different channels and plot them.if yes,then am i right to assume that all i need is to modify the current VI for four channels having all of them in parallel.
    Yes, you are logging directly to a TDMS file.  This is definately the best route for data logging from a DAQ.  The currents and voltages will show up as different channels in the same group.
    To add more channels, just add them to your DAQmx task.  The logging will handle it with no issue.  Your calculations will also a little work to add the extra channels.  Same for the graphs, since you are using seperate charts.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Data acquisition from multiple channels.

    Hello
    Right now, I am able to acquire the signal from a single load cell and display it.But I would like to know of how to acquire  acquire signals from two load cells simultaneously.I am using Labview 6i and I am using AI S-Scan with AI config to acquire the waveform.It would be of great help if you could suggest a simple method to acquire the signals.
    PS: Please find the attached file used for acquisition from a single load cell.
    Looking forward for your reply.
    Manasa
    Attachments:
    test 4.vi ‏102 KB

    Hi Manasa,
    If I understand what you are trying to do, it is relatively
    straightforward to configure your application to acquire data on two channels.
    I was unable to run your vi as it was missing some of the subVI’s
    from your application.  However, your
    attachment was sufficient to see what you are trying to do. 
    Here is how to add channels:
    1.      
    In the I/O Channel Constant, you can add
    additional channels by using a comma or a semi-colon.  For example, to scan the first four channels
    you would put 0:3 in the constant (see attached screenshot ChannelConfig.jpg).  To scan the first and third channel you would
    put 0,2.
    2.      
    The AI Single Scan VI will now read from
    multiple channels.  Often it easiest to
    configure the output of this VI for viewing by first putting the data into an
    array using the Build Array VI.  It can
    then be plotted in a waveform graph. (see attached screenshot ReadtoGraph.jpg
    and WaveFormGraph.jpg)
    Just a few notes about “simultaneous” sampling:
    Most of the NI data acquisition cards have a multiplexer
    between the various input channels and the Analog to Digital (A/D) converter
    creating a very small delay between each channel (usually ms range or
    smaller).  NI does make several data acquisition
    cards that can perform true simultaneous sampling, meaning that there is an A/D
    converter for each channel.
    For the large majority of applications, the small delay
    between channels is negligible.
    Jared T.
    Attachments:
    ReadtoGraph.JPG ‏21 KB
    ChannelConfig.JPG ‏288 KB
    WaveFromChart.JPG ‏61 KB

  • How to Read from multiple channels

    Dear Sir
    I am acquiring data using FP-RTD-122 using OPC Client software. I ahve made one socket for that and i am using command
    CWDataSocket1.AccessMode = cwdsReadAutoUpdate
    CWDataSocket1.URL = "opc://localhost/National Instruments.OPCFieldPoint/FP Res\FP-RTD-122 @1\Channel 0"
    CWDataSocket1.Connect
    v = CWDataSocket1.Data.Value
    where v is a variant type.But this is 8-channel RTD so how can i read values from all channels using single socket connection Because at presnt i have to use 8 sockets for all eight channels.

    At least as of FieldPoint 4.0 and earlier (I do not know about 4.0.1 or later), the OPC Server did not support multiple channel analog items. Thus to read all eight channels of a FP-RTD-122 module, you would need 8 separate socket connections. For discrete modules (boolean), the "All" tag, is treated as a single 8 or 16 bit number.
    Regards,
    Aaron

  • What is the recommended way to do multiple channel, single point sampling for control with an NI PCI-6255 in RLP?

    Hello,
    I am writing a driver for the M-series NI PCI-6255 for QNX. I have downloaded the MHDDK and have all the examples working. I have also enhanced the examples to do interrupt handling (e.g. on AI_FIFO interrupt or DMA Ring Buffer interrupt). My ultimate goal is to write a driver that I can use for closed-loop control at 500 Hz using all 80 channels of the NI PCI-6255. I may also need to synchronize each scan with a NI PCIe-7841R card for which I've already written a driver. I want an interrupt-driven solution (be it programmed I/O on an interrupt or DMA that generates an interrupt) so that the CPU is available to other threads while the 80 analog inputs are being read (since it takes quite a while). I also want to minimize the number of interrupts. Basically, I will need to collect one sample from all 80 channels every 2 milliseconds.
    There are many different options available to do so, but what is the recommended technique for the NI PCI-6255 card? I tried using the AI FIFO interrupt without DMA, but it seems to interrupt as soon as any data is in the AI FIFO (i.e. not empty condition), rather than when all 80 channels are in the FIFO, so more interrupts are generated than necessary. I tried using DMA in Ring Buffer mode to collect a single sample of 80 channels and interrupting on the DMA Ring Buffer interrupt, which appears to work better except that this technique runs into problems if I cannot copy all the data out of the DMA buffer before the next AI scan begins (because the DMA will start overwriting the buffer as it is in ring buffer mode). If the DMA is not in ring buffer mode or I make the ring buffer larger than one 80-channel sample then I don't have a way to generate an interrupt when one sample has been acquired (which I need, because I'm doing control).
    I saw something in the documentation about a DMA Continue mode in which it looks like you can switch between two different buffers (by programming the Base Count/Address with a different address than the current address) automatically and thereby double-buffer the DMA but there is no real documentation or examples on this capability. However, I think it would work better than the Ring Buffer because I could interrupt on the DMA CONT flag presumably and be copying data out of one buffer while it is filling the other buffer.
    Another option would be DMA chaining, but again, I cannot find any information on these features specific to the NI DAQs.
    I tried interrupting on AI STOP figuring that I could get a single interrupt for each scan, but that doesn't appear to work as expected.
    I know that DAQmx on Windows has the ability to do such single sample, multiple channel tasks at a fixed rate so the hardware must support it.
    Any suggestions would be appreciated.
    Thanks.
    Daniel Madill

    Hello,
    The interrupt that will happen nearest the times that you need is the AI_Start_Interrupt in the Interrupt_A group. This interrupt will occur with each sample clock. By the second time this interrupt fires, the AI FIFO should have the samples from the first conversion. If it is easier to use programmed IO, you can read the samples out of the FIFO until you get all 80.
    Additionally, you can set the DMA to send samples as soon as the FIFO is no longer empty...instead of waiting for half full or full. This change will reduce latency for your control loop. You can set AI_FIFO_Mode in AI_Mode_3_Register to 0. By the second time this interrupt fires, you should be able to check how much data is in the DMA ring buffer and read the 80 samples when they are available. You can make the ring buffer larger than 80 samples if you see data getting overwritten.
    There is no interrupt associated with 80 samples being available in the FIFO or 80 samples being available/transferred by DMA to the host. X Series has much more flexibility with these interrupts.
    I hope this helps!
    Steven T.

Maybe you are looking for