From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-08-2020 03:29 AM
Hello,
In my project, I need to open a file that I create with the VI "write to text file".
The file contains 3 columns :
What I want to do :
I would like to be able to select the start and end date of the data I want to show.
For exemple : I only want to see the data from 08/07/20-09:07:16 to 08/07/20-09:07:20.
I know that I need to use the VI "Read delimited spreadsheet", but I don't know how to make a user friendly front panel.
I don't want the user to have to select the line number, but rather to indicate the start and end date of the data he wants in the front panel.
"read" is my attempt to use Read delimited spreadsheet.
"testheaderv2" is the program that creates the file.
Thank you !
Solved! Go to Solution.
07-08-2020 04:12 AM
Hi Naxmouk,
@Naxmouk wrote:
I know that I need to use the VI "Read delimited spreadsheet", but I don't know how to make a user friendly front panel.
I don't want the user to have to select the line number, but rather to indicate the start and end date of the data he wants in the front panel.
Unfortunately you saved your VIs using LV2020, which I cannot open right now. So you get just a textual description of your task…
Simple steps:
07-08-2020 04:37 AM
Hello GerdW,
Thank you for your reply.
Here are my VIs under LBV17
Could you please show me an exemple of what you said ? I'm kinda new to Labview
Thank you in advance !
07-08-2020 04:55 AM - edited 07-08-2020 04:55 AM
07-08-2020 05:09 AM
Thank you very much !
Could you please link me the VI ?
07-08-2020 05:16 AM
Hi Naxmouk,
@Naxmouk wrote:
Could you please link me the VI ?
Sorry, didn't save the VI.
But the functions are pretty clear to recognize…
07-08-2020 05:34 AM
Re-Hello GerdW,
I'm really sorry I'm new to Labview so I never used those VIs and I can't find them :
I did not understand the loop and the while part.
The array subset is used to select the column 1 and 2, and the array index is used to select the column 0.
If I understand the "for" is used to convert my string time stamps into real timestamps ?
For the while part I don't understand what it's doing.
07-08-2020 06:32 AM
Hi Naxmouk,
@Naxmouk wrote:
I never used those VIs and I can't find them :
ScanFromString to convert a string into a numeric datatype (or timestamp in this case)…
Threshold1DArray to search in an sorted 1D array. I just notice I forgot to wire the array data to this function…
@Naxmouk wrote:
I did not understand the loop and the while part.
If I understand the "for" is used to convert my string time stamps into real timestamps ?
For the while part I don't understand what it's doing.
You recognized the FOR loop intention correctly: convert an array of strings to an array of timestamps.
The while loop is the loop handling your UI, waiting for user interaction with those timestamp controls.
Please note my "rough idea" is missing the whole error handling!
07-08-2020 06:34 AM
@GerdW wrote:
Hi Naxmouk,
here's an example showing the first steps:
Does this account for daylight saving (if applicable)?
07-08-2020 06:43 AM
Hi Bill,
@billko wrote:
Does this account for daylight saving (if applicable)?
When you want to avoid any DaylightSaving hassles you should store timestamps as UTC data (also when converting to string).
I guess the OP didn't care about that when creating the data text files…