16 channels of data at 30kHz on the NI USB-6259 - is it possible?

Hello -- I would like to use the NI USB-6259 for electrophysiology.  My application requires 16 channels of analog input digitized at 30kHz.  This should be possible, as the listed aggregate digitization rate is 1MS/s.  I've however run into several problems, all of which I believe may deal with how memory is handled in LabView (or maybe I'm just programming it wrong).
First off, if I pull in continuous voltage input using the DAQ assistant (DAQA) from anywhere from 5k to 30k samples at a time -- without any visualization -- things run alright.  I record the data in binary format (TDMS) using the "Write to Measurement File (WTMF)" routine.  However, I notice that the RAM used by LabView creeps up at a steady pace, roughly a megabyte every several seconds.  This makes long-term recording unfeasible.  Is there any way to avoid this?  Basically I just have the DAQA and WTMF in a while loop that was automatically created when I set the acquisition mode to continuous.  
Secondly, I would like to be able to visualize my data as I record it.  If I set up 16 graphs -- one for each signal -- I need to raise the "Samples to Read" (STR) to 30k to ensure that the "Attempted to read samples that are no longer available" error [-200279].  This is annoying, as it makes the display look jerky, but is probably livable. 
Now if I choose to display data in 16 charts rather than graphs (charts, as defined in LabView, display a bit of cumulative data along with the real-time signal), the amount of RAM used by LabView increases by several megabytes a second, regardless of whether or not I'm saving the data.  After a short time, I get an "out of memory error".  
Ideally I would like to be able to display 16 channels of 30kHz analog voltage data and save the data.  As you see I'm having some level of trouble doing either of these things.  Bare minimum requirements for my application would be to pull in the data with an STR of 30k, visualize the data in graphs, and save the data.  Should this be possible in LabView 8.6 or 2009 (I use 8.6, but have tried these steps on the trial version of 2009 as well)?  Even better, I would like to use an STR closer to 5k, and display the data in charts as it's saved.  Should this be possible?
I'm using a reasonably powerful machine -- 32-bit Windows 7 with 3.24 gigs RAM,  2.4 GHz quad-core, etc.
Thanks

