LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update file name

Hi jingwei,

Yes, it is excellent advice, but that it not how Nishant wants to do this.  🙂

 

Nishant,

The vi already takes care of deleting the file before re-creating it (saving it with a previously existing filename).

I am in the middle of a course, so I will re-read you post soon.  Got to get back to the class....  😉

 

Thanks,

Ray

Message 81 of 94
(2,406 Views)

Hiii, Ray

            As we are using the file named filenames.lst to maintain the file no, so isnt it possible to create it also, coz if it is not existed in the folder, the vi gives an error, we should check it whether that file exist in the folder or not, if yes then ignore it, else to create the file with that name in that folder, will it be the perfect logic, or it might create some problems?

Thanks,

Nishant

Message 82 of 94
(2,402 Views)

Hi Nishant,

Now I understand what you are saying.

Yes, it is possible to create it.  What I suggest is to create a copy in each of the folders where the files reside.

This is simple to do.  😉

Ray

Message 83 of 94
(2,410 Views)
Hii, Ray
 
      You are right, that i should create the file by taking the path where user will store the excel file, so i have done it, whenever user decides the path an file name, and press OK, the next vi immidiately createsthe file name filenames.lst, which maintains th other files, and wont give any kind of errors, so today i can say i have learnt something from you, and i am to happy, hip hio hoorray.....
 
Thanks,
Nishant
Message 84 of 94
(2,408 Views)

Hi Nishant,

I am glad that you found the solution :D.

Did you implement the file creation routine in the vi?

😄

Message 85 of 94
(2,404 Views)

Hiii, Ray

       Ya man i have implementd the file creation routine in the vi, at the path selected by the user, as user selects the path and selects the OK button, at a time vi will create the filenames.lst, which maintain the file tracking.

Thanks,

Nishant

Message 86 of 94
(2,399 Views)

Hi Nishant,

Congratulations..  Job well done!  😄

Now, what you can do is wrap it in a case statement which creates it only if it does not exist.  To prevent loosing your previous info., and also may help performance.

In other words, list the directory and see if there is a match for the filename.lst file in that directory.  If it exists, do nothing, else create a blank file.

You are doing a lot of learning, which is good!  Almost 200 posts.. 

Ray

😄

 

Message Edited by JoeLabView on 03-02-2006 08:03 AM

Message 87 of 94
(2,396 Views)

Hiii, Ray

         So now i am dam sure that i ve learnt something from you in this period, bcos i already have done the same thing as you suggest about checking the file from diorectore through listing and putting a case structure, that if the file exists then wont do anything else create the file of that name, and same thing i also have done in the vi, create file header.vi, coz in that vi, the write char to file was askking for the user prompt, if we select the append file option false, else it was appending the header in the existing file, if the append file option is true, so what i ve done is just checking the files from the path through listing directory.vi and del it if it already exists and then create it, else just creating it, which works well for me. here with this i am attaching that modified vi, thanks very much Ray.

And about learning i should say that, this forum has done a lot for me, i ve learnt very much from the forum in just three months, and i am also trying to answer of the question, if it is possible for me, which help the user and tests my knowledge.

Thanks,

Nishant

Message Edited by Nishant on 03-02-2006 10:10 PM

Message Edited by Nishant on 03-02-2006 10:14 PM

Message 88 of 94
(2,386 Views)

Hiii, Ray

            Do you know anything about the timed loop? anybody havent solved my problem and i am in to hurry..., I am facing the problem for synchronising the timed loop, actually, i want one loop to generate the data and another timed loop to used that generated data to make a buffer of type fifo, but when i run these two loops, it hangs, what happens is upto 200 records, it runs good, but after that both the loop gets hanged, instead i want both to run synchronously without hanged, here with this i am attaching my vi and in the vi i have given some description, and i am also attaching drivers, which are in the vi, which help you to run it.

Thanks,

Nishant

Download All
Message 89 of 94
(2,373 Views)
HI ,
    I write a VI. I t  can save txt files by "new files number(you have saved)". I made a buffer to save number to do.
0 Kudos
Message 90 of 94
(2,358 Views)