04-14-2022 09:22 AM
Dear Friends;🌺
I am saving text data from 7 pressure sensors. 1st column is the Date and 2nd is Time and rest are variable data. The Date and Time which I am reading form text file will shows on X axis.
Now I want to plot these sensors data in graph with selected Date interval. but I didn't found a way.
Please let me know if there any possibility to solve this problem.
My VI code and data file are attached here.
Thank you in advance for your help.
🙂🙏
Solved! Go to Solution.
04-14-2022 10:30 AM - edited 04-14-2022 10:31 AM
You have two entries for the time (date and time). You will have to concatenate those into a string from which you can convert to a timestamp with the scan from string function.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YHbRCAW&l=en-US
04-14-2022 11:25 AM - edited 04-14-2022 12:15 PM
How about something like this?
Plot the graph once and use property nodes to change what you see on the graph.
Edit: I made it so you can chose the file and update the graph without restarting the program...
04-14-2022 11:47 AM
I am thankful with your guidance.
I think if the amount of data is limited, it is a good solution.
Unfortunately, my software version is 2017 and I could not run your file with the software version 2021.
Please save and send your file with version 2017 or less.
Thank you RTSLVU
04-14-2022 11:50 AM
Thank you StevenD
But I could not implement your idea.
Maybe I need more time!
04-14-2022 12:01 PM
Here is is saved for LV 2017
04-14-2022 02:40 PM
I used your idea and my problem was solved. Also, modifying and optimizing my code was a great help. Thank you so much for helping me.
🙂🙏🌹
04-14-2022 03:09 PM
The problem that remains is what to do if the volume of data increases (for example several million data lines) and it is not possible to plot them all at once?
04-14-2022 03:41 PM
@H.goodarzi128 wrote:
The problem that remains is what to do if the volume of data increases (for example several million data lines) and it is not possible to plot them all at once?
Hmm... What makes you think you can't plot them all?
Sure, you are ultimately limited by the 4GB physical RAM barrier for 32 bit applications, but that's a lot of data points. Not to mention monitor resolution would limit how many points you could actually differentiate on the screen anyway.
I would probably just limit the data file to a reasonable size when collecting the data.
04-15-2022 01:27 AM - edited 04-15-2022 01:33 AM
Yes that's right
Limiting the data file size would be best done.
Assuming that the written code stores the sensor data in a text file, how can it generate a new file every month (or every day) and store continued data in it to prevent the previous file from increasing in size?
Thanks again for your guidance and help