Hello!
I will admit right now that I can't stand any of the "assistants" and never use them.  I don't like to have any part of my code invisible from me.  Therefore, looking at your code gave me a headache.  :-) 
So, what I did is rewrite your code using the DAQ functions (basically what you'd see if you selected "Open Front Panel" on the DAQ assistant icon).  You can go in and put the DAQ assistant back in if you so desire.  This is just to give you an idea of the approach you should take.  I'm grabbing 15000 points per loop iteration, just because I happen to like 500msec loop rates.  You can tailor this number to your needs.
I have two parallel loops -- one collects the data and the other displays it on the front panel and writes it to a file.  (I used the "Write waveform to file" function -- you can put your assistant back in there instead if you like.)  The data is passed from the DAQ loop to the display loop using a queue.  I use the "index array" function to select out the individual channels of data for display.  I show 3 channels here, but you can easily expand that to accommodate all 16.  You can also add your filtering, etc.
I am using a notifier to stop the two loops with a single button, or in case of an error.  If "stop" is pressed, or an error occurs in the DAQ loop, a "T" value is sent to the notifier in the display loop (and that "T" value is used to stop the DAQ loop as well).  That will cause the display loop to receive a "T" value, which will cause it to stop.
I don't have a 6259 on hand, so I simulated one in MAX.  I didn't have a problem with the processor running at 100% -- on my clunky old laptop here, the processor typically showed ~40-50% usage.
I've added comments to the code to help you understand what I'm doing here.  I hope this helps!
d
P.S.  I have a question...how are you currently stopping your loop?  You have "continuous samples" selected, and no stop button.
Message Edited by DianeS on 12-30-2009 07:28 PM
Attachments:
16 channel waveform display and write.vi ‏31 KB

Similar Messages

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • What is the best way to write 10 channels of data each sampled at 4kHz to file?

    Hi everyone,
    I have developed a vi with about 8 AI channels and 2 AO channels... The vi uses a number of parallel while loops to acquire, process, and display continous data.. All data are read at 400 points per loop interation and all synchronously sampled at 4kHz...
    My questions is: Which is the best way of writing the data to file? The "Write Measurement To File.vi" or low-level "open/create file" and "close file" functions? From my understanding there are limitations with both approaches, which I have outlines below..
    The "Write Measurement To File.vi" is simple to use and closes the file after each interation so if the program crashes not all data would necessary be lost; however, the fact it closes and opens the file after each iteration consumes the processor and takes time... This may cause lags or data to be lost, which I absolutely do not want..
    The low-level "open/create file" and "close file" functions involves a bit more coding, but does not require the file to be closed/opened after each iteration; so processor consumption is reduced and associated lag due to continuous open/close operations will not occur.. However, if the program crashes while data is being acquired ALL data in the buffer yet to be written will be lost... This is risky to me...
    Does anyone have any comments or suggestions about which way I should go?... At the end of the day, I want to be able to start/stop the write to file process within a running while loop... To do this can the opn/create file and close file functions even be used (as they will need to be inside a while loop)?
    I think I am ok with the coding... Just the some help to clarify which direction I should go and the pros and cons for each...
    Regards,
    Jack
    Attachments:
    TMS [PXI] FINAL DONE.vi ‏338 KB

    One thing you have not mentioned is how you are consuming the data after you save it.  Your solution should be compatible with whatever software you are using at both ends.
    Your data rate (40kS/s) is relatively slow.  You can achieve it using just about any format from ASCII, to raw binary and TDMS, provided you keep your file open and close operations out of the write loop.  I would recommend a producer/consumer architecture to decouple the data collection from the data writing.  This may not be necessary at the low rates you are using, but it is good practice and would enable you to scale to hardware limited speeds.
    TDMS was designed for logging and is a safe format (<fullDisclosure> I am a National Instruments employee </fullDisclosure> ).  If you are worried about power failures, you should flush it after every write operation, since TDMS can buffer data and write it in larger chunks to give better performance and smaller file sizes.  This will make it slower, but should not be an issue at your write speeds.  Make sure you read up on the use of TDMS and how and when it buffers data so you can make sure your implementation does what you would like it to do.
    If you have further questions, let us know.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • JDBC sender channel running but not picking up the data from sp

    Hi,
    One of the jdbc sender channels in production is running at its schedule time but it is not picking up the data from the sql side, we have checked with the sp side and they are saying that sp is running fine. No changes have been done in its configuration. Last message coming in RWB  is Retry interval started but that is of 1 day and its already been 3 days. I tried by starting and stopping the channel but of no use. The channel was re activated but that also didn't help.
    Please help, what can be the reason for the same.
    thanks.

    Hi,
    The JDBCadapter ( The respective channel) is definitely locked in PI . Ideally for each polling interval a lock is being created and once the processing is over , the lock should be released/deleted automatically to allow further polling interval. If the lock is not released by the system automatically,further polling will not happen as expected. ( This may affect all sender JDBC adapters as well. I would recommend to do a check in all sender JDBC communication channels)
    You can see/delete the locks in Visual admin.
    Go to Server>Services->Locking adapter and click refresh
    The entries for JDBC adapter ( with name $XIDBAD.JDBC2XI) should be deleted by selecting those particilar entries and click delete selected locks.
    If you have more than one node, then same should be done in all server nodes.
    The temprory solution would be creating/copy the existing channel in ID with same properties and assign it into particular sender agreement.
    But, the lock may be created again which potentailly stops all your database interfaces. Hence i would suggest to use Disconnect From Database After processing of Each messages in Advanced tab in the sender JDBC adapter.
    Hope this solves your issue.
    PS: The same bahaviour would expected for all file adapter as well

  • How could a down-mix APOs receiving multi-channel audio data from the application

    Hello,
        Now I am integrating my DSP algorithm to the APO whichs convert to 7.1 input to stereo output(we call it virtualization), but the endpoint just supports stereo input. My first question is can my APOs receiving a 7.1 input data from
    application when the endpoint only supporting stereo input. The second question is if the scheme is feasible and what should I do.
    Thanks

    Ok so i order to help anyone who is interested.
    The only ironic solution to this problem i found was to use a plugin called xto7 to convert the xml to the old fcp7 format.
    i then imported this into premiere pro.
    this was then able to export an OMF that when imported into logic 10 that was using the correct 6ch mono setting as separate tracks.
    Insane but it works until Apple fixes the incorrect meta data import in FCPX that sets the xml export to the default import that is always surround.
    this is the only way i was able to send stems with all the edit points and fades for the sound editor.
    If you don't have premiere lying around you maybe able to do it with fcp7 too we just didn't have it in this studio.
    Fingers crossed Apple fixes the fcpx xml export.

  • Access Channels in Data Portal through Data Plugin

    Hi,
    I am supposed to write two plugins, one plugin creates the channel reads in the data values and from the other plugin I need to read in the channel custom properties.
    Is there a possibility to access the channels in the Data portal through the plugin though I know through plugin we will not be able to access any DIAdem native commands.
    I have an option of reading in these properties to a text file and then pull them into DIAdem but it is not recommendable.All that is required is read the file and create the cutom property for the existing channels.
    Can anyone give me a best suggestion for the above at the earliest?
    Thanks,
    Priya

    Hello Priya,
    A dataplugin is not limited to read a single file only. There are quite a few cases where let's say there is a file "abc.bin" and another file "abc.hdr" which belong together. One contains the channel data, the other contains the descriptive information. We have developed plugins which allow the user to select one or the other and the DataPlugin then reads the information from both. As long as you can find the second file, e.g. through the name or some piece of information which is in the file, its not a problem. And yes, a plugin can read from a binary file and an ASCII file at the same time. We even developed DataPlugins for files which are both, ASCII and Binary, in a single file.
    If you like, you can send me some examples together with a description of the file format(s) and I can try something for you.
    Andreas

  • Do I really need to create virtual channels in data neighborhood in order to access my pci 6034E?

    Hello all,
    This may sound a little weird, but I would like to know how to configure my 6034E without having to create virtual channels in data neighborhood. Reason being, the data is often lost when users update or search for new instruments in Measurement and Automation.
    I have tried using the AI CONFIG.VI, which gives me all the attributes I need...set channel name, device name, device channel, input mode, sensor/actuator type ect..  When I connect the AI READ.VI the value read back is incorrect. Matter of fact as an exapmle, the power supply could be off and I still read 10 Volts. But when I have created a virtual channel in data neighborhood, the data read back is correct.
    Is there another way to read back data but not have a virtual channel in the data neighborhood?
    Thanking you in advance,
    Demo

    Duplicate post

  • How to get spot channels colors data and get spot channels length

    File is cmyk format..spot channel color is cmyk .such as an spot channel color is c100m50y20k5
    how get spot channels color data use javascript? c=? m=? y=? k=?
    howv to get spot channel length n(don't cmyk channel) use javascript?  such as file cmyk + 7 spot channel    n=7
    pls help me

    You may want to post over at:
    Photoshop Scripting
    And you may want to elaborate on what this is supposed to mean:
    File is cmyk format..spot channel color is cmyk .such as an spot channel color is c100m50y20k5
    Maybe posting screenshots with the relevant Panels visible might help illustrate the issue.

  • Programmatically Obtaining Channel Config data list

    Hi,
    How do I access the list of Communication channels in the system?
    I need a total list of ALL channels with data like this->
    Comm Channel Name,
    Communication Component,
    Party
    Cheers,
    Earlence

    hi,
    I said "programmatically".
    I found the answer
    XI_DIRKEYCHANNEL is a table in the BC_XIIB data source.
    It lists the reqd parameters.
    Cheers,
    Earlence

  • I would like to read a .dat file (binary). The file contains numeric as well as text data. Could someone provide some examples/h​ints for this purpose?

    The file is the output of a data acquisition system. I need to get the data as a 2D array (channel name and numeric data corresponding to the channel) so that i can use the data for graphical displays.

    It would depend on how the file was written.
    You should have some information regarding how the data is stored (is it delimitied in some way?)
    If the data is delimited or in a recognizable spreadsheet array format, you will be able to import the data without (much) issue; regardless of whether the data is stored as text or numeric.
    CLD | CTD
    LabVIEW 2011 SP1 | TestStand 4.5

  • What channels are availible on Vimio in the U.S.?

    What channels are availible on Vimeo in the U.S.?
    *Vimio is a program to watch streamed tv on mobile phones
    Message Edited by quinton55 on 16-Mar-2009 02:19 PM
    Nokia N95 8GB V30.0.018 **Kudos are very welcome**

    http://www.vimeo.com/channels
    N96-1 + 8G SD~Software Version 30.033~Software Version Date 18-06-09~Type RM-247~P/C 0543713~T Mobile UK

  • Taking the inut of three channels to graph and then determining the time between the events.

    I am inputting three channels of data. On channel 4 I will have a low to a high, on channel 5 an accelerometer, and channel 6 a high to low. As you can see from the attached VI what I would like to do is capture all three signals and have the time calculated between channel4 low to high and channel 5 level change. Then between the channel 5 level change and channel 6 high to low. I was trying to use cursors but at this point I am lost. I only had two currsors and couldn't calculate,... Can someone please assist?
    Attachments:
    multi-graph_calc.vi ‏117 KB

    Salut.
    Alors pour avoir plusieurs curseurs, tu fais comme sur ton exemple, c'est à dire que tu agrandit la palette des curseurs et tu clique ensuite sur le + avec des flèches au bout pour l'activer.
    Un fois que tu as créé autant de curseur qu'il te plait et qu'il est nécessaire à tes mesures, tu procède de la façon suivante :
    à l'aide d'un noeud de priopriété
    tu met le curseur 0 comme curseur actif. tu récupère la valeur X de sa position (à l'aide toujours d'un noeud de priopriété.
    Puis tu met le curseur actif à 1, tu récupère sa valeur X...
    Tu met le curseur à n, tu récupère sa valeur.
    Tu fais ensuite tous les calculs sur les positions dont tu as besoin.
    Ce que tu peux faire pour avoir un programme plus propre, c'est faire ça avec une boucle (boucle for par exemple, qui irair de 0 à n) tu attribue la valeur de i à ton indice de curseur (noeud de propriété curseur actif) et tu récupère la valeur en X de ton curseur. Tu envoi cette valeur sur la boucle en activant l'indexation. tu te retrouve ainsi avec un tableau de tes positions de curseurs.
    Je te joint un exemple pour que tu comprenne mieux...
    Attachments:
    position de multiples curseurs.vi ‏43 KB

  • Write 32 channels thermistor data (temp in degree vs date/time) into xls file for all channels continuously.

    i am acquiring 32 channels thermistor data (temp in degree vs date/time) in waveform plot using array to cluster function  ,
    now my problem is how to write this data  into xls file for all channels continuously.
    please help me at the earliest & i am new to Labview.

    Hi Priyanka,
    Writing to excel file continuously is not a good idea, you can use ".CSV" or TDMS file format and once data acquisition is completed you can convert that to excel file using report generation toolkit.
    With Regards
    Miraz
    Kudos is better option to thank somebody on this forum

  • Photoshop CS6 - Spot channels are not saved correctly in the psd files.

    Hi,
    I'm using Photoshop CS6 and something happent a few days ago....some Windows or Adobe update messed up everything...I don't know...
    Here's how things are.
    If I add to an image a couple of new spot channels (any Pantone color) and remove the informations from the CMYK channels (or not-the problem it's there anyway), I should have an image with 6 color plates (CMYK and the 2 Pantone). It doesn't happened anymore...
    I'm using Corel to print the files and the previous saved files are fine, I have all the Spot colors there. Now, If I edit any file I've worked on before, and save it again, the spot colors dissapear when I'm importing the psd file in my Corel document. And if there is no information on the CMYK channels, I'm getting a blank image...
    I hope someone will give me some ideas because I don't know what to do anymore...
    Codrut

    Right. It's not reading these new saved files correctly. The old ones are fine.
    I forgot to mention one thing. I've got this CS6 as an upgrade and I still have the CS5 one running on the same computer. The CS5 version does the same thing...
    Today I tryed again to open a PSD (CS6) with another CS5 version from another computer and came with an error message "Could not complete your request because the specified color book cannot be found". And the file didn't opened....
    Who messed up my color book and how can I fix it?

  • DECODE function to validate date value and sort the records

    Hi Friends,
    I am looking for some query which can give me the required output,
    I need to do this using SQL query only and I have tried using the MIN() and MAX() functions it was working fine with limited data, now after inserting the last record(in the below table) which has date for start_range and end_range in(mm/dd/yyyy hh24:mi:ss) format.
    Because the data type is VARCHAR2 if I am using the MIN() function it is sorting as a string value, hence the min date is incorrect. I tried using validating the value to date or non date and tried to using MIN() and MAX() functions using the DECODE function, I am getting this error "ORA-01840: input value not long enough for date format".
    select table_name,
    DECODE(substr(START_RANGE,3,1)||substr(START_RANGE,6,1)||substr(START_RANGE,11,1)||substr(START_RANGE,14,1)||substr(START_RANGE,17,1),'// ::',
    to_char(min(to_date(start_range,'mm/dd/yyyy hh24:mi:ss')),'MM/DD/YYYY HH24:MI:SS'),min(start_range)) MIN_RUNS_START_RANGE,
    DECODE(substr(END_RANGE,3,1)||substr(A.END_RANGE,6,1)||substr(END_RANGE,11,1)||substr(END_RANGE,14,1)||substr(END_RANGE,17,1),'// ::',
    to_char(max(to_date(END_RANGE,'mm/dd/yyyy hh24:mi:ss')),'MM/DD/YYYY HH24:MI:SS'),max(END_RANGE)) MAX_RUNS_END_RANGE
    from MY_TABLE
    GROUP BY table_name,
    (substr(START_RANGE,3,1)||substr(START_RANGE,6,1)||substr(START_RANGE,11,1)||substr(START_RANGE,14,1)||substr(START_RANGE,17,1)),
    (substr(END_RANGE,3,1)||substr(END_RANGE,6,1)||substr(END_RANGE,11,1)||substr(END_RANGE,14,1)||substr(END_RANGE,17,1))
    Can sombody please advise what is the best way I can query this data with the required output.
    The following are the source table and records and the out put records using the sql query.
    MY_TABLE
    TABLE_NAME(VARCHAR2),START_RANGE(VARCHAR2),END_RANGE(VARCHAR2)
    TABLE1,1000,10000
    TABLE2,ABCD,EEEE
    TABLE3,01/12/2010 00:00:00,12/31/2010 23:59:59
    TABLE1,10001,20000
    TABLE2,EEEF,GGGG
    TABLE3,01/01/2011 00:00:00,01/31/2011 23:59:59
    OUTPUT :
    TABLE_NAME,MIN(START_RANGE),MAX(END_RANGE)
    TABLE1,1000,20000
    TABLE2,ABCD,GGGG
    TABLE3,01/12/2010 00:00:00,01/31/2011 23:59:59
    Thanks
    Kalycs

    i also think this is a very bad table design ...
    but if you are not able to change it, you could split the select (date and non-date data) and combine the result with UNION like this:
    with t as
    SELECT 'TABLE1' table_name,'1000' start_range,'10000' end_range FROM dual UNION
    SELECT 'TABLE2','ABCD','EEEE' FROM dual UNION
    SELECT 'TABLE3','01/12/2010 00:00:00','12/31/2010 23:59:59' FROM dual UNION
    SELECT 'TABLE1','10001','20000' FROM dual UNION
    SELECT 'TABLE2','EEEF','GGGG' FROM dual UNION
    SELECT 'TABLE3','01/01/2011 00:00:00','01/31/2011 23:59:59' FROM dual
    SELECT table_name,
           TO_CHAR(MIN(TO_DATE(start_range, 'MM/DD/YYYY HH24:MI:SS')), 'MM/DD/YYYY HH24:MI:SS'),
           TO_CHAR(MAX(TO_DATE(end_range, 'MM/DD/YYYY HH24:MI:SS')), 'MM/DD/YYYY HH24:MI:SS')
    FROM t
    WHERE start_range LIKE '%/%/%:%:%'
    GROUP BY table_name
    UNION
    SELECT table_name,
           MIN(start_range),
           MAX(end_range)
    FROM t
    WHERE start_range NOT LIKE '%/%/%:%:%'
    GROUP BY
        table_name;
    TABLE_ MIN_VALUE           MAX_VALUE
    TABLE1 1000                20000
    TABLE2 ABCD                GGGG
    TABLE3 01/12/2010 00:00:00 01/31/2011 23:59:59

Maybe you are looking for

  • How do i add cents to a $amount in a table?

    i am trying to create an invoice in numbers and the table is set to round up and doesn't allow for decimals. How do I fix this?

  • Imix rating still not working

    Win XP, itunes 7.0.1, brand new dell c521 with latest drivers, obviously clean install. Italian itunes store. Same issue as with previous pc: imix rating screwed up. If I rate an imix 5 stars, it turns out to be 1. Anything from 4 stars to 1 gives a

  • Error Business Server Page (BSP)

    Hi. I am new to BSP. I have a Z_CRM_IC application and I am traying to create a new page to display into a pop-up window. I created a new page with flow logic type, and I include in iRecReason.htm a javascript function that open a pop-up window and a

  • Faking Drag&Drop operation to external application

    Hello, a rather complicated issue. in my program i have a JTable, and i can drag&drop from this jtable to external programs like windows explorer by clicking the mouse and moving it from the table to the external program. how can i reproduce this exa

  • M10-broke? Wireless down, but cable up...

    Bought M10 April 2010 and thought my router needs were supplied for many years.  But today, I have no wireless Internet, but a cable connection still gives Internet access. I've tried reset button, powered down/up both DSL modem and router... --> no