Store to file and backup at same time

Hello!
We have a very well working measurement software written in LabView. However we would like to backup the data files regularly. We want to be able to do this even during measurement and while the software is writing to the files. Now when we try to do so, we occasionally face "Error 5 occurred at Open/Create/Replace File" (in "Write To Spreadsheet File") because another software (backup, windows stuff, else...) accesses the files also. Now from my point of view this kind of concurring file access should not be a problem since LV is the only software writing to the files. There are 3 possible solutions I can think of:
delay the write (not feasible since you don't know how long to delay, e.g. how long the other software stays open)
queue the data and write it on next try (e.g. https://decibel.ni.com/content/docs/DOC-7212 - but again; how long to queue?)
the proper thing is; copy the file to a temporary one, edit the temporary, delete the original and move the temp. in this place
the last one should be the proper solution and also work on different OS since the copy/moving stuff should be atomic operations and thus safe in this context. However I implemented the solution and still have exactly the same problem but now in "Move File"... I am starting to doubt if it is possible to solve this issue at all and thus desparatly need help here! As I can see there is not lock or mutex on the file and no need for LV to raise an error (I think it is done as warning for future possible conflicts)... I assume it is some hidden/strange badly documented Windows API "feature" LV is using to detect those other accesses and it results in a behaviour I cannot change or fix - so what to do here...?
Thanks a lot in advance for any helpful suggestions or hints! Greetings
Ursin Solèr
Solved!
Go to Solution.

I Think you must have missunderstood me; the problem is you cannot open and write to a file while another external program has it opened too with exclusive access. Consider following code:
If you open the file during the "Wait" (it is closed then because "Write to Spreadsheet" does open, write, close) e.g. with MS Word wich does an exclusive open (allowing exclusive access only) then during the next loop your program will crash with error 5.
The solution I mentioned is to open it first in LV an keep it open all the time:
which prevent e.g. MS Word to open it exclusively but read-only!
What you mentioned is regarding a backup - I considered this double write long before, but it is no good solution, beacuse e.g. the other drive might be a network drive and I don not want to handle absent drives - that's something the external backup tool should do.

Similar Messages

  • Why do I get a NI-488 error massage when writing into a file and at the same time copiyng this file with a backup softwarre like Easy2Sync?

    I have a small LabVIEW program which writes random numbers very fast into a ASCII-file. I want that file to be copied to a new position every 10 min. Therefor I use a backup/synchronisation software which is doing a copy operation every 10 min. It works fine a certian amount of time and after a while I get either an LabVIEW error (LabVIEW: Fiel already open: NI-488 Comand requieres GPIB Controller to be System controller) or an backup-software error (couldn´t open file...whatever). I´m guessing, it has something to do with file-access but I don´t know why?!? If I run the LabVIEW program and I copy and paste the random-number-file with the windows explorer very fast (pressing ctrl+v rapidly) while LabVIEW is still writing into this file, no error appears. Can sombody help me?
    LabVIEW 2011

    Hi Serdj,
    you don't get a GPIB error, the error number has just 2 different explanations...
    Well, you have two programs accessing the same file. One program just wants to make a copy, the other (LabView) is trying to write to the file. When copying a file that is written to you get inconsistent results! That's why one of both programs is complaining an error...
    You can't have write and read access at the same time! (But you can have more than one read access at the same time...)
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Show RMAN  message in log file and screen at same time

    Is there any way I can save all RMAN message in a log file and also show on standar out (screen).
    Thanks

    Hi,
    You can try a shell script like this if you are using linux:
    #!/bin/sh
    # Name: test_backup
    # Author: Tad_cs
    # Description: Executes backup using the RMAN
    export ORACLE_HOME=$1
    export ORACLE_SID=$2
    export LOG_DIR=$3
    # Variables:
    SCRIPT="test_backup"
    data_log=`date '+%y-%m-%d_%H:%M:%S'`
    logfile=${LOG_DIR}/${SCRIPT}-${data_log}.log
    # Execution of script backup of rman:
    $ORACLE_HOME/bin/rman <<EOF > $logfile
    connect target rman/rman
    connect catalog rman/rman
    run { execute script test_backup; }
    EOF
    exitSo, While the script is performing, you can open other screen, search for
    the log that is generating, and see the contents using:
    tail -f log_file_name.logIs this you need?
    []´s

  • Convert to DNG and Backup at same time

    I have not been able to figure out how to do this ...
    I'd like to import my NEF files and do the following
    1) Import NEF files as DNG
    2) Backup converted DNG files (don't need the NEF)
    3) Be able to specify the Exact folder used for the backup.
    (I know how to backup the NEF files to a LR specified subfolder)

    Does any know ?

  • Is it possible to record and play at same time in swift, is there a option to record without storing the file

    I am making a microphone, is it possible to record and play at same time in swift, is there a option to record without storing the file

    Its pretty simple with FMS. You just need to do following things:
    Publish using FMLE with following settings: (just telling which are needed , rest you configure based on your needs)
    Video codec: H.264
    Audio Codec: <of your choice>
    Server ip: rtmp://<server-uri>/<app-name>
    Stream Name: mp4:<stream-name>.f4v
    Application : Server-side code
    application.onPublish = function(myclient,mystream){
         mystream.record();
    application.onUnpublish = function(myclient,mystream){
         mystream.record(false);
    Have a client , which subscribes in following live mode:-
    ns.play("mp4:<stream-name>.f4v",-1,0,true);   // this is subscribing in live mode
    In this way even if file is recorded, your clients are subscribing in live mode so all will be in sync.
    Now if you want to disallow any clients who will try to subscribe to "recorded" file when live event is going on, you can achieve using auth adaptor. (let me know if you want to enforce such requirement)
    But i think above solution solves your primary problem. Also please let me know if there are any issues in getting it work , i have given bare minimum which is required.

  • How do you import a .png file into the Final Cut Pro X and at the same time keep the file's original transparency settings?

    How do you import a .png file into the Final Cut Pro X and at the same time keep the file's original transparency settings?

    Go to the Info inspector for the still image and in settings select the alpha type.

  • HT1178 Can you backup to same time Capsule with PC and Mac

    How do I backup to same Time Capsule with both PC and Mac

    - backup iMac to TC and hook up HD to USB port on TC to backup PC laptop
    Hmmm not better IMHO.. as long as you disk image the TC.. and the amount of space you have far exceeds total usage on both computers.. For the TM backup on the Mac you want TC area to be at least 3x the used space on the drive.. leaving out VM or bootcamp partitions if you use them.
    Plus enough space to back up the PC laptop a couple of times over.
    USB hard drive is fairly slow.. but should be ok for backup over wireless.. just be aware you cannot unplug the USB drive and use it direct unless you format it FAT32 which is very poor format. So first backup is going to be slow.
    - backup iMac directly to HD thru firewire and backup PC to HD hooked up to Airport Extreme
    If you don't already have a TC then this is fine. Firewire local disk is much faster than network backup even over gigabit.
    Any of your options would work ok.. doing disk image on the TC is most difficult to get working and limits the hard disk space. Balance out what you already own network wise with what you need.. there are plenty of routers now with USB ports that will deal directly with windows using NTFS.. if you end up using firewire local disk to the imac..

  • Is it possible when saving the psd file to have an automatic jpg file saved at the same time?

    My work involves preparing images for printing lightboxes and window installations.  My clients require to pre-approve the photos before printing.
    I usually save my files as psd but since the files are very large in this format I usually save another copy as a jpg file that has a much smaller file size.  This makes it possible for me to add these to a presentation and and send them to my client.
    Is it possible when saving the psd file to have an automatic jpg file saved at the same time?  Or do I still have to do this manually?

    If you save the document manually as a PSD file in Phtoshop not from within an Action, Script, Plugin or Droplette.  You may be able to write a Photoshop that would do as save as Jpeg,  And you should be able trigger its execution by setting up a Script Save event using the Script event manager.  When You do a manual save  the script should be triggered.  I wrote may be able to for I have never tried to write that script or set up a Script Manager Save event.  I have only use open events.

  • How to collect form responses in adobe formscentral and at the same time receive form responses through email

    My client wants to have the form that I created in FormsCentral to be able to collect email responses. So to do this, I downloaded the form as PDF then imported it into Acrobat. I created a button in Acrobat (this will be for the email response part). I used this script for that function:
    // This is the form return email. It's hardcoded
    // so that the form is always returned to the same address.
    // Change address on your form to match the code below
    var cToAddr = "[email protected]"
    // First, get the client CC email address
    var cCCAddr = this.getField("ClientEmail").value;
    // Now get the beneficiary email only if it is filled out
    var cBenAddr = this.getField("BennyEmail").value;
    if(cBenAddr != "")
    cCCAddr += ";" + cBenAddr;
    // Set the subject and body text for the email message
    var cSubLine = "Form X-1 returned from client"
    var cBody = "Thank you for submitting your form.\n" + "Save the filled form attachment for your own records"
    // Send the entire PDF as a file attachment on an email
    this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody});
    I got it from here: http://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address
    I'm still kinda not sure how it works but I'm getting the idea. Now what I'm having trouble with is, how do I make it so that the user will be required to click on the scripted button and at the same time, also click on the FormsCentral's generated submit button? Because as I see it, the user can click on the scripted button but they can just close out the form without submitting it to FormsCentral.
    Is there any way to make my idea work?
    Any help is very much appreciated!
    Thanks!

    I do not know or have time right now to look up NDP format.
    To write to NTFS from Mac, you need a driver.
    And to write to HFS from Windows also.
    I strongly recommend Paragon drivers for both.
    That way you can access anything from any platform.
    Paragon Software for Mac

  • How can I copy documents from a Sharepoint On Premises library to a Sharepoint Online library and at the same time preserving their metadata?

    How can I copy documents from a Sharepoint On Premises library to a Sharepoint Online library and at the same time preserving their metadata?
    I use the Open Explorer Windows to drag and drop the files, but the metadata are not copied. Thanks.

    To maintain the metadata you'll need to use one of the third party tools that does this kind of migration.  Metalogix has a product with a free trial that we have used before.  (Don't remember whether the free version maintains metadata or not).
     You can read about it here:
    http://www.metalogix.com/Products/Content-Matrix.aspx
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Want to update a text file and reflect the same on iview immediately

    Dear friends,
    I have a text file in a repository path
    I could read each line and do some task.
    My query is for each line task, i would like to update a file (for me it is log file) and reflec the same on a iview in the same page
    sample code appreciated
    regards
    Kantha

    If the user backs up their device to either iCloud or Mac/PC, they can restore the app data from that backup.
    There's no need to do what you intend.

  • Hi everybody,please someone help me,i had a 3gs last year and i bought a 4,but itunes doesn't synch videos from photos file and it crashes,every time i try to synch photos it stacks when videos try to synch and crashes,what to do please?

    hi everybody,please someone help me,i had a 3gs last year and i bought a 4,but itunes doesn't synch videos from photos file and it crashes,every time i try to synch photos it stacks when videos try to synch and crashes,what to do please?

    hi i had the same problem today when i updated my itunes to latest version. however, i have just found my songs in the 'itunes media' folder. this was accessed through 'my music'  then keep clicking through until you find itunes media and all my library songs were in there and i then just added these files to my library and all were restored however, i have lost all my playlists but at least my 700 songs are back. very dissapointed with apple that they have let this happen with their latest update, the previous version was miles better than this one . hope you find them. stevo

  • CS3 Camera Raw Too Many Files Open at the Same time alert!!!

    Please help me. I keep getting this error message in Camera Raw that says there are too many files open at the same time - but I only have 100 open:( Please help - I was getting this error with CS2 and thought upgrading to CS3 would fix it and it didn't!!!

    > "10 or 100 - you can quickly go through a stack of images in ACR and make any desired changes you want. Whether making the same or similar adjustment to similar files, or making radically different adjustments to different images as appropriate".
    I've done this with far more than 100! I think my maximum is 425 raw files, invoking ACR from Bridge without Photoshop even loaded, and it worked well. (I've also done 115 JPEGs in order to crop them under extreme time constraints).
    It can be very slick. For example, if I use a ColorChecker a number of times in a shoot, it is easy to select just the set (perhaps 100 or so) that a particular ColorChecker shot applies to and set the WB for all of them.
    Furthermore, in case people don't know, you can set ratings on raw images while many of them are open in ACR. (Just click under the thumbnail). It isn't as powerful as Lightroom, but it is not to be dismissed.
    I suspect that it is possible to apply sensor-dust-healing to lots of images in the same way, and certainly it is easy to apply presets based on various selections.
    Perhaps with AMG (Adobe Media Gallery) it will be sensible to use the above capability to process 100s of raw files, then create a set of web pages for the best of them, in not much more time than it would have taken in Lightroom. I judge that Lightroom is the "proper" tool for the job (perhaps after 1.1!), but Bridge+ACR can go a long way.

  • I cant use photoshop and illustrator in same time....

    Hello!
    I have CS3 and i´ll try run photoshop and illustrator in same time. If i run first photoshop then illustrator not work and if i run illustrator then photoshop not work. :-/ What i pose to do??
    PC:
    AMD FX (Six-core)
    Memory 8G (XP 32bit -> ~4G)
    Thanx anyway!

    Read this probably the scratch disk you haqve is too full, and you will have to select a scratch disk that is not fragmented and has plenty of room to work. The scvratch disk is storing the various undo states for both Photoshop and Illustrtor.
    Illustrator has unlimited undos so that takes up a lot of scratch space if you do complex art work with many points being employed to create the art and Photoshop will do the same if you are using very high resimages with many layers.
    And in 32 bit the amount of RAM is limited which puts a strain on the scratch disk so it has to bve very large if you want it to work for you.
    This is what I recommend to you go 64 bit get another 8 GB of Memory at least and get a hard drive you can use as a swcratch disk that will not have any files on it or that you can partition to have a large amount of free space.
    You will have to read a little bit but you can start here:
    http://helpx.adobe.com/photoshop/kb/optimize-performance-photoshop-cs4-cs5.html#main_Memor y_Usage
    I am on a Mac myself and have 24GB of memory and feel I could still use anoter 8GBs but I do some motion graphics as well.
    Nut if you do a lot of Illustrator and Photoshop that can be just as big a drain on your resiources.

  • Delete records in a table and at the same time print out for reference

    I am working on a req to delete some records from a table and at the same time, record/print the deleted records in the outstream (DBMS_OUTPUT.PUT_LINE)
    DECLARE
    v_rec_po hst_po%ROWTYPE;
    BEGIN
    DELETE FROM hst_po po
    WHERE abbrpoid = '&opportunity_code'
    AND updatedby = (SELECT employeeid
    FROM tes_employee
    WHERE name = &emp_name)
    AND audittimestamp BETWEEN TO_DATE ('&start_timestamp',
    'DD-MON-YYYY HH24:MI'
    AND TO_DATE ('&end_timestamp',
    'DD-MON-YYYY HH24:MI'
    END;
    I was thinking of using returning into and then using DBMS_output to pull out the delted records, but there will be multiple rows deleted fro this statements. I am stuck here..Can anyone help

    How about:
    SQL> create table t
      2  (x int)
      3  /
    Table created.
    SQL> insert into t
      2  select rownum
      3    from all_objects
      4   where rownum <= 10
      5  /
    10 rows created.
    SQL> declare
      2     cnt pls_integer;
      3  begin
      4     delete from t;
      5     cnt := sql%rowcount;
      6     dbms_output.put_line ('Removed: '||to_Char (cnt));
      7  end;
      8  /
    Removed: 10
    PL/SQL procedure successfully completed.Edited by: Alex Nuijten on Jun 4, 2009 8:58 AM

Maybe you are looking for

  • To do in Mail from emails to my btopenworld (btinternet) address

    I get btopenworld (btinternet) emails into Mail but cannot create a "to do" from them - says i have to add the selected account to iCal which i think i've done even though i don't want/need a link with the BT Yahoo calendar - but it still doesn't wor

  • Reg: How to know name of server in which ejb is deployed

    Hello: Can anyone tell me what the best way to know the name of the server in which ejb is deployed inside bean class. Thanks, Vijay

  • Cannot Edit a Picture in Elements9!

    Every time I try to open and edit a picture (specifically using a raw file in camera raw) after double clicking on it to open it, I get this message, "could not complete your request because of a program error" I have tried over and ove again and it

  • IPhoto 4.0.3 - Sharing Error

    Hi. For a while now I have been getting the following error message when I start up iPhoto - "SHARING ERROR Other users will not be able to access your shared photos because port 8770 is being blocked by your firewall software. Please disable the fir

  • I have created two tables for my new  report under one transport request.

    Unwanted table transported I have created two tables for my new  report under one transport request. But I only need one table and the second table I was supposed to delete. However by mistake, with out deleting the second tableu2026 the transport re