Write to excel file slows down reading voltage channels

Hi all,
I read in input voltage data using PCI 6143 throught finite sampling. This VI is supposed to, for example, after acquiring 240 samples, I write all collected voltages to an excel file. Before I write the data into excel, I need to re-arrange the data array. This re-arranging task takes up quite a significant amount of time (about ~30ms). Hence, the 2nd batch of 240 samples collected is only done after arranging data and writing to file.
Hence the process will be like, 0.9milli sec of data, wait 30milli sec, 0.9milli sec of data, wait 30milli sec and so on.
So is it possible to pass this huge chunk of data to another VI, specifically doing the data manipulation and writing to file while the main VI continue collecting the voltage data without data losses?
Does anyone have any suggestion by which mean am I able to do this?
I saw a nice example in LV 7.1 example finder-> optimizing applications synchronizing tasks->Pass Data with Notifiers.vi
Is this notifier method the solution to my problem or is there some other means to achieve the results?
Thanks everybody!
Best regards,
Dick

Hi Dick,
I have some question you set the Sample Mode to Finite samples, why. If you do this you will miss samples!
You start and stop the tasks every iteration, this will cause great wait times
You can move the constat vi's outside the while loops.
If you use continious samples you have to wire up the samples per channel to the ai read vi.
If i profile the VI I see that voltage data-constants takes 3.6 ms of time (average).
Also you should open the file outside the while loop and use the array to to spreadsheet string vi and write to text file to write the data. Successfully close the file after the while loop.
In general opening/starting/closing/ending should not be done inside a repetative loop.
It looks to me that 'voltage data constants.vi' generates an spreadsheet string from the data with a time column added.:
this can be done like this:
EDIT:Also you'r vi will 'remember' all the previous string and adds these together. If you don't want this initialize the shift register with an empty string, i missed the 'firstrun' case, but it is still better to initialize the shift register correctly, or you can connect the iteration number straight to the switch case
Ton
Message Edited by TonP on 09-28-2006 11:34 AM
Message Edited by TonP on 09-28-2006 11:45 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!
Attachments:
Example_BD.png ‏2 KB

