LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change path for every 24 hours

Solved!
Go to solution

I need a vi code to change the path for every new file creation.The file in the path will be a new file.Kindly please reply me.i don have any idea.

The Pseudo code for this is

IF(NEW FILE IS AVAILABLE IN THE FOLDER)

{

PERFORM CALCULATION IN THE OLD FILE;

CHANGE THE OLD FILE INTO NEW FILE;

}

ELSE

{

CHECK FOR NEW FILE;

}

Please kindly do the reply.

0 Kudos
Message 1 of 25
(4,393 Views)

Have you looked at the File I/O functions? There are functions there to modify paths, copy files, check if a file/folder exists etc.

 

If you post your attempt at the code and maybe if you tell us which part specifically you are having a problem with then maybe we can help.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 25
(4,354 Views)

Thank you for the reply sir.Yes i have tried with File I/O functions.The data log will be done everyday (i.e) The readings will be written in the data log file for every 6 minutes and at the end of the day a new file will be created.So that everytime when it creates that has to be used like the above alogorithm as i mentioned already.Kindly help me to code it as i am a learner now.

 

 

 

 

 

0 Kudos
Message 3 of 25
(4,312 Views)

Show me what you have coded so far and we can try to help you make it work properly. I'm not going to write your code for you and I have pointed you at the relevant palette where you can find the functions you need (e.g. list directory, open/close file etc.

 

I suggest if you are a beginner that you take some LabVIEW tutorials - there is a list of free training materials available here - scroll down to 'looking for free training'.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 25
(4,295 Views)
Solution
Accepted by topic author Perarasi

Along with the tutorials in the Rules link Sam mentioned, note where it says not to contact users directly.

 

You're going to want these, I think:

Example_VI_BD.png

 

"Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  - Abraham Lincoln

 

Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training

 

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 25
(4,264 Views)

Thank you so much for your replies...

Here i have tried the code to read the file.But the file name is different when it compared with the date.Can i read the date of the file (i.e when it has been stored?).Untitled.pnglog files.png

0 Kudos
Message 6 of 25
(4,236 Views)

 

Thank you so much for your replies...

Here i have tried the code to read the file.But the file name is different when it compared with the date.Can i read the date of the file (i.e when it has been stored?).

 

 

Untitled.pnglog files.png

0 Kudos
Message 7 of 25
(4,233 Views)

What do you mean by the file name is different when compared to the date?

 

In your screenshot (hard to read), it looks like the name of the file matches the date is was last modified.

 

So where is the problem?

0 Kudos
Message 8 of 25
(4,230 Views)

Thank you for the reply..

The file name is like 18_9_2015 the date is like 18-09-2015 so i couldn't select the new file by using the date.So am asking do i have any way to search for the new file by using the date modified?

0 Kudos
Message 9 of 25
(4,218 Views)

Dear Perarasi

          Your Algorithm is not clear to answer... Still

1)If ur part of program creates the file, which holds the date of the day as its filename, u can search for the file which matches the current day date and can do ur calculation in the same file as like how u did in the above code.

2) If current date changes then ur part of program will create a new file of changed date,  and it continues.

 

 

Other way u can create a file each day when u search for file with current date. If  file exist do the operation there if not create the file of new date.

 

If u want the file name should not hold the date, then use date modified function to do the same.

0 Kudos
Message 10 of 25
(4,209 Views)