Speed up time of AI Create Channel.vi task containing thousands of channels

I am creating an AI task containing a total of 8000 channels of different channels with each channel being acquired many times before the next channel is acquired.  The channel list is something like 0,0,0,...,1,1,1,...,2,2,2...3,3,3... where each channel number would be acquired 2000 times.  The purpose is to perform averaging.  I am seeing that DAQmx Create Channel.vi takes about 100 msec to create 1000 channels for a total of 800 msec to create all channels (DAQmx 9.4, LV 11, WIN 7, CoreDuo P8700 2.5 GHz).  I would like to speed this up by a factor of 10 if possible.  Test vi attached.
Attachments:
Create Multiple Channels duration.vi ‏17 KB

Hi SteveP,
The DAQmx task contains data structures representing channels, which in turn contain other data structures representing channel properties and such. Most of the execution time of DAQmx Create Channel is spent allocating and initializing these data structures. They are separate from the task's input buffer (where data is stored until DAQmx Read is called). The input buffer is allocated when you reserve the task (which is normally done by DAQmx Start Task), and it is indeed allocated as a single large array.
DAQmx support for repeated channels focused on the SCXI use case, where hundreds of milliseconds of channel creation time seemed to be an acceptable tradeoff for measuring thousands of thermocouples. During development of NI-DAQmx 7.0, we used 3072 channels as our large system benchmark for channel creation, since that's the maximum number of channels supported by an SCXI task: 8 chassis x 12 modules x 32 channels (ignoring CJC channels). Repeated channels also make your use case possible, but this wasn't the original goal, otherwise we would have tried to make it easier to use for this purpose.
When replying to your previous thread on this topic (DAQmx AI Task with many samples CH0, then many CH2, then many CH3), I assumed that you were doing this because you were having problems when you took the straightforward approach to averaging, but Ben is right to point out that there are ways to deal with ghosting, cross talk, etc. What is the source impedance of the signals that you are measuring? How Do I Eliminate Ghosting From My Measurements? lists some options for dealing with high source impedance.
Failing that, is it possible for you to reduce the frequency at which your program creates and destroys tasks? If you can extend the task lifetime by reusing the same task more than once, you can avoid the channel creation overhead, or at least amortize it over the lifetime of the task. Note that you don't have to clear one task before you create a second one; you only have to make sure that two tasks don't have the same hardware reserved at the same time--if you do, you will get a reservation error. In most cases, stopping the first task before starting the second is sufficient to avoid this. It is possible to create multiple tasks up front, then switch between them throughout the rest of your program.
Brad
Brad Keryan
NI R&D

