Problem with writing in the new file every day, error #1

Hi, I have build a vi that writes data measured for each second of the file. This vi will be used for the acquisition of long-term data and I want to write the data to a separate file every day, else the file becomes

very large. The vi is supposed to work like this, first set the folder to save it and then start logging with the "datalogon" button, first write the column names in the file and after that write data

every second. If the date is the same newspaper, data, if the date is not the same write the new file name, write the column headers and write the data again every second. The date is used as the file name.

This work is quite good only at the beginning of the vi I get the message "error 1 occurred open/create/replace the file writable spreadsheet String.vi-> write to the spreadsheet (string) .vi-> NHR file -

SerialDaq - 03 APR 2013 .vi. I did some tests and it seems that in the first or the second round of the loop, the path in the annex is ' file name:------"and not drive:- and this seems to be caused by the fact

that I first write the column headers, and then the data (if I write only the data of the problem does not occur).

So I (think) for what is now the problems but don't don't know how solve it, I would appreciate it if someone could help me with this.

Regards, Martin

I made the change you mentioned and to my surprise I got the error message and also, with the vi you sent, I took look at it and found that:

-If I first enter the "folder to save the file', then run the vi and then press on the" data connect "I don't get the error.

-If I first run the vi, then enter the folder ' save file to "and the hit" the data log on ' I get the error.

I also tried with the vi original (without the connection shiftregister in the case of false and init for removal) and which gives the same result as above. If I get the

error message and choose stop the vi, start the vi again once I don't get the error because the folder in which the file is entered. This issue appears only when there is no file «»

to save the file "in the dialog box.

While I'm writing this I realize that "folder to save the file" is outside the while loop so only executed at the start of the vi is maybe I have to put it inside the while loop? A tried

This and at first, it seems that the problem is solved, I don't get the error message on my screen, but it still appears on the error handler in another part of the vi (visa series).

Oh, Yes. The 'name of the resource visa' and 'file to save the file' are both outside a while loop and are only read at the start of the vi, at the moment they have not a valid

the error value is generated.

Problem solved, thank you for your comments!

Regards, Martin

Tags: NI Software