Similar Messages

  • Write an excel file using File adapter

    Hi,
    I have a scenario in which i have to write an excel file in the target system.
    I tried creating a tab delimited file conversion and just named the file as .xls.
    When i saw the output file it did look like a excel but a report that i have written to read a excel file cant read it.
    The report says 0 records found. It works for other excel sheets that are created manually.
    So will this method noit work for creating excel files?
    Is using the jexcel api the only option for this?

    Have u had a chance to see this excellent blog by shabarish...
    chekc this
    /people/shabarish.vijayakumar/blog/2009/04/05/excel-files--how-to-handle-them-in-sap-xipi-the-alternatives
    http://wiki.sdn.sap.com/wiki/display/XI/CODE-CreateanExcelFileviatheJExcel+API

  • Write to excel file (into AL11 directory)

    Hi,
    I am able to loop an internal table and write to csv file in AL11 directory.
    But how to write to excel file instead of csv file. And how to format the excel file (for example, column B should be format to numeric and column E should format to date format), and are we able to put like red color on column C for example?
    Thanks in advance.

    Hi,
    You need to add the tab inbetween all the fields of internal table and upload to application server using
    OPEN DATASET
    TRANSFER
    CLOSE DATASET.
    to add the tab inbetween the fields..you can use this code....
    concatenete itb-field1 itab-field2......... into string seperated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    one exception whicle uploading data to the Application server you need to convert dec or currency field to char type otherwise it will give you short dump.

  • Why does Acrobat Pdf converter file slow down my 2003, Windows  Word Program.  I only experience this problem when i convert a pdf file to a doc file.

    Why does Acrobat Pdf converter file slow down my 2003, Windows  Word Program.  I only experience this problem when i convert a pdf file to a doc file.

    Hi Bill -- thanks for your reply!
    When I check the Document Properties on Acrobat I can see that the fonts used in the document (Cambria, Times and Windings) are listed as "Embedded Subset" in the Fonts panel. The machine it was created on did use an earlier version of OS X and an old version of Word, but it seems to have the proper fonts...
    -nick

  • Read/Write MS Excel file in Java

    Hi,
    I want to read Excel file & displau excel sheet data on HTML format.
    I was tried with POI.
    But i m now aware with POI.
    thanks in advance.

    Greetings.
    As I know, POI is one of the best solutions in this direction. You may try some other packages listed on http://schmidt.devlib.org/java/libraries-excel.html.
    Sincerely,
    wanderlust

  • Write measurement to file slows data presentation

    I am sampling a light sensor at 1000Hz, and displaying the value using a waveform chart, and outputing to a file (using Write measurement to file), using a boolean.  Whenever i activate the write to file module, the acquistion rate slows down (i.e. I see the waveform propogate much slower). Has anyone else had this problem? Any solutions?

    Hi:
         Yes. We refer to low level vis as in programming languages. As higher the level, more "luxury" we give to the user, everything is done in a few steps, in a single step if possible. Low level ones do single tasks at a time: Open file, read file size, read some bytes of data (not the entire file), close the file, etc. etc. These instructions, even more troublesome for many people, gives you more control over the process. I'm attaching 2 files, one is a vi with some of LV menu vis which perform these smaller tasks (sorry it's in LV5, but any later version of LV you have, you would be able to open them), the other file is just a picture of the screen with the menus where those vis are (sorry again it's LV5, but you must be able to locate the corresponding menus in your version of LV).
         Good Luck.
    Attachments:
    Saving.vi ‏30 KB
    Saving.jpg ‏167 KB

  • How do I write an excel file and check what the next empty column would be to put the data in?

    I have somehow managed to write the portion of labview that prompts the user for a name. It checks a file to see if they are a new user or not and then assigns a number if they are. The program then acquires data that is to be put into a spreadsheet. Each subject will have ten trials which will have three columns. How do I get the information into the columns and then check each time to see which column it should go into (i.e. the next empty column for that subject). I have attached what I have thus far. I wrote this a long time ago and haven't touched it for some time so everything is a blur.
    Attachments:
    promptForSwimmerName.vi ‏76 KB
    Swimmers.dat ‏1 KB
    Main__dummy.vi ‏28 KB

    To perform those operations in excel you will use ActiveX. I will attach some examples of using Excel in LabVIEW and you can use these to do exactly what you want.
    These three examples show how to manipulate properties, write to excel and read from excel. Let me know if there is more I can do.
    Allan S.
    Applications Engineering
    National Instruments
    Attachments:
    BorderExample.vi ‏102 KB
    ActiveX_write_Rows_To_Excel2000.vi ‏90 KB
    ReadExample.vi ‏80 KB

  • Some thing in my code causing excel file to be READ-ONLY

    Hello:
    I am pretty certain problem is caused by left bottom part of the picture, but I am not sure why.  The software basically write a header to a .xls file at start called XXX-peak.xls, at every cycle I read everything from the .xls, do some array manipulation modify 2 columns to the last row and rewrite the whole thing back to the same file.  I originally thought perhaps I left the file unclosed after an access but I think that would cause an error, besides,  all the read/write file VIs have file close features inside of them.  If someone could give me a quick diagnostic, it would be great!
    JC  
    Attachments:
    snapshot1.jpg ‏3779 KB

    First of all, you're not reading or writing any files in Excel (*.xls) format. You're reading and writing plain ASCII spreadsheet data. (The fact that Excel will try its best to parse the content when you later try to open it with excel does not make it an Excel file ).
    It is not obvious from the picture where the problem is, especially since we don't see the code in all the other cases and you read your filename via a value property. Where else is the file name used? It might be more efficient to open the file once, then use low-level file I/O to read from it and write back to it at desired offset location without ever closing the file during the run of the program.
    Why don't you attach the actual VI so we can better see what you're doing?
    LabVIEW Champion . Do more with less code and in less time .

  • Write to Excel file in KM Folder with DynPage

    Hi,
    I want to create and read/write to a Excel file in KM Folder using DynPage.
    Searched the SDN but could not get any links which will demo on using excel with Dynpage. Lot of links to use excel with WebDynpro are available.
    Can anyone give the code or links for this purpose.
    Regards
    Sumant

    Hi,
       May be we can expect a blog for this too.. Actually, it is not very different. You can use the same blog for your purpose.
    Uploading files to KM repository using Webdynpro APIs
    Creating folders in KM dynamically
    Here the code can be written in doContent or doProcessBeforeOutput method. Import the required jars. References can be written in SharingReferences in application-config of portalapp.xml. Otherwise, the same code should work in portal application too.
    Regards,
    Harini S

  • What is the best way to read, process, and write an Excel File Server side...SQL Server Agent Job

    So I was using dynamic Excel commands to open and save as using...
    Microsoft.Office.Interop.Excel.Application
    and
     workbook.SaveAs(StringDestinationFile, XlFileFormat.xlExcel8, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    which worked all fine and dandy client side. Then when I attempted to create a SQL Server Agent Job, this failed as a result of SQL Server side not being able to execute dynamic Excel commands.
    So do I need to therefore try and do this function via Microsoft.ACE.OLEDB.12.0 commands? And where can I find the commands and syntax to open and save as? I have to Open a .xlsx file, save it as a .xls file, and then open this newly created .xls file and
    then save it as a .csv file.
    Thanks for your review and am hopeful for a reply.
    ITBobbyP85

    I think you might be over complicating things.
    You can use SSIS with Excel Source/Destination connections to read in, or output to an excel sheet/file.

  • Binary write to file slowing down my program

    I have noticed this more on some types of computers, but I have two threads going.  One that captures 10MB images and queues them, and another thread that dequeues them and appends to a binary file.
    If I disable the write to file, program chugs along well.  Once enabled, I noticed that the image capturing begins to act sluggishly, almost in sync with the writing to hard drive.  I have tried changing the write loop priority to the lowest as well.
    It isn't holding up at the queue/dequeue step either.  Any pointers on what to try?  I'm almost certain that there is a memory sharing issue where one process is writing to 10MB image to memory, while the other is reading a 10MB image from memory, and this is tying things up.

    dre99gsx wrote:
    The main VI which hosts both of these loops is setup as User Interface
    There's the problem, I think. The user interface subsystem is special - it's a single thread. This is required for certain things (interactions with the operating system and user interface, some external DLLs and ActiveX components) that require a single thread. In general, don't run your code in the user interface system unless you have a specific reason to run it there. As an example, property nodes that refer to front-panel items cause a switch to the user interface thread, so if you have VI that uses a lot of references to update the front panel, that VI should run in the UI system. In your case, if you switch your main VI to Standard and leave the subVIs set as Same as Caller, I think you'll see a similar speed improvement. There's more information about LabVIEW threading here, although that information is slightly out of date; if I remember correctly (couldn't find the reference in a quick search) LabVIEW now allocates as many threads per system as there are processor cores in your CPU, but not less than 4 per execution system with the exception of the user interface.

  • NFS write performance 6 times slower than read

    Hi all,
    I built my self a new homeserver and want to use NFS to export stuff to the clients. Problem is that I get a big difference in writing and reading from/to the share. Everything is connected by GBit Network, and raw network speed is fine.
    Reading on the clients yields about 31MByte/s which is almost the native speed of the disks (which are luks-encrypted). But writing to the share gives only about 5.1MByte/s in the best case. Writing to the disks internally gives about 30MByte/s too. Also writing with unencrypted rsync from the client to the server gives about 25-30MByte/s, so it is definitely not a network or disk problem. So I wonder if there is anything that I could do to improve the Write-Performance of my NFS-shares. Here is my config which gives the best results so far:
    Server-Side:
    /etc/exports
    /mnt/data 192.168.0.0/24(rw,async,no_subtree_check,crossmnt,fsid=0)
    /mnt/udata 192.168.0.0/24(rw,async,no_subtree_check,crossmnt,fsid=1)
    /etc/conf.d/nfs-server.conf
    NFSD_OPTS=""
    NFSD_COUNT="32"
    PROCNFSD_MOUNTPOINT=""
    PROCNFSD_MOUNTOPTS=""
    MOUNTD_OPTS="--no-nfs-version 1 --no-nfs-version 2"
    NEED_SVCGSSD=""
    SVCGSSD_OPTS=""
    Client-Side:
    /etc/fstab
    192.168.0.1:/mnt/data /mnt/NFS nfs rsize=32768,wsize=32768,intr,noatime 0 0
    Additional Infos:
    NFS to the unencrypted /mnt/udata gives about 20MByte/s reading and 10MByte/s writing.
    Internal Speed of the discs is about 37-38MByte/s reading/writing for the encrypted one, and 44-45MByte/s for the unencrypted (notebook-hdd)
    I Noticed that the load average on the server goes over 10 while the CPU stays at 10-20%
    So if anyone has any idea what might go wrong here please let me know. If you need more information I will gladly provide it.
    TIA
    seiichiro0185
    Last edited by seiichiro0185 (2010-02-06 13:05:23)

    Your rsize and wsize looks way too big. I just use defaults and it runs fine.
    I don't know what your server is but I plucked this from BSD Magazine.
    There is one point worth mentioning here, modern Linux usually uses wsize and rsize 8192 by default and that can cause problems with BSD servers as many support only wsize and rsize 1024. I suggest you add the option -o wsize=1024,rsize=1024 when you mount the share on your Linux machines.
    You also might want to check here for some optimisations http://www.linuxselfhelp.com/howtos/NFS … WTO-4.html
    A trick to increase NFS write performance is to disable synchronous writes on the server. The NFS specification states that NFS write requests shall not be considered finished before the data written is on a non-volatile medium (normally the disk). This restricts the write performance somewhat, asynchronous writes will speed NFS writes up. The Linux nfsd has never done synchronous writes since the Linux file system implementation does not lend itself to this, but on non-Linux servers you can increase the performance this way with this in your exports file:
    Last edited by sand_man (2010-03-03 00:23:23)

  • Can you write an excel file on client machine instead of on the server

    I am trying to user cfSpreadSheet functon. The first question I have is, can you write the file on a client machine? I tried but they all end up on the server drive. Scecond question, is there a way to do row and column range formating in CF9.0? SpreadsheetFormatCellRange function is only available for ColdFusion server version 9.01.
    Thanks.

    To expand on Dan's answer: CF doesn't have any interaction with the client browser at all: client->server comms are handled by the client and the web server; the web server simply asks CF to provide the response data if the file requested is a CF file.  But even then all CF does is process the requested file and return data to the web server.
    Also, one of the restrictions of the HTTP protocol is that that there is *no* *way* that the server can write to the client machine.  All it can do is send data to the client agent (eg: a web browser) in response to the client agent requesting it.  Can you imagine the sort of security problems one would open one's self up to if a remote web server could write to your PC????
    Adam

  • Nikon D90 image files slow down bridge...even more

    We are running windows CS3 with ACR 4.6 and all my other Nikon files are fine in bridge, but when myself or a colleague try to use any file type from the D90 bridge comes to a grinding halt. We are trying to get approval to update to CS4 but it takes a while in my company. Is the upgrade to CS4 or Lightroom the only way to fix this? I believe that ACR update 4.6 was the last one for CS3, is this true? Thanks people.

    Thanks for your response Curt. Maybe I exaggerated a lttle when i said Bridge comes to a grinding halt, it does display the images clearly and allows me to do pretty much every task i need to do but it takes around 10 times as long as with any other camera file. If i attempt anything clever like batch process or adding metadata to multiple images then it crashes. I know bridge isn't lightening fast but the difference between files from my other camers and the D90 is astounding. No I don't use a card reader, direct upload form the camera to a hard drive. and Yes it has the same effect on the jpgs and nefs. cheers mate

  • Read&write Excel file using java

    Hi everybody,
    I have an assignment about methods that read and write an excel file using java (Eclipse SDK), so if anyone know about that please post the solution as soon as possible.
    Thanks
    Sendbad

    http://onesearch.sun.com/search/onesearch/index.jsp?qt=read+write+excel&subCat=siteforumid%3Ajava31&site=dev&dftab=siteforumid%3Ajava31&chooseCat=javaall&col=developer-forums

Maybe you are looking for

  • Displaying the Attribute of a Char

    Hi All, I have to display a CHAR in the report. But that CHAR is an attribute of another CHAR. I am unable to display the attribute with out displaying the main CHAR means I have to display only the attribute and not the main CHAR i.e for ex: If I ha

  • Excel to internal table upload 'ALSM_EXCEL_TO_INTERNAL_TABLE' issue

    I am using ALSM_EXCEL_TO_INTERNAL_TABLE function module to upload the excel into an internal table. In case there is a column with no data. This function module is still populating the previous row data into the internal table Ex. if the Excel has da

  • IDT deleted by mistake

    Hi  I deleted my IDT audio by mistake and I have no sound anymore ?  I need help please  This question was solved. View Solution.

  • Automatic credit control

    We use in our company automatic credit control. For one of our customers not credit control data have been maintened (fd32) therefore there is no credit group assigned to him. When I try to make a sales order for this customer, the automatic credit c

  • Creating a function

    Write a PL/SQL function named convert_grade that calculates and returns the grade for a score passed to it as a parameter, based on the following criteria. Grade     Score A     100-90 B     89-80 C     79 -70 D     69 -60 F     less than 59 I am hav