Similar Messages

  • A task containing a single global NRSE ai channel thinks it's differenti​al!

    Help, surely this is a bug (either in my brain or in labVIEW!).
    I'm running DAQmx on a PCI-6229 m series DAQ device, SHC68-68-EPM cables and the CB-68LPR break out PCBs.
    I'm measuring ground referenced signal sources of a few volts in amplitude, some of which share a common ground and I am therefore using NRSE measurements on those to preserve free slots.
    I've set up a global channel called ILD1 as dev1/ai0 set as NRSE. The connection tab on MAX gives the connections I would expect:
    signal: pin 68 (ai0)
    ground: pin 62 (aisense)
    When I run the test panel for the global channel, I see exactly the measurement I expect so this works fine.
    I have then set up a task containing this global channel (and no others). The task seems at first to recognise this as being NRSE (having inherited this from the global ILD1 settings). However, if you look at the connections tab, the connections are now different:
    signal: pin 68 (ai0)
    ground: pin 34 (ai8)
    Running the test panel on this task gives a voltage that floats towards a maximum value. This is consistent with the fact that the task seems to think it's now doing a differential measurement, but I have not connected ai8 and so this input is floating.
    So the question is how can the global channel be NRSE (which I want), and a task based solely on this end up as differential? How can I fix this to preserve as many ai pins as possible (e.g ai8 would be useful for something else!)
    Thanks

    HI probably-
    probably wrote:
    I have ai0-ai7 set up as NRSE, as they share a common GND which I have connected to aisense.  I have four other signals to collect, which also share a common ground (but possibly different from GND). My thought was that to prevent any gnd offsets, I would measure these as differential mode. So I set them up on ai8-ai11 (I assumed that ai12-ai15 would be the other terminal on each of these signals). However, you can't do this: a mixture of differential and NRSE is not allowed on the same connector. Setting the four up on ai16-ai19 allowed me to measure them in differential mode. I presume this is because of the way the multiplexer works on the input amplifier?
    btw, I've found this forum tool pretty good, apart from accidentally pressing tab to get a space, then return by accident and submitting a partial post
    A mixture of NRSE and differential channels is certainly allowed on the same connector.  The problem arises in the placement of channels.  In differential mode the channels are connected on two seperate channel input pins; the positive pin goes to pin ai[X] and the negative pin goes to pin ai[X+8] where X is the channel number specified for differential input.  So, on a card (or a single connector on a two connector card) you can only create differential channels on the first 8 analog input channels.  Differential input channels on ai8-ai15 are not allowed because there isn't an [X+8] pin to access. 
    If you arrange your four differential channels somewhere in the first 8 inputs (i.e. ai0-ai7) and the NRSE channels anywhere else you will be able to acquire all signals in the same task on the same connector at the same time.
    EDIT:  I forgot to mention one caveat that might be obvious but is still worth mentioning- using a differential channel on a pair of inputs reserves the second pin.  So, if you create a differential channel on ai6 for instance, both ai6 and ai14 will be reserved.  This means that you will not be able to use ai14 for NRSE input.
    Hopefully this helps-
    Message Edited by Tom W. on 08-20-2005 06:52 PM
    Tom W
    National Instruments

  • Error 200524 Different number of channels in task and data

    Anyone out there with some information would be greatly appreciated. I  have attached my VI. Essentially I am trying to build a simple PID VI to controll the temperature of a piece of equipment in a system I am building. I have heating wire powered by 120 V source. The circuit is controlled by a simple relay, which is controlled by a digital line on my NI USB 6343 board. I have seen numerous examples throughout the forums and the shipped examples, but I cannot seem to figure out how the PID VIs work. I understand the basics of a PID controller, but cannot make the connections of how to actually get it to work in LV.
    I figured that this VI I wrote is pretty simple and should work, but I keep getting this error.
    Error -200524 occurred at PID_v0.vi:Instance:19:1
    Possible reason(s):
    Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
    When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.
    Number of Channels in Task: 1
    Number of Channels in Data: 1000
    Task Name: _unnamedTask<1>"
    Any advice, direction, sample VIs that are not overly complicated, etc would be greatly appreciated.
    Attachments:
    PID_v0.vi ‏97 KB

    Hi andyabs,
    I'm not getting the same error you are when running this VI.  How are you setting up your channels and tasks in the DAQ Assistants?  It seems like this may be the source of your error.
    You should also take a look at Section 4 of the attached White Paper.  Using DAQmx functions rather than the DAQ Assistant will give you a bit more functionality with your program.  Let me know if you have any questions about this example.
    Control Applications with Data Acquisition Hardware: http://www.ni.com/white-paper/9086/en/#toc4
    Myriam
    Applications Engineer
    National Instruments

  • Do you have to disable your Wifi on your existing Reuter if using time capsule to Create a new network

    Does one need to disable the wifi on ones reuter if using a time capsule to create a new network what happens if you don't and what are the benefits of doing so

    No but you may experience a bag of hurt from cross channel interference. You may have to reset the Subset Mask of one of the routers along with separating the broadcast channels.
    Further if you then have one device a PC perhaps on one network and your Mac on another you may not be able to share files/ITunes etc.... with any ease.
    So switching off the Wifi on the router/modem and hanging an Ethernet cable to the Time Capsule and setting that up as your WiFi router distributing the IP addresses over DHCP really is the least problematical approach.
    IF you have cable Internet with a decoder with Ethernet output ditch your old router completely !

  • Minumum sufficient commands to create PSD containing transparent alpha channel

    I was recently typesetting some leaflets in InDesign under time pressure. I had a JPG file with a white background and wanted to create a PSD from it in Photoshop CS5 with an alpha channel making the background transparent.
    I managed this in the end by blundering around, but the help file is no help, and the obvious way of creating a layer mask doesn't work.
    I'd like to know the minimum sufficient command sequence to do it.
    Suppose we've got this in Photoshop, with the bit we want already selected:
    Double clicking the background layer and then clicking ADD LAYER MASK looks good, but it doesn't create an alpha channel. It actually creates a channel named "Layer 0 mask" but if you save it in a PSD and then import into InDesign it is not transparent.
    There doesn't seem to be a "convert layer mask to alpha channel" command. Nor a "make alpha channel from selection" command.
    There is a button at the bottom of the CHANNELS tab that's named "create new channel" and if you click it when a selection is active it does create a new layer named "Alpha 1", but unfortunately it is not the wanted mask but rather just the path of the marching ants.

    Yes, this does work. Don't know why it didn't for me yesterday.
    There's no need to delete the background because in my example, after unlocking the padlock and adding layer mask, there's only one layer there. It does create, as I said above, an additional channel named "Layer 0 mask" which is what one would want as an alpha channel.
    If I SAVE AS PSD, the box to include LAYERS is ticked and the box to include ALPHA CHANNEL is greyed out, but InDesign still treats it as transparent.
    If I take the selection and SAVE SELECTION AS NEW CHANNEL, it creates a second channel looking exactly like the "Layer 0 mask" one above, but if I then SAVE AS PSD the box to include ALPHA CHANNEL is ticked. So the channel created by ADD LAYER MASK is of a different ilk than the one created by SAVE SELECTION AS NEW CHANNEL, although this is not apparent from the CHANNELS tab. Slightly confusing.

  • High-speed aquisition time stamp

    I am using traditional NI-DAQ with a 6071E board and acquiring data at very high rates using AquireWaveforms.VI I want to save this data in a text file with either a column of time first or even a column of time before each channel (anywhere from 1-64 channels). Because I am acquiring at such high rates, I suppose I want to be able to extract timing data from the Hardware since I'm not looping and any software timing wouldn't be accurate. Also, if at all possible I want to be able to have the time for each measurement from each channel so I can include the phase shift that comes with multiplexing. Is any of this possible? I really need resolution much better than 1 second. at least to the millisecond, but I am looking for even bette
    r than this.
    Thanks so much,
    Rick

    The waveform carries a DT (delta Time) component.
    Use the GET WAVEFORM COMPONENTS function to extract the DT. That should be the actual dT used, not necessarily the rate you asked for.
    If you have a DT number, you create the array with a FOR loop:
    For I = 0 to NSamples-1
    Time[i] = i * DT
    As far as the inter-channel time, the minimum value is a property of the card, but it's also controlled by software: LV can extend it.
    I don't know about the express VIs: I never use them. But the original AI CLOCK CONFIG, has an input where you can specify it.
    If that doesn't work, and you have access to some test equipment, you can find it out for yourself:
    Set up a ramp generator for 0.0 - 1.0 V at 1000 Hz.
    This means the voltage is
    changing 1 volt per mSec.
    This means the voltage is changing 1 mV per uSec.
    Wire the ramp generator to channels 0, and 10.
    Perform a DAQ operation, with all channels 0-10 active.
    Pick out a portion of the waveform, where the voltage is increasing on all channels (exclude the drop at cycle's end). Ignore channels 1-9.
    Subtract the channel 10 array from the channel 0 array.
    Average the result array and divide the average by 10.
    The average value, in mV, is the channel delay time, in uSec.
    By comparing channels 0 and 10, you're measuring 10 intervals, not one, so you're more accurate.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Why some times delivery  will created through vl10c even sale order stock is not available?

    Hi,
    why some times delivery  will created through vl10c in batchmode even sale order stock is not available?
    Thanks,
    Kalyan.

    the correct english name is : Replenishment leadtime
    Check with Replenishment lead time - Supply Chain Management (SCM) - SCN Wiki

  • How to audit a user at same time it is created?

    Hi, I got a problem and I hope someone can help me.
    Is there any way of auditing a user at same time it is created?
    For example I create the user "Eddy" and I want this account to be automatically audited so I don't have to execute "audit session username;" each time a new user is created.

    I wasn't aware but it seems that most of DDL operations are not available directly from system triggers. Anyway, you can log the user created in a table (stored in ora_dict_obj_name) for being processed later with a scheduled job.
    All in all, it seems much more easier to use two sentences create + audit.

  • How can I set the parameters of global channels and tasks previously created inside my applicatio​n?

    Hi everyone !
    Before proceeding to the description below I think it´s important to say that I´m using NI USB-6008 as DAQ device and the driver used is DAQmx 7.5.
    I´m currently developing an application into which I intend to be able to have complete control of the DAQ device being used, i.e, I´ll be able to create, delete and change the configuration of global channels and tasks previously created, among other things.
    To achieve the ends specified above I´ve already developed two vis, one to create global channels and the other to create tasks, and these two are doing a fine job. After this, I thought I came to the easy part ... I think I couldn´t be far for the truth! I thought that everything I should do was to specify which channel or task I´d like to configure and then use a property node to get the results I wanted, but it´s not working ...there are some DAQmx property nodes I thought I could use to do it  but I didn´t find a way to change the configuration of the global channels, and none of these property nodes seemed to work, i.e, although the simple vis used to test them ran the chosen parameters didn´t alter at all, after each execution I used MAX to see if they had changed, and to my chagrin they hadn´t.
    Can anybody lend me a hand with this problem? As always, any help would be deeply appreciated !    

    Hi Giovani,
    There is a developer zone tutorial that discussus some advanced data acquisition features including programmatic saves of NI-DAQmx tasks, global channels, and scales.  This tutorial also includes an example program.
    I wrote a short program that creates tasks in MAX. Whenever I wanted to change a part of the task, I would just change that feature in the example program. Take a look at the examples and please let me know if you have any further questions.
    Regards,
    Hal L.
    Attachments:
    create task example.vi ‏33 KB

  • Can't adjust the default time scale when creating a new appointment in Outlook 2010

    Good Afternoon, I have found a question on these community boards that propose an issue that I am currently experiencing. The answer; however, was not the solution for me. I used the same name as the original post and will add the original text as it is
    exactly what I am experiencing.
    "When creating a new appointment in the month view Outlook 2010, the default time scale or duration is 2 days.  I tried resetting the view, adjusting the time scale, and creating a new profile.  It only seems to happen when creating the appointment
    in the Month view.  ???  Day and week view work fine and appointment can be created w the standard 30 minute time scale.  But the time scale in the month view although says 30 mins, it creates appointments in 2 day durations."
    This is exactly what happens to the user I am assisting. When in "month view" double clicking the day will bring up a new appointment with the times within the same day. If you click the "new appointment" button in the ribbon it
    sets the end time to the following day. This only happens in the month view every other view works as it normally should. I have tried it several times being sure multiple days are not selected. It still gives me an end time for the following day. I have reset
    the view, changed the time scale but nothing seems to bring it back to the default same day appointment. Any ideas?
    Thanks for any assistance you can provide.

    It is a default in Outlook 2010 in month view.  The "time scale" selection is greyed out.  Very frustrating.  Everytime I select "New Appointment," a duration of 1 day is automatically selected; midnight to midnight.  I end up doing
    most appointments twice because I forget to change to end date back to the day of the appointment.  "New meeting Request" works fine.  So does "New All Day Event" when you deselect "All Day Event."  I can't see how this default behavior
    provides optimal results under any circumstances.  Very frustrating.

  • I have realised over time I have created multiple accounts. I have bought music on my iphone and am not able to locate the account that I made most of my purchases on. I have bank statements on the purchases but don't know how to contact someone to help.

    I have realised over time I have created multiple accounts. I have bought music on my Iphone and am not able to locate the account that I made most of my purchases on. I have bank statements on the purchases but don't know  how to contact someone in Itune to help me.  PLEASE

    I don't have the app adn no expereince with it, but it appears basec on teh app description you may need it installed on your MAC as well to download the files.
    You might find help on the vendors website: http://www.nfinityinc.com/index.html

  • Run time error while Creating IDN and Inbound Delivery

    Hi All,
    I am getting Run time error while creating Inbound Delivery Notification from Inbound Queue and Inbound Delivery from IDN
    After debugging i come to know that system is looking for Patch Level SAPKNA7026 but in my system Patch is upto SAPKNA7022
    Is there any OSS notes available to deactivate/resolve this run time error ? I tried 0001798794 Deactivation of hierarchical access functionality but system is still giving me run time error
    Regards,
    P@M

    Hi Agrawal
    As you are getting run-time error after entering the sold to party and material and the error is in SAPLV61Z ,
    close the session for sometime and open again and then create sales order and then enter sold to party and material and then check wheather you are getting or not. If you are still facing the problem then take the help of the ABAP & BASIS consultant's.
    Regards
    Srinath

  • 24" iMac summer 2008. CPU fan runs at highest speed, some times goes to "sleep" mode. t' is about 35'- 42'C. Run hardware test: 4sns/1/40000000:tlop-130.000, next time 4sns/1/40000000:tlop-128.000 errors. Reinstalled all softwere. Nothing changed.

    24" iMac summer 2008. CPU fan runs at highest speed, some times goes to "sleep" mode. CPU t' is about 35'- 42'C. Run hardware test: 4sns/1/40000000:tlop-130.000, next time 4sns/1/40000000:tlop-128.000 errors. Tried SMC, NVRAM, PRAM. Reinstalled all softwere. Nothing changed.

    I suspect you have hardware problem with a fan sensor. Doing a software install will not help the machine needs to be taken in for service. If you run Apple Hardware Test in Extended Mode it should reveal the error code. If it does not then run AHT an additional 2-3 times to be sure in Extended Mode. Each pass will take about 30-60 minutes.

  • Time Machine must create a new backup for you

    getting this error message Time Machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you. don't want to lose the history off my backups how can i fix this without losing any backups.

    You really can't. 
    That's not one of Apple's clearest messages;  it means your backups are damaged beyond OSX's ability to repair them.  See #C13 in Time Machine - Troubleshooting for details.

  • How to adjust audio duration/speed over time?

    I watched a video on how to adjust video duration/speed over time, using time remapping and keyframes, but it does not seem to affect audio for some reason. Is there a way to adjust the speed/duration of audio over time like you can with video?

    Oh you need to do it in AE? That's... kinda.. unneeded but okay. Thanks!

Maybe you are looking for

  • Itunes 10.1.2.17 upgrade killed my sound, music scroll bar doesn't move

    After upgrading to 10.1.2.17 on 1/30/2011 all sound ceased on my system. Updated the sound card driver to no avail. No conflict in compatability mode. When song selected in iTunes, the play bar doesn't move nor do movies have audio in quicktime. Ther

  • ACR corrections not showing up in Bridge previews

    I made a lot of color and tonal corrections to CR2 files (from a Canon 5D) in Camera Raw. When I go back to the folder in Bridge the "old" previews only show up (looks like generic previews); as I scroll thru the images, each time I select an image p

  • Lightroom processes for ages after withProlongedWriteAccessDo

    Hi, I am considering a switch from Expression Media to Lightroom, and I wrote for that a Lightroom plugin that imports all my metadata from an EM XML file. Functionaly, it works great. However, I have a performance issue problem: if I run the plugin

  • Firmware Version 3.1 or higher

    I have an iPOD 10GB (older model, M8976LL)...I recently purchased a Belkin TuneBase FM so I can play my iPOD in my car...The minimum Firmware version required is 3.1...my iPOD has a 2.3 Firmware version....A few questions...1) is an firmware upgrade

  • Get program version

    How do you get an application's version using AppleScript? For example, get the version of Firefox... Thanks, jeremy