Similar Questions

  • Problems with writing in an Excel file

    Hello

    I'm working on a program in Labview that should read the data, do it on a table and transfer in real time to an Excel file. I have already done that there is however a few problems I have week solve so I'm here to share with you and help fix them if possible:

    (1) the excel file that I use to write has some defined functions on it, used to make calculations with transferred values and whenever I run

    my program every thing on the file is overwritten even functions.

    (2) I have specify the rows/columns where I need to write (ex: begin with row 4 column C in line 20 C column and jump colum B and line 14 and 15)

    (3) the VI should be saved automatically, I did everytnig I found on the forum OR but still does not.

    I guess that's not easy to do, but I really need help so I can continue my work.

    Thank you

    MGarry


  • Problem with slides on the new Captivate 8 model objects

    Hi all

    Recently, when I created a new project model of slide objects are all too big to slide, no matter which project to choose.  I have uninstalled and reinstalled the product several times and deleted all the files about the problem but I still can't get it to work.

    Sizing wrong.PNG

    You can see here that the objects are all larger than the slide behind it, which leads to the items ending on the side when projects are published and in preview.

    When I try to do a sensitive issue I get the opposite problem with the objects being much too small as shown here

    Wrong.PNG

    If anyone has had this problem >

    "All files"? Are you sure that you deleted the Layouts folder in public documents and updated the Preferences folder? The screenshot shows one of the default themes, you have customized this theme? It happens with all the themes?

  • Problems with export/save the text file in Indesign

    Hi scripters,.

    I have a problem that I don't know how to solve.

    InDesign CS3, Mac and PC - seen as the problem on some Macs, not all, but some still have / get this error.

    I made a script that collects the text of some managers of related texts:

    for (var i = 0; i < myMainList.length; i ++) {}

    var curTF = myMainList [i];

    while (curTF! = null) {}

    myExportString += curTF.contents;

    curTF = curTF.nextTextFrame;

    }

    myExportString += "\n\n###\n\n";

    }

    alert (myExportString);

    It collects the text and also it will display ok in the dialog box.

    However on some computers (Mac) the following will only produce a byte zero of the file (when there are several textframe in the above loop, a zero-byte file is still produced - but again, it is only on some Mac) If a single textFrame with only a small portion of the text is saved/exported it works:

    var Folder.myDocuments.path = myFolder + "/ Desktop/export";

    //alert ("Myfolder:"+ MyFolder ");

    {if(!myFolder.exists)}

    Folder (myFolder) .create ();

    }

    var myFileName = myFolder + "/" + win. FilePnl.FileGrp.FileName.text + ".txt";

    var myFile = new file (myFileName);

    myFile.encoding = 'text ';

    myFile.open ('w');

    myFile.write (myExportText.replace("/\u2011/g",'-')); Replace (/ [^ a-zA-Z 0-9] + / g, "));

    myFile.close ();

    It has to do with using .silence?

    I hope someone can help me with this summer working on this problem for means of time now.

    Thomas

    Somehow myExportString became myExportText.

    In addition, what happens if you replace the text before write you it

    to deposit?

    Another thing you could try is to cast it to a string as follows:

    String (myExportText)

    Also, maybe try to change the encoding "UTF-8".

    Substances

  • Problem with scanning from the new laptop with Windows 8

    I have a Photosmart C4480 all-in-One printer/scanner/copier.  Since getting my new laptop, I have problems with the analysis feature.  I installed the software CD, and think I have downloaded the drivers for this printer.

    Indicates the serial number found on the bottom: model of regulation SNPRB-0721

    I hope you have a resolution for me.

    Thank you!!!

    I've found a workaround.  If I used Windows software to scan, it works correctly.  It works just not when I use the button on the printer itself.

  • Problem with sound in the ProRes files on first last, CC on 10 to win

    Hello, I've updated my CC Pro first to the latest version on my Windows 10 PC. Since then, I have a problem with the sound in ProRes files recorded with recorder Odyssey 7 q. My first reads the file and it detects sound only partially (in each file it our times of 2-3 seconds of silence, followed by its normal).

    It happens only on my first on Windows. On my MacBook with the same version of first, everything works fine. Apart from the first, I play Prores files successfully on my windows (with sound).

    You know all the solutions to this problem? I tried to reinstall codec first and Quicktime on my PC. Thanks in advance for the help.

    Convergent Design and Adobe are aware of the problem and working on a fix.  You need to roll back to 2015.3 for the moment.

  • Problems do not display the new files

    Hello

    I worked on a Flex project for several weeks and the IDE seems to have worked correctly. However, this morning, I added several new ActionScript classes in my project and I noticed that I don't get markers in the editor or any error in the Panel of problems for these files. I intentionally come in all sorts of wrong syntax and the IDE never complains. Interestingly, all the old files seem to work well... that is if I introduce an error of syntax in them, the editor displays a marker and the problems pane displays the error as one might expect.

    This happened to me once before more than a month, and in this case I ended up creating a new project, move all of my source code to the new project and reconfigure the path of construction, etc., and then drop the old project. This seemed to solve the problem at this time, but I just tried the same thing and it did not help this time. Still I can't IDE give me feedback on these new files. If I make a mistake, I do not up to what I run the program... what kind of defeats of the application of an IDE. It's almost as if the IDE thinks is not a program file and not run the compiler when it is saved... but still semiautomatic in the editor if works at least the editor must recognize that it is an ActionScript file.

    Anyone have any idea what could be the cause or, better yet, how to fix?

    Thank you.

    Bill

    Closing as a response.

  • Problem with 'Write to the worksheet File.vi' in Labview 8.2

    Hello

    I wrote a vi to reduce the noise of my source of signal (voltage). When I wrote in the spreadsheet file, it saved only 10 rows of data. How can I continue to record the signal until I stop the vi.

    Thanks in advance,

    Michael

    How many samples you take with the DAQ Assistant? Is it ten?

    Please pay attention to the answers. You never want to save more than one iteration until correct you the entry in the spreadsheet file.

    Post your VI if you still have questions after the fixing of the VI.

  • connection printer MG7520 problems with password, and the new name of the router

    I had to change my router network name and the password (the actual router is the same, but the network name and password is different). Now my Canon MG7520 won't 'talk' to my lap top, room rvia wired or wireless LAN (that worked before). My guess is that I need to "tell" the printer name and the password are different, but I know dn't how.  I tried to download the software and run it (that is to say, all over again) but when I do I get an "unable to acquire information on the driver and software.

    Any suggestions?

    Hi sdwhite,

    Yo are quite right that any time changes to network configuration, the printer must be given new items.  The printer can be connected directly from the operations Panel, and I have included full instructions HERE.

    It has not responded to your question or problem? Please call or write to us at one of the methods on the page contact us for further assistance.

    This has answered your question? Please click on the button accept as Solution so that others may find the answer as well.

  • Problem with microphone on the new laptop.

    Hey there I was wondering if someone could help me? I bought a Toshiba satellite L50t-A - 14 h and my microphone does not really work when I disable it, it always says its noise pick up! and its very very static when I listen to it! Ive tried everything to lower the amp microphone configuration with improvements everything and nothing works! I need to use you mic but can't when his garbage please help me

    Hello

    Have you already checked the Windows audio settings if the Microphone is on and the Microphone sound level is not set to 0? (Just go in Control Panel > hardware and sound > manage audio devices)

    First try to move your laptop to another location and check. If have any magnetic device such as speaker or TV this may cause static noise. As you have tried troubleshooting of Windows, sounds like unwanted material. Follow these steps and check if that helps:

    Step 1: check the microphone settings in the control panel-> sound-> recording tab
    Here, you should see two entries; internal microphone and external microphone port. The internal mic must be enabled.

    In addition, the internal mic belongs to the webcam. In the assistant webcam-> settings-> audio tab, you can increase the maximum microphone volume.

    Step 2: Reload the audio driver may resolve this problem.

    http://www.Toshiba.co.UK/innovation/download_drivers_bios.jsp?service=UK

    Also see this link: http://forums.toshiba.com/t5/Audio-Sound-Knowledge-Base/Laptop-Microphone-not-working/ta-p/332996

    I hope this helps. If you need help with Windows, let us know and will be happy to help you.

  • Problem with 'systimestamp' and the CSV file

    Hello

    I'm trying to insert data from a CSV file. One of the columns in my table must feed with oracle system date and this column's timestamp format.
    So here's my control file syntax:

    DOWNLOAD THE DATA
    INFILE '__FICHIER_PLAT__ '.
    ADD THE CUSTOMERS TABLE
    FIELDS TERMINATED BY '; '.
    (
    DATE_CREATION "systimestamp"
    FILLING filler1,
    CODE_CLIENT ' TRIM (: CODE_CLIENT).
    TYPE_CLIENT ' TRIM (: TYPE_CLIENT).
    filler2 FILLER,
    START_DATE ' TO_DATE (: START_DATE, 'YYYYMMDD'). "
    DATE_RESILIATIO ' TO_DATE (: DATE_RESILIATIO, 'YYYYMMDD'). "
    Filler3 FILLING,
    Filler4 FILLING,
    Filler5 FILLING,
    [...]
    Filler78 FILLING,
    Filler79 FILLING,
    Filler80 FILLING,
    Filler81 FILLING
    )

    I get this error:
    Sheet 1: Rejected - error on the CUSTOMERS table, column FILLER81.
    Column not found before the end of the logical record (use TRAILING NULLCOLS)

    It seems SQL * Loader see DATE_CREATION 'systimestamp' as a field of my CSV file.

    You know a syntax to define a column with systimestamp?

    Thank you!

    Alexis

    SYSTIMESTAMP does not seem to be supported (even in 11g) this way. If you read the [using SQL * Loader to generate input data | http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/ldr_field_list.htm#i1008234] you'll see that only CONSTANT, expression, RECNUM, SYSDATE and SEQUENCE are supported - that is to say SYSDATE is a special case.

    However, "SYSTIMESTAMP" is a perfectly good PHRASE. My example load historical prices from Yahoo finance.

    Data:

    ORCL,03/09/2008,21.52,21.57,21.01,21.19,40638100,21.19ORCL,02/09/2008,22.3,22.37,21.5,21.55,43622600,21.55ORCL,29/08/2008,22.4,22.43,21.7,21.93,35278100,21.93ORCL,28/08/2008,22.29,22.73,22.27,22.64,18700300,22.64ORCL,27/08/2008,22.2,22.57,22.13,22.34,21338300,22.34ORCL,26/08/2008,22.16,22.38,22.01,22.15,16293500,22.15ORCL,25/08/2008,22.54,22.71,22.19,22.21,20109200,22.21ORCL,22/08/2008,22.52,22.82,22.39,22.7,18335300,22.7
    
    load data
    into table price_history append
    fields TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    ( ticker char
    , trade_date date "dd/mm/yyyy"
    , open_price
    , high_price
    , low_price
    , close_price
    , volume integer
    , adj_close
    , update_ts expression "systimestamp"
    )
    

    and data load very well.

    Compared with the DEFAULT value in the column definition:
    -Use the value DEFAULT if that's what you always (or almost always - you can always ignore it)
    -use * expression 'systimestamp' * in the SQL * Loader if control file varies according to the type of load. Or if you are not allowed to modify the table definition (for example, if it is the table of the provider).

    HTH

    Nigel cordially

    Edited by: nthomas on January 8, 2009 15:31 (minor typo)

  • Satellite A50 problem with to install the new OS

    Hello
    I have, have little problem :)

    I forgot how eneter the bios system: simple D I don't remember Configuration key.

    Can anyone help?

    Best regards.

    You must be kidding! : D

    If the laptop supports a Toshiba BIOS I advise to use the ESC and then F1 key

  • Problem with hotspots in the new version of DW v 20141

    How can I get the icons of 'hot spots' (circle, rectangle, polygonal icons) to display in the property bar. It does not display icons for hot spot, and I can not also change an old HTML file which has hot spots.  I can see hotspots, but does not select or modify the links, etc.. Please can someone help me.  I use Creative Cloud Dreanweaver 20141

    When you click a picture, look to the right at the bottom of the window of the property inspector. You should see a teeny tiny triangle.

    Click to enlarge the window to include the Image Map tools.

    It also won't appear in Live View mode, so doubly make sure you are in Design mode. If you use fluid grid Layouts, view the design has been disabled. You will need do the job over here to retrieve (post #6 by Nancy O)...

    Editing text and adding links is crazy in DW CC - 20141

  • I CC2016 Creative Suite via iCloud, if I remove Creative Suite CS5.5 Design Premium with to have problems of enforcement of the new app?

    I have CC2016 Creative Suite via iCloud and Yosemite. If I delete my CS5.5 Suite Creative Design Premium will have problems with one of the new applications?

    ICloud is an Apple product, so I will assume you mean that Adobe Creative Cloud

    CS5.5 and cloud are completely separate... turn off before you uninstall your CS5.5

    -https://helpx.adobe.com/x-productkb/policy-pricing/activate-deactivate-products.html

  • Faced with a problem when writing to a txt file with stop button start

    Hello

    I am trying to use this stop start program that I found while surfing around this great discussion. actually I want to

    to write data to a text file when I press start button and it should stop writing when you press the stop button and

    After that whenever I press the button start again he should invite me for the new file name. now, even if I change the

    name of the file in the path dialog box it gives me error when I try to stop the program by pressing the stop button.

    need help to solve this problem. VI is attached with this post.

    Thank you

    with impatience... Hussn

    Hello Hussain,

    Sorry about that!  A bad tie.

    You can go there.

    Kind regards

Maybe you are looking for