LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update file name

Hi Nishant,

I got it..  I will do the modification and post a new vi in a few minutes.. 

I placed the initializaion block as an example, so I will remove it.  I will also place a button called "Data Logging", which will act as a trigger to write to the file.

Ray

Message 61 of 94
(1,974 Views)

Hi Nishant,

Okay.. I combined everything into a single vi... Messy, I know..

Look at the functionality of the Execution Control (STOP) which stops the vi when running.  It will stop everything.

Also look at the Log Data control which you can turn ON & OFF to write data when selected to the same file. 

There is a control to select the maximum file size as well as an LED to indicate when a new file is being created.

I purposely placed a 500 ms delay in order to let you have time to look and control the vi.

Once you select a folder, you can copy/paste the location to the control and flip the selection switch.

Have fun,

Ray

Message 62 of 94
(1,974 Views)
Nishant,
 
I forgot..  You'll have to use the "Create File Main.vi" from the last example.  And re-link...
or maybe...
 
try this one... all inclusive llb file
😄
 
Ray
 

Message Edited by JoeLabView on 02-09-2006 03:15 PM

Message 63 of 94
(1,975 Views)

Hiii, Ray

              That is something better with the trigger. but now the main thing is i couldnt put the while loop to the "create file with the headers", bcoz else otherwise control goes there and wont comeback to the current vi and the problem is i couldn't stop the trigger, i also want to stop the trigger, which is currently i can when there is no while loop in the "create file witht headers" so it also should be controlled by the error case? now its a problem of calling the vi at a time and kepping control to both the vis, one from which we r calling the vi and one which is performing the action.

Thanks,

Nishant

Message 64 of 94
(1,967 Views)

Hiii, Ray

          I ve got most of this, that the statemetn i ve wrote in the above statement is wrong about writing the data from the "Create file with header.vi" and data writes into the file from the main "datalogger full.vi", and there i also can stop the trigerring, manually, thats a best thing that it is not going into the while loop, but the thing is vi eventually writes the data so slow that, it writes the data at almost one second, and i want the resolution of 10 ms. mean min. of 100 data in one second, and i also ve remove the timer from it, else these thing is not happenning, can you please tell me why data is such slow?

Thanks,

Nishant

Message 65 of 94
(1,966 Views)
Hiii, Ray
 
              Here i am facing another problem that if i will use path info before writing file it will decrease the speed of writing, else if suppose i dont write it then the data writing will be fast but the file will be created without header, i got the logic of path, but not using path info to create the file with the header, so if the path info should remove then my work is to easy to do, so if possible do one thing that remove the path info before the write file function, but the file should create with the header.
 
Thanks,
Nishant
Message 66 of 94
(1,962 Views)
Hiiii, Ray
 
            As you wrote that "Look at the functionality of the Execution Control (STOP) which stops the vi when running.  It will stop everything", then what it is exactly doin? creating a new file, right? but when i am calling it from the another vi through invoke node, all other controls are behaving properly, but the Execution Control stops the vi, instead of creating the new file, do you know, why this thing is happening?
 
Thanks,
Nishant
Message 67 of 94
(1,956 Views)

Good morning Nishant (or actually good evening)

Wow.. that's a lot of questions..  Here are some answers:


Q1: >> That is something better with the trigger. but now the main thing is i couldnt put the while loop to the "create file with the headers", bcoz else otherwise control goes there and wont comeback to the current vi

You found the trigger for the data collection.  Yes, the example is configured so that if it is datalogging, then it stays inside that loop until the trigger is removed, or the file size exceeds the limit or the Execution is stopped.  The reason for that is if you want the processing power for datalogging, then you may not want to be doing something else in parallel.  Do you have parallel processes going on while datalogging?


Q2: >> and the problem is i couldn't stop the trigger, i also want to stop the trigger, which is currently i can when there is no while loop in the "create file witht headers" so it also should be controlled by the error case?

I took out the "error case" in the last example.  When you stop the trigger, the process moves to the outer loop, which keeps running until you stop the vi or press on the STOP (Execution Control).  The only thing that you will notice is a change of message in the status window, from "data logging" to "IDLE".

 

Q3: >> now its a problem of calling the vi at a time and kepping control to both the vis, one from which we r calling the vi and one which is performing the action.

Do you mean that you are having a problem when trying to control the running of the main vi versus controlling the new file creation and the the datalogging?  You will need to describe how you wish to control that.  The example was simply to demonstrate how features can be implemented, so it may not be fine-tuned for your application.  If you describe how you intend to use it, I can try to modify it a bit 😉

 

Q4: >>  I ve got most of this, that the statemetn i ve wrote in the above statement is wrong about writing the data from the "Create file with header.vi" and data writes into the file from the main "datalogger full.vi"

okay  😉

 


Q5: >>  and there i also can stop the trigerring, manually, thats a best thing that it is not going into the while loop, but the thing is vi eventually writes the data so slow that, it writes the data at almost one second, and i want the resolution of 10 ms. mean min. of 100 data in one second, and i also ve remove the timer from it, else these thing is not happenning, can you please tell me why data is such slow?

Okay..  The correction was simply to change the timer (Wait) value from 500 to 10.  Do not remove the wait.  It is recommended to have at least one wait inside the loop, otherwise you may experience strange behaviours.  Simply change the value to 10 or even as low as 5ms.  The 500 ms was simply to slow it down so that you could see the behaviour of the example, otherwise it would be way too fast.

Message 68 of 94
(1,949 Views)

There is a 5000 characters limit to each post... so here is part 2:

 

 

Q6: >>  Here i am facing another problem that if i will use path info before writing file it will decrease the speed of writing, else if suppose i dont write it then the data writing will be fast but the file will be created without header,

Something does not sound right..  Did you create a new vi for this or did you modify the original one from the last example?  It should not slow the datalogging.  And it should automatically create the header. Unless I missed a bug 😉


Q7: >>  i got the logic of path, but not using path info to create the file with the header, so if the path info should remove then my work is to easy to do, so if possible do one thing that remove the path info before the write file function, but the file should create with the header.


I implemented two versions to select the path for the files.  The run-time selection is only for use while you experiment with the vi to simplify you life, because it will search the path for you.  This feature is simple to bypass.  Simply select "Hardcoded Folder" but fill in the correct path first. And right click the selector and Select "Data Operations" and "Make current value default". You can do the same for the path name.  The save the vi.

 

Q8: >>   As you wrote that "Look at the functionality of the Execution Control (STOP) which stops the vi when running.  It will stop everything", then what it is exactly doin?

It stops everything.


Q8a): >> creating a new file, right?

No... The Execution Control stops everything

Q8b): >> but when i am calling it from the another vi through invoke node, all other controls are behaving properly, but the Execution Control stops the vi, instead of creating the new file, do you know, why this thing is happening?

If you set the "Execution Control to true, it will stop the entire vi.  The file creation and the datalogging are controlled by different mechanisms.

Maybe what you are trying to tell me is that you want external (manual?) control over the file creation.  Is that true?  If so, let me know & I will modify the example.. 🙂


Got to get some coffee...

Hope these answers help you understand what is behind the vi.  😄

Have fun, buddy,

Ray

😄

Message 69 of 94
(1,953 Views)

Hiii, Ray

       Can you please modify the file for upto 3000 file numbers, i mean after the file name data3000, the vi will give the name data1 again. mean to reset the file name to Data1 afetr file name Data3000,instead name Data3001 .

Thanks,

Nishant

Message 70 of 94
(1,935 Views)