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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Search Engine" using Real Delimited Spreadsheet.vi

Hi everyone i have a text file which contains the date,time,voltage,current,power,imorted energy ratings of my Modbus Power meters. I used the write to delimited spreadsheet to write all the readings i received from the meters. The energy ratings of the meter is cumulative and i would like to be able to have a "search engine" that allows the users to view their energy consumed between any period of time. They would have to enter the start time and the end time that they want to view. For example if the user wants to view the energy consumed from 9 to 10 am the user has to enter 9am at the "start time" & 10am at the "end time". To get the amount of energy consumed i would  take  the imported energy value at 10am(from the text file) and subtract it with the imported energy value at 9am(also  from the text file). Any help would be appreciated!

 

 

0 Kudos
Message 1 of 7
(2,244 Views)

Sorry for the typo error in the title of the post. i meant to use "Read Delimited Spreadsheet.vi"..

0 Kudos
Message 2 of 7
(2,227 Views)

You should consider using SQLite instead of a simple text file.  You could then also consider a more sophisticated UI: how about a chart of a day's power use, averaged over the last 30 days, say?

Message 3 of 7
(2,211 Views)

Hi drjdpowell thanks for your input, do you mean that the SQLite can do the "Search Engine" function that i am looking for?

0 Kudos
Message 4 of 7
(2,203 Views)

Hi Edmund99, SQLite allows the access to diferent databases, for LabVIEW drjdpowell has an API for easy manipulation: https://www.ni.com/en/support/downloads/tools-network/download.sqlite-library.html

 

When you store information with databases you can make queries involving the data in each field (Column) of this way to retrieve information like you described is easy.

 

You only need to learn how to write the queries but often it is intuitive.

0 Kudos
Message 5 of 7
(2,199 Views)

SQLite uses SQL, Structured Query Language, which is used by databases for "Search Engine" stuff.  There is a learning curve, but SQL is very highly capable.

0 Kudos
Message 6 of 7
(2,196 Views)

Oh I see, thank you drjdpowell and everyone else! Will take a look at it

0 Kudos
Message 7 of 7
(2,150 Views)