09-14-2009 11:38 AM
09-14-2009 11:46 AM - edited 09-14-2009 11:49 AM
Thanks Ray.R
The sample is 3600 per second... and if I understand right, you said to write a file, and in the next day start in the same file from where it stoped? I really appreciate your help and what you wrote, but I didn't understand very well.
If you have some free time at night, I would appreciate if you can do an example showing me how to do this! But if you can't, don't worry I know you guys do it without any profit... so I only have to say Thanks for the help you are giving to me!
My program is working fine for what i want to do... I only need to put a code to write a binary file with the values for the day, and I need to know how can i show to the Client the values only in a period of time... like i will show the values from each minute.. so i know i have to integrate those samples of 60sec and send only one data with the average value. Am I right on that?
Thanks
Edit: and yes, for sure in my free time i'm studying labview in some tutorials and some manuals i downloaded from internet! =D
09-14-2009 12:07 PM
EduU wrote:Thanks Ray.R
The sample is 3600 per second... and if I understand right, you said to write a file, and in the next day start in the same file from where it stoped? I really appreciate your help and what you wrote, but I didn't understand very well.
Euh..... no..
You didn't understand correctly... Let me try to explain (sometime Itry to write faster and my fingers don't keep up with my train of thoughts 😉 )
There are 2 things:
1. When to change the filename: This would occur as soon as the date changes, which is midnight. It would look at the current time/date and determine that the current date is not equal to the date in the filename, so it would create a new filename and you would start writing to that one. You may need to put the filename in a shift register to compare.
2. Writing to the file starting from the location immediately after the last write is done at every time / writing interval, which is every 1 minute in this case. That allows you to write to a given position within the file (at end) without having to read the entire file, append the new data and write the entire content of the file at every 1 minute interval. People who did this had a nasty surprise when the time interval was not enough to read/append/write the file. Since you would know where the location of the end position of the file is, you have the added benefit of keeping track of it in an array which would allow you to easily search and access a block of data by knowing it's index. To make life even easier, you could store the time index within the same array (2D) and could do a search for the timestamp and you'dimmediately get the index for the starting location of the block within your file. Your boss would be impressed that you have a search engine built within your code.. 😄
Hope the above clarified the info.
R
09-14-2009 12:29 PM
oh Thanks Ray.R
Now I understand it perfectly!
and yes, I wanna do it in my program!
I hope when I go home
i have enough time to read it carrefully and try to figure it out!
Now I only need an example if you have a time for that!
but i know you already give me the solution, i only need to know how to do it!
Thanks!
09-14-2009 02:08 PM
Glad you understood it.
No promisses, but if I do have time tonight, (or tomorrow) I will prepare a short example.
Which LV version are you using?
09-15-2009 08:33 AM
i'm using the LabVIEW 8.6 atm!
And i'm glad if you can make an example for me!
09-15-2009 12:28 PM
Okay..
I'll see what I can do tonight.
R
09-17-2009 10:01 PM
I just wrote this example really quickly and didn't test it..
I just wanted to illustrate what I described.
There's no broken arrow, so something must be okay 😄
I'll check it out again tomorrow nite. I was a long day today.
09-17-2009 10:03 PM
By the way, if it does work, then simply replace the dice with your own data. And I placed a .dat extension. You can change it.
R
09-21-2009 06:26 AM - edited 09-21-2009 06:28 AM
Well Ray.R sorry for the delay
I only had time to see it today, but thanks it works nice
I already change it to .BIN
and now i have to implement it on my program!
Thank You!